NDOJ/templates/blog/content.html
2021-12-09 14:47:29 -06:00

41 lines
No EOL
1.7 KiB
HTML

<section class="{% if post.sticky %}sticky {% endif %}post">
<h2 class="title">
<a href="{{ url('blog_post', post.id, post.slug) }}">{{ post.title }}</a>
</h2>
<span style="float: right">
<span class="time">
{%- if post.sticky %}<i title="Sticky" class="fa fa-star fa-fw"></i>{% endif -%}
{% with authors=post.authors.all() %}
{%- if authors -%}
<span class="post-authors">{{ link_users(authors) }}</span>
{%- endif -%}
{% endwith %}
{{ relative_time(post.publish_on, abs=_('posted on {time}'), rel=_('posted {time}')) -}}
</span>
<span>
<a href="{{ url('blog_post', post.id, post.slug) }}#comments" class="blog-comment-count-link">
<i class="fa fa-comments blog-comment-icon"></i>
<span class="blog-comment-count">
{{- post_comment_counts[post.id] or 0 -}}
</span>
</a>
</span>
</span>
<div style="clear:both"></div>
{% if post.is_organization_private and show_organization_private_icon %}
<div class="organization-tags">
{% for org in post.organizations.all() %}
<span class="organization-tag">
<a href="{{ org.get_absolute_url() }}">
<i class="fa fa-lock"></i> {{ org.name }}
</a>
</span>
{% endfor %}
</div>
{% endif %}
<div class="summary content-description">
{% cache 86400 'post_summary' post.id %}
{{ post.summary|default(post.content, true)|markdown('blog', 'svg', lazy_load=True)|reference|str|safe }}
{% endcache %}
</div>
</section>