Browse Source

replace disquis with local commento instance

Thomas Buck 1 year ago
parent
commit
0dbc6debec
1 changed files with 3 additions and 22 deletions
  1. 3
    22
      page.html

+ 3
- 22
page.html View File

@@ -115,13 +115,9 @@ else:
115 115
         {{ __content__ }}
116 116
         <hr>
117 117
         <!--%
118
-            # Disqus Comments (only show button to load afterwards)
118
+            # Comments
119 119
             if page.get("comments", "false") == "true":
120
-                print '<div style="text-align: center;">'
121
-                print '<button class="show-comments">Load Disqus comments</button>'
122
-                print '<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>'
123
-                print '</div>'
124
-                print '<div id="disqus_thread"></div>'
120
+                print '<div id="commento"></div>'
125 121
                 print '<hr>'
126 122
             elif page.get("comments", "false") != "false":
127 123
                 print '<div style="text-align: center;"><a href="%s">Head over here to discuss this article!</a></div>' % page.get("comments", "false")
@@ -145,23 +141,8 @@ else:
145 141
     </div>
146 142
     <script type="text/javascript" src="js/jquery.min.js"></script>
147 143
     <!--%
148
-        # Dynamically load Disqus comments after user requested it
149 144
         if page.get("comments", "false") == "true":
150
-            print '<script type="text/javascript">'
151
-            print 'var disqus_shortname = "xythobuz";'
152
-            print 'var disqus_identifier = "http://xythobuz.org/' + page["url"] + '";'
153
-            print 'var disqus_url = "http://xythobuz.org/' + page["url"] + '";'
154
-            print '$(document).ready(function() {'
155
-            print '$(".show-comments").on("click", function(){'
156
-            print '(function() {'
157
-            print 'var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async  = true;'
158
-            print 'dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";'
159
-            print '(document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]    ).appendChild(dsq);'
160
-            print '})();'
161
-            print '$(this).fadeOut();'
162
-            print '});'
163
-            print '});'
164
-            print '</script>'
145
+            print '<script defer src="https://comments.xythobuz.de/js/commento.js"></script>'
165 146
     %-->
166 147
     <script type="text/javascript">
167 148
         $(document).ready(function() {

Loading…
Cancel
Save