Skip to content

Commit 87fa0cb

Browse files
committed
Adding single page index
1 parent 30a941e commit 87fa0cb

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

themes/whiteplain/layouts/index.html

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
2+
{{ define "main" }}
3+
<div class="main" role="main">
4+
<article class="article">
5+
{{ with .Params.image }}<img src="{{ . }}" class="article-image" />{{ end }}
6+
{{ with .Params.series }}<p class="article-title-series"><a href="{{ "/" | relURL }}series/{{ index . 0 | urlize }}/">{{ index . 0 }}</a>&nbsp;/</p>{{ end }}
7+
<h1 class="article-title">{{ .Title }}</h1>
8+
{{ with .Params.subtitle }}<h2 class="article-subtitle">{{ . }}</h2>{{ end }}
9+
<hr class="article-title-bottom">
10+
<ul class="article-meta">
11+
<li class="article-meta-date"><time>{{ .Date.Format (default "January 2, 2006" $.Site.Params.dateFormat) }}</time></li>
12+
{{- if .Params.categories }}
13+
{{- range .Params.categories }}
14+
<li class="article-meta-categories">
15+
<a href="{{ "/" | relURL }}categories/{{ . | urlize }}/">
16+
<i class="fa-solid fa-folder"></i>
17+
{{ . }}
18+
</a>&nbsp;
19+
</li>
20+
{{- end }}
21+
{{- end }}
22+
{{- if .Params.tags }}
23+
{{- range .Params.tags }}
24+
<li class="article-meta-tags">
25+
<a href="{{ "/" | relURL }}tags/{{ . | urlize }}/">
26+
<i class="fa-solid fa-tag"></i>
27+
{{ . }}
28+
</a>&nbsp;
29+
</li>
30+
{{- end }}
31+
{{- end }}
32+
</ul>
33+
{{ partial "toc.html" . }}
34+
{{ .Content }}
35+
</article>
36+
37+
{{- if .Params.series }}
38+
<section class="article-series">
39+
{{- $thispagefilepath := .File.Path }}
40+
{{- range .Params.series }}
41+
{{- $lseries := replaceRE "( |–)" "-" (lower .) }}
42+
<h2 class="series-title"><a href="{{ "/" | relURL }}series/{{ . | urlize }}/"><i class="fa-solid fa-book"></i>&nbsp;{{ . }}</a></h2>
43+
<ol reversed="reversed" class="series">
44+
{{- range (index $.Site.Taxonomies.series $lseries).Pages.ByDate.Reverse }}
45+
{{- if eq $thispagefilepath .File.Path }}
46+
<li class="active">{{ .LinkTitle }}</li>
47+
{{- else }}
48+
<li><a href="{{ .Permalink | relURL }}">{{ .LinkTitle }}</a></li>
49+
{{- end }}
50+
{{- end }}
51+
</ol>
52+
{{- end }}
53+
</section>
54+
{{- end }}
55+
56+
{{ partial "share.html" . }}
57+
58+
{{- if and .Site.DisqusShortname (or (not (isset .Params "comments")) (eq .Params.comments nil) .Params.comments) }}
59+
<div class="disqus-comments">
60+
{{ template "_internal/disqus.html" . }}
61+
</div>
62+
{{- end }}
63+
64+
<ul class="pager article-pager">
65+
{{- if .NextInSection }}
66+
<li class="pager-newer">
67+
<a href="{{ .NextInSection.Permalink | relURL }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title }}">&lt; Newer</a>
68+
</li>
69+
{{- else }}
70+
<li class="pager-newer pager-noitem">&lt; Newer</li>
71+
{{- end }}
72+
{{- if .PrevInSection }}
73+
<li class="pager-older">
74+
<a href="{{ .PrevInSection.Permalink | relURL }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title }}">Older &gt;</a>
75+
</li>
76+
{{- else }}
77+
<li class="pager-older pager-noitem">Older &gt;</li>
78+
{{- end }}
79+
</ul>
80+
</div>
81+
{{ end }}

0 commit comments

Comments
 (0)