From db33539d12f50e6c616178ffdf2e51b10b155002 Mon Sep 17 00:00:00 2001 From: Anton Smirnov Date: Sat, 1 May 2021 03:32:43 +0300 Subject: [PATCH] erb -> haml --- source/_disqus.erb | 17 ----------------- source/_disqus.haml | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 17 deletions(-) delete mode 100644 source/_disqus.erb create mode 100644 source/_disqus.haml diff --git a/source/_disqus.erb b/source/_disqus.erb deleted file mode 100644 index bdb7f64..0000000 --- a/source/_disqus.erb +++ /dev/null @@ -1,17 +0,0 @@ -<% if config[:disqus] %> -
- - - -<% end %> diff --git a/source/_disqus.haml b/source/_disqus.haml new file mode 100644 index 0000000..f6aaa74 --- /dev/null +++ b/source/_disqus.haml @@ -0,0 +1,15 @@ +- if config[:disqus] + #disqus_thread + :javascript + var disqus_config = function () { + this.page.url = '#{ config[:host] }#{ current_page.url }'; + this.page.identifier = '#{ config[:host] }#{ current_page.url }'; + }; + (function() { // DON'T EDIT BELOW THIS LINE + var d = document, s = d.createElement('script'); + s.src = 'https://freedomainzones.disqus.com/embed.js'; + s.setAttribute('data-timestamp', +new Date()); + (d.head || d.body).appendChild(s); + })(); + %noscript Please enable JavaScript to view the #{ link_to 'comments powered by Disqus', 'https://disqus.com/?ref_noscript' }. + %script#dsq-count-scr{ src: '//freedomainzones.disqus.com/count.js', async: true }