forked from hugo-toha/toha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
single.html
114 lines (103 loc) · 3.88 KB
/
single.html
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
103
104
105
106
107
108
109
110
111
112
113
114
{{ define "header" }}
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Title }}{{ end }}" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/atom-one-dark.min.css"
/>
<link rel="stylesheet" href="{{ "/css/layouts/single.css" | relURL }}"/>
<link rel="stylesheet" href="{{ "/css/navigators/sidebar.css" | relURL }}">
<!--================= custom style overrides =========================-->
<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}"/>
{{ end }}
{{ define "navbar" }}
{{ partial "navigators/navbar-2.html" . }}
{{ end }}
{{ define "sidebar" }}
<section class="sidebar-section" id="sidebar-section">
<div class="sidebar-holder">
<div class="sidebar" id="sidebar">
<form class="mx-auto" method="get" action="{{ "search" | relLangURL }}">
<input type="text" name="keyword" value="" placeholder="Search" data-search="" id="search-box" />
</form>
<div class="sidebar-tree">
<ul class="tree" id="tree">
<li id="list-heading"><a href="{{ "/posts" | relLangURL }}" data-filter="all">{{ i18n "posts" }}</a></li>
<div class="subtree">
{{ partial "navigators/sidebar.html" (dict "menuName" "sidebar" "menuItems" site.Menus.sidebar "ctx" .) }}
</div>
</ul>
</div>
</div>
</div>
</section>
{{ end }}
{{ define "content" }}
<section class="content-section" id="content-section">
<div class="content">
<div class="container p-0 read-area">
<!--Hero Area-->
<div class="hero-area col-sm-12" id="hero-area" style='background-image: url({{ strings.TrimSuffix "/" site.BaseURL }}{{ partial "helpers/get-hero.html" . }});'>
</div>
<!--Content Start-->
<div class="page-content">
<div class="author-profile ml-auto align-self-lg-center">
<img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . }}' alt="Author Image">
<h5 class="author-name">{{ partial "helpers/get-author-name.html" . }}</h5>
<p>{{ .Page.Date.Format "January 2, 2006" }}</p>
</div>
<div class="title">
<h1>{{ .Page.Title }}</h1>
</div>
<div class="post-content" id="post-content">
{{ .Page.Content }}
</div>
<!--- Improve this page button --->
{{ if site.Params.GitRepo }}
<div class="btn-improve-page">
<a href="{{ site.Params.GitRepo }}/edit/{{ site.Params.GitBranch }}/content/{{ .File.Path }}" title="{{ i18n "improve_this_page" }}" target="_blank" rel="noopener">
<i class="fas fa-code-branch"></i>
{{ i18n "improve_this_page" }}
</a>
</div>
{{ end }}
<!---Next and Previous Navigator -->
<hr />
{{ partial "navigators/next-prev-navigator.html" . }}
<hr />
<!-- Add Disqus forum -->
{{ if site.DisqusShortname }}
{{ partial "disqus.html" . }}
{{ end }}
</div>
</div>
</div>
<!--scroll back to top-->
<a id="scroll-to-top" class="btn"><i class="fas fa-chevron-circle-up"></i></a>
{{ if .IsTranslated }}
{{ partial "navigators/floating-lang-selector.html" . }}
{{ end }}
</section>
{{ end }}
{{ define "toc" }}
<section class="toc-section" id="toc-section">
{{ if site.Params.enableTOC }}
<div class="toc-holder">
<h5 class="text-center pl-3">{{ i18n "toc_heading" }}</h5>
<hr>
<div class="toc">
{{ .TableOfContents }}
</div>
</div>
{{ end }}
</section>
{{ end }}
{{ define "scripts" }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
<script src="{{ "/js/single.js" | relURL }}"></script>
<script>
hljs.initHighlightingOnLoad();
</script>
{{ if .Params.math }}
{{ partial "math.html" . }}
{{ end }}
{{ end }}