Skip to content

Commit

Permalink
style: sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
neurosnap committed May 14, 2024
1 parent 7895e32 commit 11c1a10
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 20 deletions.
32 changes: 14 additions & 18 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,6 @@ func main() {
Page: pager("imgs.md"),
Tag: "Services",
},
{
Text: "pico+",
Href: "/plus",
Page: pager("plus.md"),
Tag: "pico+",
},
{
Text: "Images",
Href: "/images",
Expand All @@ -164,15 +158,17 @@ func main() {
Tag: "Community",
},
{
Text: "API Tokens",
Href: "/api-token",
Page: pager("api-token.md"),
Children: []*pdocs.Sitemap{
pdocs.AnchorTagSitemap("Web"),
pdocs.AnchorTagSitemap("Senpai"),
pdocs.AnchorTagSitemap("Connect to Libera"),
},
Tag: "Help",
Text: "API Tokens",
Href: "/api-token",
Page: pager("api-token.md"),
Children: []*pdocs.Sitemap{},
Tag: "Help",
},
{
Text: "pico+",
Href: "/plus",
Page: pager("plus.md"),
Tag: "About",
},
{
Text: "FAQ",
Expand All @@ -198,19 +194,19 @@ func main() {
Text: "Web Tunnels",
Href: "/tunnels",
Page: pager("tunnels.md"),
Tag: "Lab",
Tag: "X",
},
{
Text: "Lab",
Href: "/lab",
Page: pager("lab.md"),
Tag: "Lab",
Tag: "X",
},
{
Text: "Plain text lists",
Href: "/plain-text-lists",
Page: pager("plain-text-lists.md"),
Tag: "Spec",
Tag: "X",
},
{
Text: "About us",
Expand Down
10 changes: 10 additions & 0 deletions static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
min-width: 150px;
}

.sitemap-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
}

@media only screen and (max-width: 800px) {
body {
padding: 0 0.75rem;
Expand All @@ -87,6 +93,10 @@
width: 100%;
}

.sitemap-grid {
grid-template-columns: repeat(1, 1fr);
}

.mk-nav {
padding: 1rem 0;
}
Expand Down
4 changes: 3 additions & 1 deletion tmpl/sitemap.page.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="description" content="{{.Data.Description}}" />
{{end}}

{{define "attrs"}}class="container-sm"{{end}}
{{define "attrs"}}class="container"{{end}}

{{define "body"}}
{{template "nav" .}}
Expand All @@ -18,6 +18,8 @@
<hr />

{{template "toc" .}}

<hr />
</main>

{{template "footer" .}}
Expand Down
2 changes: 1 addition & 1 deletion tmpl/toc.partial.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{define "toc"}}
<div>
<div class="sitemap-grid">
{{range $key, $value := .SitemapByTag}}
<div class="box my">
<h2 class="text-xl">{{$key}}</h2>
Expand Down

0 comments on commit 11c1a10

Please sign in to comment.