-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathsingle.html
More file actions
102 lines (88 loc) · 3.88 KB
/
single.html
File metadata and controls
102 lines (88 loc) · 3.88 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{{ partial "default_head.html" . }}
<div class="row">
<div class="col-md-8">
<article class="post">
<header>
<div class="post-date">
<span class="glyphicon glyphicon-calendar"></span>
<time datetime="{{ .Date.Format .Site.Params.DateForm }}">
{{ .Date.Format .Site.Params.DateForm }}
</time>
</div>
<h1 class="post-title">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h1>
</header>
<div class="post-content">
{{ .Content }}
</div>
<aside>
{{ $baseurl := .Site.BaseURL }}
<ul class="list-inline post-tags">
{{ range .Params.tags }}
<li>
<a href="{{ $baseurl }}/tags/{{ . | urlize }}">
<i class="fa fa-tags"></i>
{{ . }}
</a>
</li>
{{ end }}
</ul>
{{ if .Site.Params.ShowRelatedPost }}
<!-- Related post. -->
<h3>Related Post</h3>
<ul class="post-rels">
{{ $page_link := .Permalink }}
{{ $tags := .Params.tags }}
{{ range .Site.Pages }}
{{ $page := . }}
{{ $has_common_tags := intersect $tags .Params.tags | len | lt 0 }}
{{ if and $has_common_tags (ne $page_link $page.Permalink) }}
<li><a href="{{ $page.Permalink }}">{{ $page.Title }}</a></li>
{{ end }}
{{ end }}
</ul>
</aside>
{{ end }}
<!-- Pagination. -->
<footer>
<nav>
<ul class="pager">
{{ if .Prev }}
<li class="previous"><a href="{{ .Prev.Permalink }}"><span aria-hidden="true">←</span> Older</a></li>
{{ else }}
<li class="previous disabled"><a href="#"><span aria-hidden="true">←</span> Older</a></li>
{{ end }}
<li><a href="{{ .Site.BaseURL }}/post">All Posts</a></li>
{{ if .Next }}
<li class="next"><a href="{{ .Next.Permalink }}">Newer <span aria-hidden="true">→</span></a></li>
{{ else }}
<li class="next disabled"><a href="#">Newer <span aria-hidden="true">→</span></a></li>
{{ end }}
</ul>
</nav>
{{ if isset .Site.Params "Disqus" }}
{{ if .Params.comments }}
<!-- disqus. -->
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '{{ .Site.Params.Disqus }}'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(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>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
{{ end }}
{{ end }}
</footer>
</article>
</div>
<div class="col-md-4">
{{ partial "sidebar.html" . }}
</div>
</div>
{{ partial "default_foot.html" . }}