diff options
author | Alexander Jung-Loddenkemper <alexander.julo@googlemail.com> | 2012-04-03 21:25:10 +0200 |
---|---|---|
committer | Alexander Jung-Loddenkemper <alexander.julo@googlemail.com> | 2012-04-03 21:25:10 +0200 |
commit | 0d872988b66675657a13682acf78fcaccbb5e170 (patch) | |
tree | ee2fe50bfa4dc8cad829981bb440366270435629 /bootlex | |
parent | 7dc4d494bd4a5dc5f81a0d2819bdedbcba4367b5 (diff) | |
download | pelican-themes-0d872988b66675657a13682acf78fcaccbb5e170.zip pelican-themes-0d872988b66675657a13682acf78fcaccbb5e170.tar.gz pelican-themes-0d872988b66675657a13682acf78fcaccbb5e170.tar.bz2 |
Bootlex now supports disqus
Diffstat (limited to 'bootlex')
-rw-r--r-- | bootlex/templates/article.html | 16 | ||||
-rw-r--r-- | bootlex/templates/base.html | 16 | ||||
-rw-r--r-- | bootlex/templates/index.html | 7 |
3 files changed, 38 insertions, 1 deletions
diff --git a/bootlex/templates/article.html b/bootlex/templates/article.html index 18ba9a3..7903f61 100644 --- a/bootlex/templates/article.html +++ b/bootlex/templates/article.html @@ -9,5 +9,21 @@ <div class="entry-content"> {{ article.content }} </div><!-- /.entry-content --> + {% if DISQUS_SITENAME %} + <div id="disqus_thread"></div> + <script type="text/javascript"> + /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ + var disqus_shortname = '{{ DISQUS_SITENAME }}'; // required: replace example with your forum shortname + + /* * * DON'T EDIT BELOW THIS LINE * * */ + (function() { + var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; + dsq.src = 'http://' + 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">blog comments powered by <span class="logo-disqus">Disqus</span></a> + {% endif %} </div> {% endblock %} diff --git a/bootlex/templates/base.html b/bootlex/templates/base.html index 711bda6..95629dd 100644 --- a/bootlex/templates/base.html +++ b/bootlex/templates/base.html @@ -67,5 +67,21 @@ </div><!-- /#contentinfo --> </div> </div> + + {% if DISQUS_SITENAME %} + <script type="text/javascript"> + /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ + var disqus_shortname = '{{ DISQUS_SITENAME }}'; // required: replace example with your forum shortname + + /* * * DON'T EDIT BELOW THIS LINE * * */ + (function () { + var s = document.createElement('script'); s.async = true; + s.type = 'text/javascript'; + s.src = 'http://' + disqus_shortname + '.disqus.com/count.js'; + (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); + }()); + </script> + {% endif %} + </body> </html> diff --git a/bootlex/templates/index.html b/bootlex/templates/index.html index 02ff0ee..2a3d570 100644 --- a/bootlex/templates/index.html +++ b/bootlex/templates/index.html @@ -18,7 +18,12 @@ {{ article.summary }} </div><!-- /.entry-content --> <div class="row"> - <div class="span1 offset7"> + <div class="span2"> + {% if DISQUS_SITENAME %} + <a class="btn btn-small disabled" href="{{ SITEURL }}{{ article.url }}#disqus_thread"></a> + {% endif %} + </div> + <div class="span1 offset5"> <a class="btn btn-small" href="{{ SITEURL }}{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">Mehr</a> </div> </div> |