Updating theme - version 4.0.0 - fonts, conditional comments, prev & next posts,...
[ghost-theme-willow.git] / partials / comments.hbs
index 33f74b9bc380aea159e394ba4237168c9511bf33..43cb771d49350ae1e3f4244b039236ab69e9c40b 100644 (file)
@@ -1,13 +1,21 @@
 <div class="c-disqus-comments">
-    {{! Replace Code From Here }}
-    <div id="disqus_thread"></div>
+    <div id="disqus_thread">
+        <a class="c-disqus-comments__button" onclick="WillowGhostTheme.loadDisqusComments();">
+            Load Comments
+        </a>
+    </div>
     <script>
-        (function() {
-            var d = document, s = d.createElement('script');
-            s.src = '//yourssite.disqus.com/embed.js';
-            s.setAttribute('data-timestamp', +new Date());
-            (d.head || d.body).appendChild(s);
-        })();
+        var WillowGhostTheme = {
+            loadDisqusComments: function () {
+                {{! Replace Code From Here }}
+
+                var d = document, s = d.createElement('script');
+                s.src = '//yourssite.disqus.com/embed.js';
+                s.setAttribute('data-timestamp', +new Date());
+                (d.head || d.body).appendChild(s);
+
+                {{! Replace Code Until Here }}
+            }
+        };
     </script>
-    {{! Replace Code Until Here }}
 </div>
\ No newline at end of file