diff options
author | Tobias Schmidl <tobias.schmidl@corpuls.com> | 2018-05-11 12:46:39 +0200 |
---|---|---|
committer | Tobias Schmidl <tobias.schmidl@corpuls.com> | 2018-05-11 12:46:39 +0200 |
commit | 2ba901d67bfef24d1c6066dfb11f683baca06db2 (patch) | |
tree | ba040003594616d56c774262a64ce43b1e8d9d1f /Just-Read | |
parent | 2d078b7f4b0a73ffb2d1bb4dfd43997484411dff (diff) | |
download | pelican-themes-2ba901d67bfef24d1c6066dfb11f683baca06db2.tar.gz |
Just Read: Replaced disqus code with new version from disqus.com
Diffstat (limited to 'Just-Read')
-rw-r--r-- | Just-Read/templates/article.html | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/Just-Read/templates/article.html b/Just-Read/templates/article.html index 1539b78..038eb3b 100644 --- a/Just-Read/templates/article.html +++ b/Just-Read/templates/article.html @@ -6,25 +6,31 @@ <div class="post wrapper"> <h1>{{ article.title }}</h1> {{ article.content }} - + <a href="https://twitter.com/share" class="twitter-share-button" data-via="{{ TWITTER_USERNAME }}" data-lang="en" data-size="large" data-related="{{ TWITTER_USERNAME }}">Tweet</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> {% if DISQUS_SITENAME %} <div class="comments"> - <h2>Comments !</h2> - <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 = 'https://{{ DISQUS_SITENAME }}.disqus.com/embed.js'; - (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); - })(); - </script> + <h2>Comments !</h2> + <div id="disqus_thread"></div> + <script> + var disqus_config = function () { + this.page.url = "{{ SITEURL }}/{{ article.url }}"; + this.page.identifier = "{{ article.slug }}"; + this.page.title = "{{ article.title }}"; + }; + (function() { + var d = document, + s = d.createElement('script'); + s.src = 'https://{{ DISQUS_SITENAME }}.disqus.com/embed.js'; + s.setAttribute('data-timestamp', +new Date()); + (d.head || d.body).appendChild(s); + })(); + </script> + <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> </div> - {% endif %} + {% endif %} </div> - {% include 'metadata.html' %} </article> </div> |