diff options
-rw-r--r-- | bootlex/templates/article.html | 15 | ||||
-rw-r--r-- | bootlex/templates/base.html | 16 | ||||
-rw-r--r-- | bootlex/templates/index.html | 7 |
3 files changed, 37 insertions, 1 deletions
diff --git a/bootlex/templates/article.html b/bootlex/templates/article.html index 18ba9a3..d2cfda6 100644 --- a/bootlex/templates/article.html +++ b/bootlex/templates/article.html @@ -9,5 +9,20 @@ <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> + {% 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..c45a57a 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="span4"> + {% if DISQUS_SITENAME %} + <a class="btn btn-small disabled" href="{{ SITEURL }}{{ article.url }}#disqus_thread"></a> + {% endif %} + </div> + <div class="span1 offset3"> <a class="btn btn-small" href="{{ SITEURL }}{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">Mehr</a> </div> </div> |