2014-12-10 17:17:48 +00:00
|
|
|
{% extends "base.html" %}
|
2015-11-25 22:12:18 +00:00
|
|
|
{% block title %}{{ article.title }}{% endblock %}
|
2014-12-10 17:17:48 +00:00
|
|
|
|
|
|
|
{% block head %}
|
|
|
|
{{ super() }}
|
|
|
|
|
|
|
|
{% for keyword in article.keywords %}
|
2016-02-12 13:17:34 +00:00
|
|
|
<meta name="keywords" content="{{keyword}}" >
|
2014-12-10 17:17:48 +00:00
|
|
|
{% endfor %}
|
|
|
|
|
2016-02-12 13:17:34 +00:00
|
|
|
{% if description %}
|
|
|
|
<meta name="description" content="{{ description }}">
|
|
|
|
{% elif article.headline %}
|
|
|
|
<meta name="description" content="{{ article.headline }}">
|
|
|
|
{% elif article.summary %}
|
|
|
|
<meta name="description" content="{{ article.summary|striptags|truncate(140) }}">
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% for author in article.authors %}
|
|
|
|
<meta name="author" content="{{ author }}">
|
2014-12-10 17:17:48 +00:00
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% for tag in article.tags %}
|
2016-02-12 13:17:34 +00:00
|
|
|
<meta name="tags" content="{{tag}}">
|
2014-12-10 17:17:48 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|
|
|
|
|
2016-02-06 17:14:41 +00:00
|
|
|
{% block twitter_card %}
|
2016-03-31 20:11:12 +00:00
|
|
|
{% for name,link in SOCIAL if name in ['twitter'] %}
|
|
|
|
<meta name="twitter:card" content="summary_large_image">
|
|
|
|
<meta name="twitter:site" content="@{{ link|replace('http://', 'https://')|replace('https://twitter.com/', '') }}">
|
|
|
|
<meta name="twitter:title" content="{{ article.title }}">
|
|
|
|
|
|
|
|
{% if article.twitter_image %}
|
|
|
|
{% if article.twitter_image|lower|truncate(4, True, '') == "http" %}
|
|
|
|
<meta property="twitter:image" content="{{ article.twitter_image }}">
|
|
|
|
{% else %}
|
|
|
|
<meta property="twitter:image" content="{{ SITEURL }}/{{ article.twitter_image }}">
|
|
|
|
{% endif %}
|
|
|
|
{% elif article.header_cover %}
|
|
|
|
<meta name="twitter:image" content="{{ SITEURL }}/{{ article.header_cover }}">
|
2016-02-06 17:14:41 +00:00
|
|
|
{% elif HEADER_COVER %}
|
2016-03-31 20:11:12 +00:00
|
|
|
<meta name="twitter:image" content="{{ SITEURL }}/{{ HEADER_COVER }}">
|
2016-02-06 17:14:41 +00:00
|
|
|
{% else %}
|
|
|
|
<meta name="twitter:image" content="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/post-bg.jpg">
|
|
|
|
{% endif %}
|
2016-03-31 20:11:12 +00:00
|
|
|
|
2016-02-06 17:14:41 +00:00
|
|
|
{% if description %}
|
2016-03-31 20:11:12 +00:00
|
|
|
<meta name="twitter:description" content="{{ description }}">
|
2016-02-06 17:14:41 +00:00
|
|
|
{% elif article.headline %}
|
2016-03-31 20:11:12 +00:00
|
|
|
<meta name="twitter:description" content="{{ article.headline }}">
|
2016-02-06 17:14:41 +00:00
|
|
|
{% else %}
|
2016-03-31 20:11:12 +00:00
|
|
|
<meta name="twitter:description" content="{{ article.summary|striptags|truncate(140) }}">
|
2016-02-06 17:14:41 +00:00
|
|
|
{% endif %}
|
2016-03-31 20:11:12 +00:00
|
|
|
{% endfor %}
|
2016-02-06 17:14:41 +00:00
|
|
|
{% endblock %}
|
2015-09-05 02:14:31 +00:00
|
|
|
{% block opengraph %}
|
|
|
|
{{ super() }}
|
|
|
|
<meta property="og:type" content="article">
|
2016-02-12 13:17:34 +00:00
|
|
|
{% for author in article.authors %}
|
2016-03-31 20:55:19 +00:00
|
|
|
<meta property="article:author" content="{{ SITEURL }}/{{ author.url }}">
|
2016-02-12 13:17:34 +00:00
|
|
|
{% endfor %}
|
2015-09-05 02:14:31 +00:00
|
|
|
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}">
|
|
|
|
<meta property="og:title" content="{{ article.title }}">
|
|
|
|
<meta property="article:published_time" content="{{ article.date }}">
|
2016-02-12 13:17:34 +00:00
|
|
|
{% if description %}
|
|
|
|
<meta property="og:description" content="{{ description }}">
|
|
|
|
{% elif article.headline %}
|
|
|
|
<meta property="og:description" content="{{ article.headline }}">
|
|
|
|
{% elif article.summary %}
|
|
|
|
<meta property="og:description" content="{{ article.summary|striptags|truncate(140) }}">
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if article.og_image %}
|
|
|
|
{% if article.og_image|lower|truncate(4, True, '') == "http" %}
|
|
|
|
<meta property="og:image" content="{{ article.og_image }}">
|
|
|
|
{% else %}
|
|
|
|
<meta property="og:image" content="{{ SITEURL }}/{{ article.og_image }}">
|
|
|
|
{% endif %}
|
|
|
|
{% elif article.header_cover %}
|
|
|
|
<meta property="og:image" content="{{ SITEURL }}/{{ article.header_cover }}">
|
|
|
|
{% elif HEADER_COVER %}
|
|
|
|
<meta property="og:image" content="{{ SITEURL }}/{{ HEADER_COVER }}">
|
|
|
|
{% else %}
|
|
|
|
<meta property="og:image" content="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/post-bg.jpg">
|
|
|
|
{% endif %}
|
2015-09-05 02:14:31 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2014-12-10 17:17:48 +00:00
|
|
|
{% block header %}
|
|
|
|
<!-- Page Header -->
|
2014-12-10 17:49:06 +00:00
|
|
|
{% if article.header_cover %}
|
|
|
|
<header class="intro-header" style="background-image: url('{{ article.header_cover }}')">
|
2015-11-25 22:12:18 +00:00
|
|
|
{% elif HEADER_COVER %}
|
|
|
|
<header class="intro-header" style="background-image: url('{{ HEADER_COVER }}')">
|
2016-02-14 23:45:19 +00:00
|
|
|
{% elif HEADER_COLOR %}
|
|
|
|
<header class="intro-header" style="background-color: {{ HEADER_COLOR }}">
|
2014-12-10 17:49:06 +00:00
|
|
|
{% else %}
|
|
|
|
<header class="intro-header" style="background-image: url('{{ SITEURL }}/{{ THEME_STATIC_DIR }}/images/post-bg.jpg')">
|
|
|
|
{% endif %}
|
2014-12-10 17:17:48 +00:00
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
|
|
|
<div class="post-heading">
|
|
|
|
<h1>{{ article.title }}</h1>
|
2014-12-10 18:00:35 +00:00
|
|
|
{% if article.headline %}
|
|
|
|
<h3 class="subheading">{{ article.headline }}</h3>
|
|
|
|
{% endif %}
|
2014-12-10 17:17:48 +00:00
|
|
|
<span class="meta">Posted by
|
|
|
|
{% for author in article.authors %}
|
|
|
|
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
|
|
|
|
{% endfor %}
|
|
|
|
on {{ article.locale_date }}
|
|
|
|
</span>
|
2016-01-16 20:16:09 +00:00
|
|
|
{% if article.modified %}
|
|
|
|
<span class="meta">Updated on {{ article.locale_modified }}</span>
|
|
|
|
{% endif %}
|
2014-12-10 17:17:48 +00:00
|
|
|
{% import 'translations.html' as translations with context %}
|
|
|
|
{{ translations.translations_for(article) }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
{% endblock header %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<!-- Post Content -->
|
|
|
|
<article>
|
|
|
|
{{ article.content }}
|
|
|
|
</article>
|
|
|
|
|
2015-11-25 22:12:18 +00:00
|
|
|
{% if article.tags %}
|
|
|
|
<div class="tags">
|
2016-04-12 17:42:59 +00:00
|
|
|
<p>tags: {% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag | escape }}</a>{% if not loop.last %}, {% endif %}{% endfor %}</p>
|
2015-11-25 22:12:18 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2016-01-17 15:07:27 +00:00
|
|
|
{% include 'sharing.html' %}
|
2014-12-10 17:17:48 +00:00
|
|
|
<hr>
|
2014-12-10 20:59:23 +00:00
|
|
|
|
|
|
|
{% if DISQUS_SITENAME and SITEURL and article.status != "draft" %}
|
|
|
|
<div class="comments">
|
|
|
|
<h2>Comments !</h2>
|
|
|
|
<div id="disqus_thread"></div>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var disqus_shortname = '{{ DISQUS_SITENAME }}';
|
2016-09-11 04:09:53 +00:00
|
|
|
{% if article.disqus_identifier %}
|
|
|
|
var disqus_identifier = '{{ article.disqus_identifier }}';
|
|
|
|
{% else %}
|
|
|
|
var disqus_identifier = '/{{ article.url }}';
|
|
|
|
{% endif %}
|
2014-12-10 20:59:23 +00:00
|
|
|
var disqus_url = '{{ SITEURL }}/{{ article.url }}';
|
|
|
|
(function() {
|
|
|
|
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
|
|
|
dsq.src = '//{{ DISQUS_SITENAME }}.disqus.com/embed.js';
|
|
|
|
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
<noscript>Please enable JavaScript to view the comments.</noscript>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2014-12-10 17:17:48 +00:00
|
|
|
{% endblock content %}
|