post.twig 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. {% extends "index.twig" %}
  2. {% block content %}
  3. <article class="fullpage">
  4. {% if meta.title %}<h1>{{ meta.title|replace({'-':'‑'}) }}</h1>{# the replacement is a non-breaking hyphen #}{% endif %}
  5. {% if meta.description is not empty %}
  6. <p class="description">{{ meta.description }}</p>
  7. {% endif %}
  8. <aside class="clearfix">
  9. {% if meta.date is not empty %}
  10. <span class="date">{{ meta.date_formatted }}
  11. {% if meta.timeline is not empty %}
  12. <span class="timeline">
  13. {% for date in meta.timeline|split(',') %}
  14. - {{ date|date("M d Y") }}
  15. {% endfor %}
  16. </span>
  17. {% endif %}
  18. </span>
  19. {% endif %}
  20. {% if meta.author is not empty %}
  21. <span class="author">by <a href="/authors?q={{ meta.author }}">{{ meta.author }}</a></span>
  22. {% endif %}
  23. {% if meta.tags is not empty %}
  24. {% for tag in meta.tags|split(',') %}
  25. <a class="tag" href="/tags?q={{ tag }}">#{{ tag }}</a>
  26. {% endfor %}
  27. {% endif %}
  28. </aside>
  29. <div class=content>{{ TableOfContent }}{{ content }}</div>
  30. </article>
  31. {% if config.PicoComments.enabled %}{%- include 'includes/comments.twig' -%}{% endif %}
  32. {% endblock %}