article.html 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {% extends "base.html" %}
  2. {% block meta_author %}{{ article.author|e }}{% endblock %}
  3. {% block meta_description %}{{ article.description|e }}{% endblock %}
  4. {% block meta_keywords %}{{ [article.tags|join(', '), article.category, article.keywords]|join(', ') }}{% endblock %}
  5. {% block title %}{{ SITENAME }} - {{ article.title }} - {{ article.author }}{% endblock title %}
  6. {% block nav %}
  7. <a href="{{ SiteProtoDomainTLD }}">Blog</a> ›<a href="{{ SiteProtoDomainTLD }}/{{ article.category.url }}">{{ article.category }}</a> ›{{ article.title }}
  8. {% endblock %}
  9. {% block content %}
  10. {{ super() }}
  11. <section>
  12. <header>
  13. <h2>{{ article.title }}</h2>
  14. {% import 'translations.html' as translations with context %}
  15. {{ translations.translations_for(article) }}
  16. <div>
  17. <span>Post in</span>
  18. <abbr title="{{ article.date.isoformat() }}">
  19. <a href="{{ SiteProtoDomainTLD }}/archive/{{ article.date|strftime("%Y%m%d") }}/">{{ article.locale_date }}</a>
  20. </abbr>
  21. <span> | By</span>
  22. {% if article.author %}
  23. <a href="{{ SiteProtoDomainTLD }}/author/{{ article.author|lower() }}/index.html">{{ article.author }}</a>
  24. {% elif AUTHOR %}
  25. <a href="{{ SiteProtoDomainTLD }}/author/{{ AUTHOR }}.html">{{ AUTHOR }}</a>
  26. {% endif %}
  27. <span> | Tags</span>
  28. {% for tag in article.tags %}
  29. <a href="{{ SiteProtoDomainTLD }}/{{ tag.url }}">{{ tag }}</a>
  30. {% endfor %}
  31. </div>
  32. </header>
  33. <div>
  34. {{ article.content }}
  35. </div>
  36. <footer>
  37. <span>Category:</span>
  38. <abbr>
  39. <a href="{{ SiteProtoDomainTLD }}/{{ article.category.url }}">{{ article.category }}</a>
  40. </abbr>
  41. </footer>
  42. </section>
  43. {% endblock %}