{% 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(250)|escape }}{% endblock %}

{% block subheader %}
<p>Posted
{% if article.author %}
 by{% if AUTHORS_URL %}
 <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
{% else %}
 {{ article.author}}
{% endif %}
{% endif %}
on {{ article.locale_date }}</p>
{% endblock %}

{% block content %}
<article>
  <div class="article_title">
    <h1><a href="{{ SITEURL }}/{{ article.url }}" class="nohover">{{ article.title }}</a></h1>
  </div>
  <div class="article_text">
    {{ article.content }}
  </div>
  <div class="article_meta">
    {% if CATEGORY_URL %}
    <p>Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></p>
    {% endif %}
    {% if TAG_URL and article.tags %}
    <p>Tags:
      {% for tag in article.tags %}
      <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %}
      {% endfor %}
    </p>
    {% endif %}
    {% if DISQUS_SITENAME %}
      {% if COLLAPSE_COMMENTS %}
      <p>Comments: <a href="#" onclick="javascript:toggleComments();return false;">toggle</a></p>
      {% endif %}
    {% endif %}
  </div>

  {% if DISQUS_SITENAME %}

    {% if COLLAPSE_COMMENTS %}
    <script language="javascript">
        function toggleComments() {
            var commentDiv = document.getElementById("article_comments");
            (commentDiv.style.display == "none") ? commentDiv.style.display = "block" : commentDiv.style.display = "none";
            return false;
        }
    </script>
    {% endif %}
    <div id="article_comments" style="display:{%if COLLAPSE_COMMENTS %}none{% else %}block{% endif %}">
        <div id="disqus_thread"></div>
        <script type="text/javascript">
           var disqus_identifier = "{{ 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 <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    </div>
    {% endif %}
</article>
{% endblock %}

