| 1 | <div class="article-card" data-url="{{ SITEURL }}/{{ article.url }}" |
| 2 | title="Read {{ article.title|striptags }}"> |
| 3 | |
| 4 | <div class="article-card__header"> |
| 5 | <div class="article-card__title"> |
| 6 | {{ article.title }} |
| 7 | </div> |
| 8 | </div> |
| 9 | |
| 10 | <div class="article-card-meta"> |
| 11 | <div class="article-card-meta__item"> |
| 12 | <span class="article-card-meta__value" title="{{ article.date.isoformat() }}"> |
| 13 | {{ article.date.strftime('%B %d, %Y') }} |
| 14 | </span> |
| 15 | </div> |
| 16 | |
| 17 | {% if article.authors or article.author %} |
| 18 | <span class="article-card-meta__separator">•</span> |
| 19 | <div class="article-card-meta__item"> |
| 20 | <span class="article-card-meta__value"> |
| 21 | {% if article.authors %} |
| 22 | {% for author in article.authors %} |
| 23 | {% set author_name = AUTHOR_NAMES.get(author|string|trim, author|string|trim) %} |
| 24 | {% set author_url = AUTHOR_URLS.get(author|string|trim) %} |
| 25 | {% if author_url %}<a href="{{ author_url }}">{{ author_name }}</a>{% else %}{{ author_name }}{% endif %}{% if not loop.last %}{% if loop.revindex == 2 %}{% if loop.length > 2 %}, and {% else %} and {% endif %}{% else %}, {% endif %}{% endif %} |
| 26 | {% endfor %} |
| 27 | {% else %} |
| 28 | {% set author_name = AUTHOR_NAMES.get(article.author, article.author) %} |
| 29 | {% set author_url = AUTHOR_URLS.get(article.author) %} |
| 30 | {% if author_url %} |
| 31 | <a href="{{ author_url }}">{{ author_name }}</a> |
| 32 | {% else %} |
| 33 | {{ author_name }} |
| 34 | {% endif %} |
| 35 | {% endif %} |
| 36 | </span> |
| 37 | </div> |
| 38 | {% endif %} |
| 39 | </div> |
| 40 | |
| 41 | <div class="article-card__content"> |
| 42 | {{ article.summary }} |
| 43 | </div> |
| 44 | |
| 45 | </div> |