website/themes/nervproject/templates/article.html

77 lines
3.4 KiB
HTML

{% extends "base.html" %}
{% block meta %}
<meta name="author" content="{{ article.author.name }}" />
<meta name="description" content="{{ article.summary|striptags }}" />
<meta name="keywords" content="{{ article.tags|join(', ') }}">
{% include "partial/og_article.html" %}
{% endblock %}
{% block title %} &ndash; {{ article.title|striptags }}{% endblock %}
{% block content %}
<article class="single">
<header>
<h1 id="{{ article.slug }}">{{ article.title }}</h1>
<p>
{{ _('Posted on %(when)s in %(category)s',
when=article.locale_date,
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
{% if 'post_stats' in PLUGINS %}
&#8226; {{ article.stats['read_mins'] }} min read
{% endif %}
</p>
</header>
<div>
{{ article.content }}
</div>
<div class="tag-cloud">
<p>
{% if article.tags %}
{% for tag in article.tags %}
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
{% endfor %}
{% endif %}
</p>
</div>
{% if ADD_THIS_ID %}
<div class="center social-share">
<p>{{ _('Like this article? Share it with your friends!') }}</p>
<div class="addthis_native_toolbox"></div>
<div class="addthis_sharing_toolbox"></div>
</div>
{% endif %}
{% if article.share_post and article.status != 'draft' %}
<section>
<div class="center social-share">
<p>{{ _('Like this article? Share it!') }}</p>
<ul class="social">
<li><a class="sc-diaspora" href="{{article.share_post['diaspora']}}" target="_blank" title="{{ _('Share on Diaspora') }}"><svg aria-label="{{ _('Icon') }}" class="icon"><use xlink:href="/theme/fa.svg#asterisk"></use></svg> Diaspora*</a></li>
<li><a class="sc-twitter" href="{{article.share_post['twitter']}}" target="_blank" title="{{ _('Share on Twitter') }}"><svg aria-label="{{ _('Icon') }}" class="icon"><use xlink:href="/theme/fa.svg#twitter"></use></svg> Twitter</a></li>
<li><a class="sc-facebook" href="{{article.share_post['facebook']}}" target="_blank" title="{{ _('Share on Facebook') }}"><svg aria-label="{{ _('Icon') }}" class="icon"><use xlink:href="/theme/fa.svg#facebook"></use></svg> Facebook</a></li>
<li><a class="sc-linkedin" href="{{article.share_post['linkedin']}}" target="_blank" title="{{ _('Share on LinkedIn') }}"><svg aria-label="{{ _('Icon') }}" class="icon"><use xlink:href="/theme/fa.svg#linkedin"></use></svg> LinkedIn</a></li>
<li><a class="sc-email" href="{{article.share_post['hacker-news']}}" target="_blank" title="{{ _('Share on HackerNews') }}"><svg aria-label="{{ _('Icon') }}" class="icon"><use xlink:href="/theme/fa.svg#hacker-news"></use></svg> HackerNews</a></li>
<li><a class="sc-email" href="{{article.share_post['email']}}" target="_blank" title="{{ _('Share via Email') }}"><svg aria-label="{{ _('Icon') }}" class="icon"><use xlink:href="/theme/fa.svg#email"></use></svg> Email</a></li>
</ul>
</div>
</section>
{% endif %}
{% if article.related_posts %}
<div class="related-posts">
<h4>{{ _('You might enjoy') }}</h4>
<ul class="related-posts">
{% for related_post in article.related_posts %}
<li><a href="{{ SITEURL }}/{{ related_post.url }}">{{ related_post.title }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% include 'comments.html' %}
{% include "partial/disqus.html" %}
</article>
{% endblock %}