article.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {% extends "base.html" %}
  2. {% block html_lang %}{{ article.lang }}{% endblock %}
  3. {% block title %}{{ article.title|striptags }}{% endblock %}
  4. {% block extra_head %}
  5. {% import 'translations.html' as translations with context %}
  6. {% if translations.entry_hreflang(article) %}
  7. {{ translations.entry_hreflang(article) }}
  8. {% endif %}
  9. {% endblock %}
  10. {% block content %}
  11. <section id="content" class="body">
  12. <article>
  13. <header>
  14. <h1 class="entry-title">
  15. <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
  16. title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h1>
  17. {% include 'twitter.html' %}
  18. </header>
  19. <div class="entry-content">
  20. {% include 'article_infos.html' %}
  21. {{ article.content }}
  22. </div><!-- /.entry-content -->
  23. {% if DISQUS_SITENAME and SITEURL and article.status != "draft" %}
  24. <div class="comments">
  25. <h2>Comments !</h2>
  26. <div id="disqus_thread"></div>
  27. <script type="text/javascript">
  28. var disqus_shortname = '{{ DISQUS_SITENAME }}';
  29. var disqus_identifier = '{{ article.url }}';
  30. var disqus_url = '{{ SITEURL }}/{{ article.url }}';
  31. (function() {
  32. var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
  33. dsq.src = '//{{ DISQUS_SITENAME }}.disqus.com/embed.js';
  34. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  35. })();
  36. </script>
  37. <noscript>Please enable JavaScript to view the comments.</noscript>
  38. </div>
  39. {% endif %}
  40. </article>
  41. </section>
  42. {% endblock %}