pelican-mg/templates/partials/article-short.html
2017-08-14 22:18:28 +02:00

20 lines
1.4 KiB
HTML

<article class="uk-article" itemtype="http://schema.org/BlogPosting" itemscope="itemscope" itemprop="blogPost"
data-tags='{{ article.tags|map(attribute='name')|list|tojson }}'>
<div class="mg-article-short">
{% if article.featured_image %}
<img class="mg-article-image" src="{{ article.featured_image }}" alt="">
{% endif %}
<div class="mg-article-content">
<a href="{{ SITEURL }}/{{ article.url }}" class="uk-link-muted"><h1 class="uk-article-title" itemprop="name">{{ article.title|e }}</h1></a>
<p class="uk-article-meta"><time datetime="{{ article.date.strftime('%Y-%m-%d') }}" itemprop="datePublished">{{ article.locale_date }}</time><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>{% if DISQUS_SITENAME %} • <br class="uk-visible-small"><i class="uk-icon-comment"></i> <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread" itemprop="discussionUrl"></a>{% endif %}</p>
<!--{{ article.summary }}-->
<p class="uk-article-lead" itemprop="description">{{ article.summary|striptags|striptags }}</p>
{% if not MG_DISABLE_SUMMARY %}<p>{{ ' '.join(article.content.split(' ')[:75])|striptags|striptags }}...</p>{% endif %}
<a href="{{ SITEURL }}/{{ article.url }}">Read More</a>
{% include "partials/inline-tags.html" %}
</div>
</div>
<hr class="uk-article-divider">
</article>