Skip to content

Commit e4cbda9

Browse files
committed
docs: cleanup
1 parent 351d38d commit e4cbda9

File tree

6 files changed

+40
-36
lines changed

6 files changed

+40
-36
lines changed

main.go

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,6 @@ func main() {
4545
pdocs.AnchorTagSitemap("How do I download files"),
4646
},
4747
},
48-
{
49-
Text: "pico+",
50-
Href: "/plus",
51-
Page: pager("plus.md"),
52-
Tag: "pico+",
53-
Hidden: true,
54-
},
55-
{
56-
Text: "Join",
57-
Href: "/join",
58-
Page: pager("plus-join.md"),
59-
Tag: "pico+",
60-
Hidden: true,
61-
},
6248
{
6349
Text: "Custom domains",
6450
Href: "/custom-domains",
@@ -133,6 +119,12 @@ func main() {
133119
pdocs.AnchorTagSitemap("Can I fetch Reddit RSS feeds"),
134120
},
135121
},
122+
{
123+
Text: "pico+",
124+
Href: "/plus",
125+
Page: pager("plus.md"),
126+
Tag: "pico+",
127+
},
136128
{
137129
Text: "Images",
138130
Href: "/images",
@@ -213,6 +205,12 @@ func main() {
213205
Page: pager("privacy.md"),
214206
Tag: "About",
215207
},
208+
{
209+
Text: "Join",
210+
Href: "/join",
211+
Page: pager("plus-join.md"),
212+
Tag: "pico+",
213+
},
216214
},
217215
}
218216

tmpl/join.page.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@
113113
</p>
114114
</div>
115115
</div>
116+
117+
{{template "pager" .}}
116118
</main>
117119

118120
{{template "sitemap-footer" .}}

tmpl/pager.partial.tmpl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{{ define "pager" }}
2+
<div class="flex justify-between gap-2 my-4">
3+
{{if .Prev}}
4+
<div class="pager max-w-half flex items-center">
5+
<div class="flex flex-col items-start">
6+
<div class="text-sm font-grey-light">&lt;&lt; PREV</div>
7+
<a href="{{.Prev.GenHref}}" class="text-xl link-alt-adj">{{.Prev.Text}}</a>
8+
</div>
9+
</div>
10+
{{end}}
11+
12+
{{if .Next}}
13+
<div class="pager max-w-half flex items-center justify-end">
14+
<div class="flex flex-col items-end">
15+
<div class="text-sm font-grey-light">
16+
NEXT &gt;&gt;
17+
</div>
18+
<a href="{{.Next.GenHref}}" class="text-xl align-right link-alt-adj">{{.Next.Text}}</a>
19+
</div>
20+
</div>
21+
{{end}}
22+
</div>
23+
{{end}}

tmpl/plus.page.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
</article>
5959
</div>
6060

61+
{{template "pager" .}}
62+
6163
<hr class="my-4" />
6264

6365
{{template "footer" .}}

tmpl/post.page.tmpl

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,7 @@
1919
{{.Data.Html}}
2020
</article>
2121

22-
<div class="flex justify-between gap-2 my-4">
23-
{{if .Prev}}
24-
<div class="pager max-w-half flex items-center">
25-
<div class="flex flex-col items-start">
26-
<div class="text-sm font-grey-light">&lt;&lt; PREV</div>
27-
<a href="{{.Prev.GenHref}}" class="text-xl link-alt-adj">{{.Prev.Text}}</a>
28-
</div>
29-
</div>
30-
{{end}}
31-
32-
{{if .Next}}
33-
<div class="pager max-w-half flex items-center justify-end">
34-
<div class="flex flex-col items-end">
35-
<div class="text-sm font-grey-light">
36-
NEXT &gt;&gt;
37-
</div>
38-
<a href="{{.Next.GenHref}}" class="text-xl align-right link-alt-adj">{{.Next.Text}}</a>
39-
</div>
40-
</div>
41-
{{end}}
42-
</div>
22+
{{template "pager" .}}
4323
</main>
4424

4525
{{template "sitemap-footer" .}}

tmpl/sitemap-footer.partial.tmpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{{define "sitemap-footer"}}
22
<div class="sitemap text-sm mb-4 text-center">
33
{{range .Sitemap.Children -}}
4-
{{if .Hidden}}{{continue}}{{end}}
54
<div>
65
{{- if (and $.Prev (eq $.Prev.GenHref .GenHref)) -}}
76
<a href="{{.GenHref}}" class="link-alt-adj">{{.Text}}</a>

0 commit comments

Comments
 (0)