-
Notifications
You must be signed in to change notification settings - Fork 4
/
post.liquid
44 lines (43 loc) · 1.56 KB
/
post.liquid
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
36
37
38
39
40
41
42
43
44
---
layout: "default"
---
{%-assign t = site.data.locale[page.lang].translation-%}
<p class="text-muted">
<span data-localize="news_at">{{ t.posted_on }}</span>
<time datetime="{{ page.date | datetime | date_to_xmlschema }}">
{{ page.date | date: page.date_fmt }}
</time>
{% if page.author %}
<span data-localize="news_by">by</span>
{{ page.author }}
{% endif %}
</p>
{{ content }}
{% if page.comments and site.disqus_shortname %}
<h2>{{ t.comments }}</h2>
<div id="disqus_thread"></div>
<noscript>Please enable JavaScript to view the comments.</noscript>
{% endif %}
<p class="text-center">
<a class="btn btn-lg btn-default" href="/news/archive/">
<i class="fa fa-calendar fa-fw"></i>
<span data-localize="news_archive">{{ t.news_archive }}</span>
</a>
</p>
{% if page.comments and site.disqus_shortname %}
<script type="text/javascript">
var disqus_shortname = "{{ site.disqus_shortname }}";
var disqus_identifier = "{{ page.id | escape }}";
var disqus_url = "{{ page.url | relative_url }}";
var e = document.createElement('div');
e.innerHTML = "{{ page.title | escape }}";
var disqus_title = e.childNodes[0].nodeValue;
(function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] ||
document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
{% endif %}