{% extends "base.html" %}
{% block head %}
<meta name="keywords" content="
  {%- if GLOBAL_KEYWORDS -%}
    {{ GLOBAL_KEYWORDS|join(', ') }}
    {%- if article.tags -%}{{', '}}{%- endif -%}
  {%- endif -%}
  {{article.tags|join(', ') }}">
{% endblock %}

{% block title %}{{ article.title|striptags|escape }} | {{ SITENAME }}{% endblock %}
{% block description %}{{ article.title|striptags|escape }} | {{ article.content|striptags|truncate(154-article.title|length)|escape }}{% endblock %}

{% block content %}
<article>
  {% if DISPLAY_META_ABOVE_ARTICLE %}
    {% include "modules/article_meta.html" %}
  {% endif %}
  <div class="article_title">
    <h1><a href="{{ SITEURL }}/{{ article.url }}" class="nohover">{{ article.title }}</a></h1>
  </div>
  <div class="article_text">
    {{ article.content }}
  </div>
  {% if not DISPLAY_META_ABOVE_ARTICLE %}
    {% include "modules/article_meta.html" %}
  {% endif %}

  {% if DISQUS_SITENAME %}
  <div id="article_comments">
    <div id="disqus_thread">
      {% if DISQUS_COLLAPSED %}
      <a href="javascript:loadDisqus()"><i class="fa fa-comments fa-lg"></i>Click to load <span class="disqus-comment-count" data-disqus-identifier="{{ article.url }}">comments</span></a>
      {% endif %}
    </div>
  </div>

  <script id="dsq-count-scr" src="https://{{ DISQUS_SITENAME }}.disqus.com/count.js" async></script>
  <script type="text/javascript">
    var disqus_config = function () {
        this.page.identifier = "{{ article.url }}";
        this.page.title = "{{ article.title }}";
    };
    loadDisqus = function(sitename) {
      var d = document, s = d.createElement('script');
      s.src = 'https://{{ DISQUS_SITENAME }}.disqus.com/embed.js';
      s.setAttribute('data-timestamp', +new Date());
      (d.head || d.body).appendChild(s);
    };
    {% if not DISQUS_COLLAPSED %}
    loadDisqus();
    {% endif %}
  </script>
  {% endif %}
</article>
{% endblock %}

{% block scripts %}
{{ super() }}
{% if FUZZY_DATES %}
<script type="text/javascript">window.addEventListener("load", lw_timeago);</script>
{% endif %}
{% endblock %}
