posts.dtl (2505B)
1 {% extends "template.dtl" %} 2 {% block html-head %} 3 {% super %} 4 {% if twitter-card %} 5 <meta name="twitter:card" content="summary"> 6 {% if twitter-card.image %} 7 <meta name="twitter:image" content="{{ twitter-card.image }}"> 8 {% endif %} 9 {% if posts %} 10 <meta name="twitter:title" content="{{ posts.0.title }}"> 11 <meta name="twitter:description" content="{{ posts.0.rendered-content|strip-html|truncatechars:200 }}"> 12 {% else %} 13 <meta name="twitter:title" content="{{ title }}"> 14 {% endif %} 15 {% endif %} 16 {% endblock %} 17 {% block main %} 18 {% if posts %} 19 {% for post in posts %} 20 {% if not forloop.first %} 21 <hr> 22 {% endif %} 23 {% ifchanged post.created-at-short %} 24 <h1>{{ post.created-at-short }}</h1> 25 {% endifchanged %} 26 {% block post %} 27 <a name="{{ post.id }}"></a> 28 {% if collapse-posts-p %} 29 {% block title-collapsed %} 30 <h2><a href="{{ post.link }}">{{ post.title }}</a></h2> 31 {% endblock %} 32 {% block article-collapsed %} 33 <article> 34 {{ post.rendered-content|safe|read-more:post.link }} 35 </article> 36 {% endblock %} 37 {% block footer-collapsed %} 38 <p role="note"> 39 <small> 40 Posted by {{ post.created-by }} on {{ post.created-at-long }} 41 {% ifnotequal post.created-at-long post.last-updated-at-long %} 42 <br> 43 Last updated by {{ post.last-updated-by }} on {{ post.last-updated-at-long }} 44 {% endifnotequal %} 45 </small> 46 </p> 47 {% endblock %} 48 {% else %} 49 {% block title-expanded %} 50 <h2>{{ post.title }}</h2> 51 {% endblock %} 52 {% block article-expanded %} 53 <article>{{ post.rendered-content|safe }}</article> 54 {% endblock %} 55 {% block footer-expanded %} 56 <p role="note"> 57 <small> 58 Posted by {{ post.created-by }} on {{ post.created-at-long }} 59 {% ifnotequal post.created-at-long post.last-updated-at-long %} 60 <br> 61 Last updated by {{ post.last-updated-by }} on {{ post.last-updated-at-long }} 62 {% endifnotequal %} 63 </small> 64 </p> 65 {% endblock %} 66 {% endif %} 67 {% endblock %} 68 {% endfor %} 69 {% else %} 70 No posts found. 71 {% endif %} 72 {% endblock %}