aboutsummaryrefslogtreecommitdiff
path: root/theme
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2015-03-19 22:42:40 +0100
committerSébastien Dailly <sebastien@chimrod.com>2015-03-19 22:42:40 +0100
commite90c342c6b3487840f0b7067fd2ed04678d00db3 (patch)
treeb27c61028e350e85170b5a3b13cf77188c24da4e /theme
parent0ad73de1d89956739738716f2d32652ca83164b5 (diff)
Do not load disqus comment automaticaly
Diffstat (limited to 'theme')
-rwxr-xr-xtheme/static/css/main.css39
-rwxr-xr-xtheme/templates/article.html23
2 files changed, 54 insertions, 8 deletions
diff --git a/theme/static/css/main.css b/theme/static/css/main.css
index 7851ed8..d10ef1f 100755
--- a/theme/static/css/main.css
+++ b/theme/static/css/main.css
@@ -339,4 +339,43 @@ img.center {
margin-right: auto;
}
+#disqus_comments {
+ text-align: center;
+}
+
+/* BUTTONS */ button{
+ margin:0 7px 0 0;
+ background-color:#f5f5f5;
+ border:1px solid #dedede;
+ border-top:1px solid #eee;
+ border-left:1px solid #eee; font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
+ font-size:100%;
+ line-height:130%;
+ text-decoration:none;
+ font-weight:bold;
+ color:#565656;
+ cursor:pointer;
+ padding:5px 10px 6px 7px; /* Links */
+}
+button{
+ width:auto;
+ overflow:visible;
+ padding:4px 10px 3px 7px; /* IE6 */
+}
+button[type]{
+ padding:5px 10px 5px 7px; /* Firefox */
+ line-height:17px; /* Safari */
+}
+*:first-child+html button[type]{
+ padding:4px 10px 3px 7px; /* IE7 */
+}
+button img, .buttons a img{
+ margin:0 3px -3px 0 !important;
+ padding:0;
+ border:none;
+ width:16px;
+ height:16px;
+}
+
+
.clear { clear:both; }
diff --git a/theme/templates/article.html b/theme/templates/article.html
index 976041a..5b366e0 100755
--- a/theme/templates/article.html
+++ b/theme/templates/article.html
@@ -64,15 +64,22 @@
</ul>
{% endif %}
</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 = '//{{ DISQUS_SITENAME }}.disqus.com/embed.js';
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
- })();
- </script>
</div>
+ <div id="disqus_comments">
+ <button onclick="load_disqus()">recharger</button>
+ </div>
+ <script type="text/javascript">
+ var disqus_identifier = "{{ article.url }}";
+ function load_disqus() {
+ var dsq = document.createElement('script');
+ dsq.type = 'text/javascript';
+ dsq.async = true;
+ dsq.src = '//{{ DISQUS_SITENAME }}.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ var load_button = document.getElementById('disqus_comments');
+ load_button.parentNode.removeChild(load_button);
+ };
+ </script>
{% endif %}
{% endblock %}