blog-post.html 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. {% extends "base.html" %}
  2. {% block content %}
  3. <h2>{{ post.title }}</h2>
  4. <small class="centered">{{ post.date }}</small>
  5. {{ post.html|safe }}
  6. {{ post.comment }}
  7. {% if post.comment %}
  8. <div id="disqus_thread" style="border: solid 1px #aaa; margin: 40px 0;padding: 10px;"></div>
  9. <script>
  10. var disqus_shortname = 'browserupdateorg'; // required: replace example with your forum shortname
  11. var disqus_identifier = '{{ post.comment }}';
  12. var disqus_url = 'https://browser-update.org{{ url_for('post', name=post.path.replace('posts/', '')) }}';
  13. (function () {
  14. var dsq = document.createElement('script');
  15. dsq.type = 'text/javascript';
  16. dsq.async = true;
  17. dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
  18. (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
  19. })();
  20. </script>
  21. {% endif %}
  22. {% endblock %}