| 1 | {% extends "base.html" %} |
| 2 | |
| 3 | {% block content %} |
| 4 | |
| 5 | <div class="article-page"> |
| 6 | |
| 7 | <div class="article"> |
| 8 | <div class="article__header"> |
| 9 | <div class="article__title">{{ article.title }}</div> |
| 10 | |
| 11 | <div class="article__meta"> |
| 12 | <div class="article-meta"> |
| 13 | |
| 14 | <div class="article-meta__item"> |
| 15 | <span class="article-meta__value" title="{{ article.date.isoformat() }}"> |
| 16 | {{ article.date.strftime('%B %d, %Y') }} |
| 17 | </span> |
| 18 | </div> |
| 19 | |
| 20 | {% if article.authors or article.author %} |
| 21 | <span class="article-meta__separator">•</span> |
| 22 | <div class="article-meta__item"> |
| 23 | <span class="article-meta__value"> |
| 24 | {% if article.authors %} |
| 25 | {% for author in article.authors %} |
| 26 | {% set author_name = AUTHOR_NAMES.get(author|string|trim, author|string|trim) %} |
| 27 | {% set author_url = AUTHOR_URLS.get(author|string|trim) %} |
| 28 | {% 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 %} |
| 29 | {% endfor %} |
| 30 | {% else %} |
| 31 | {% set author_name = AUTHOR_NAMES.get(article.author, article.author) %} |
| 32 | {% set author_url = AUTHOR_URLS.get(article.author) %} |
| 33 | {% if author_url %} |
| 34 | <a href="{{ author_url }}">{{ author_name }}</a> |
| 35 | {% else %} |
| 36 | {{ author_name }} |
| 37 | {% endif %} |
| 38 | {% endif %} |
| 39 | </span> |
| 40 | </div> |
| 41 | {% endif %} |
| 42 | </div> |
| 43 | </div> |
| 44 | </div> |
| 45 | |
| 46 | <div class="article-content"> |
| 47 | {{ article.content }} |
| 48 | </div> |
| 49 | </div> |
| 50 | |
| 51 | </div> |
| 52 | |
| 53 | {% endblock %} |