site_opytex/theme/templates/article.html

89 lines
2.5 KiB
HTML
Raw Normal View History

2019-07-18 10:43:36 +00:00
{% extends "base.html" %}
{% block meta %}
<meta name="author" content="{{ article.author.name }}" />
<meta name="description" content="{{ article.summary|striptags|escape }}" />
<meta name="keywords" content="{{ article.tags|join(', ')|escape }}">
{% include "partial/og_article.html" %}
{% endblock %}
{% block title %} &ndash; {{ article.title|striptags|escape }}{% endblock %}
{% block content %}
<article class="single">
<header>
{% if not ARTICLE_HIDE_TRANSLATION %}
{% import 'partial/translations.html' as translations with context %}
{{ translations.translations_for(article) }}
{% endif %}
{% if 'pelican-page-hierarchy' in PLUGINS%}
{% if article.parent %}
<ul class="breadcrumb">
{% for parent in article.parents %}
<li>
{% if parent.url == "index.html" %}
<a href="{{ SITEURL }}/" title="{{ SITENAME }}">
<i class="fa fa-home fa-lg"></i>
</a>
{% else %}
<a href="{{ SITEURL }}/{{ parent.url }}">{{ parent.title }}</a>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
<h1 id="{{ article.slug }}">{{ article.title }}</h1>
2019-07-18 10:43:36 +00:00
</header>
<div class="content">
2019-07-18 10:43:36 +00:00
{{ article.content }}
</div>
<div class="about">
{{ _('Posted on %(when)s (modified on %(mod)s) in %(category)s',
when=article.locale_date,
mod=article.locale_modified,
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
</div>
{% if 'GIT_SOURCE_BASE_URL' %}
<div class="source">
<a href="{{ article.path_source_link}}">
<img src={{ SOURCE_ICON_URL }} alt="source icon" ario>
source et documents
</a>
</div>
{% endif %}
<div class="tag-cloud">
<p>
{% if 'post_stats' in PLUGINS %}
&#8226; {{ article.stats['read_mins'] }} min read
{% endif %}
{% if article.tags %}
{% for tag in article.tags %}
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
{% endfor %}
{% endif %}
</p>
2019-07-18 10:43:36 +00:00
</div>
{% include "partial/neighbors.html" %}
{% 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 %}
</article>
{% endblock %}