post.html 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. {% extends "/html/base.html" %}
  2. {%block subtitle %}: {{post.title}}{% endblock %}
  3. {% block content %}
  4. <div id="post">
  5. {% include "/html/post-content.html" %}
  6. <div id="prev-next">
  7. {% if post.prev %}
  8. <a href="{{post.prev.uri}}">&laquo; {{post.prev.title}}</a>
  9. {% endif %}
  10. {% if post.next %}
  11. <a class="right" href="{{post.next.uri}}">{{post.next.title}} &raquo;</a>
  12. {% endif %}
  13. </div>
  14. {% if disqus-shortname %}
  15. <div id="disqus_thread"></div>
  16. <script type="text/javascript">
  17. var disqus_config = function () {
  18. this.page.url = "{{site-url}}{{uri}}";
  19. this.page.identifier = "{{post.title}}";
  20. };
  21. (function() {
  22. var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
  23. dsq.src = '//{{disqus-shortname}}.disqus.com/embed.js';
  24. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  25. })();
  26. </script>
  27. {% endif %}
  28. </div>
  29. {% endblock %}