forked from iluwatar/java-design-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisqus.html
More file actions
35 lines (31 loc) · 1.33 KB
/
disqus.html
File metadata and controls
35 lines (31 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!-- Template for disqus comments anywhere -->
{% if site.disqus_shortname %}
<hr class="dashed">
<div class="disqus-container" >
<!-- An element a visitor can click if they <3 comments! -->
<button class="show-comments btn btn-primary"><i class="fa fa-comments" aria-hidden="true"></i> Load Disqus comments</button>
<!-- The empty element required for Disqus to loads comments into -->
<div id="disqus_thread"></div>
<!-- Add Disqus comments (not comment count) -->
<script type="text/javascript">
$(document).ready(function() {
$('.show-comments').on('click', function() {
var disqus_shortname = '{{ site.disqus_shortname }}';
var disqus_identifier = '{{ page.url }}';
var disqus_title = '{{ page.title }}';
var disqus_url = '{{ site.url }}{{ site.baseurl }}{{ page.url }}';
$.ajax({
type: "GET",
url: "http://" + disqus_shortname + ".disqus.com/embed.js",
dataType: "script",
cache: true
});
$(this).fadeOut();
});
});
</script>
<noscript>
Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
</noscript>
</div>
{% endif %}