{#
    template/page.html
    ~~~~~~~~~~~~~~~~~~

    Template for posts.
#}
{%- extends "layout.html" %}

{%- block extrahead %}
  {{ super() }}
  {% if atom_feed %}
  <link rel="alternate" type="application/atom+xml"  href="{{ pathto(feed_path, 1) }}/atom.xml" title="{{ ablog.blog_title }}">
  {% endif %}
  {% if ablog.fontawesome_link_cdn%}
  <link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet">
  {% elif ablog.fontawesome_css_file %}
  <link rel="stylesheet" href="{{ pathto('_static/' + ablog.fontawesome_css_file, 1) }}" type="text/css" />
  {% endif %}
{% endblock %}

{% block body %}
  {{ body }}
  <div class="section">
  {% if pagename in ablog %}
    {% include "postnavy.html" %}
  {% endif %}
  {% if ablog.disqus_shortname and ((pagename in ablog and (ablog[pagename].published or ablog.disqus_drafts)) or (not pagename in ablog and ablog.disqus_pages)) %}
    <div class="section">
    <h2>Comments</h2>
    <div id="disqus_thread"></div>
    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = '{{ ablog.disqus_shortname }}'; // required: replace example with your forum shortname
        var disqus_identifier = '{{ablog.page_id(pagename)}}';
        var disqus_title = '{{title}}';
        var disqus_url = '{{ablog.page_url(pagename)}}';
        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.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>
    <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
    </div>
  {% endif %}
  </div>
{% endblock %}
