NDOJ/templates/blog/content.html
2024-04-23 15:36:51 -05:00

55 lines
No EOL
2.1 KiB
HTML

{% for post in posts %}
<section class="{% if post.sticky %}sticky {% endif %}blog-box">
{% if post.is_organization_private and show_organization_private_icon %}
<div style="margin-bottom: 1em; display: flex;">
{% for org in post.organizations.all() %}
{% include "organization/tag.html" %}
{% endfor %}
</div>
{% endif %}
<div style="margin-bottom: 0.5em">
<span class="post-content-header time">
{% with authors=post.get_authors() %}
{%- if authors -%}
<span class="user-img" style="width: 1.5em; height: 1.5em">
<img src="{{gravatar(authors[0])}}" loading="lazy">
</span>
<span class="post-authors">{{ link_users(authors) }}</span>
{%- endif -%}
{% endwith %}
&#8226;
{{ relative_time(post.publish_on) }}
{%- if post.sticky %} &#8226;
<i title="Sticky" class="fa fa-star fa-fw"></i>{% endif -%}
</span>
<span style="float: right">
<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">
{{ comment_count(post) }}
</span>
</a>
</span>
</div>
<h2 class="title">
<a href="{{ url('blog_post', post.id, post.slug) }}">{{ post.title }}</a>
</h2>
<div class="blog-description">
<div class="summary content-description">
{% cache 86400 'post_summary' post.id %}
{{ post.summary|default(post.content, true)|markdown(lazy_load=True)|reference|str|safe }}
{% endcache %}
</div>
<div class="show-more"> {{_("...More")}} </div>
</div>
<div class="actionbar-box">
{% set pagevote = post.get_or_create_pagevote() %}
{% set bookmark = post.get_or_create_bookmark() %}
{% set hide_actionbar_comment = True %}
{% set include_hr = False %}
{% set share_url = request.build_absolute_uri(post.get_absolute_url()) %}
{% include "actionbar/list.html" %}
</div>
</section>
{% endfor %}
{% include "feed/has_next.html" %}