{% 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 }} | {{ SITENAME }}{% 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 = 'http://{{ 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 %}

