diff options
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/_partials/list-pages.html | 16 | ||||
| -rw-r--r-- | layouts/_partials/list-terms.html | 5 | ||||
| -rw-r--r-- | layouts/baseof.html | 72 | ||||
| -rw-r--r-- | layouts/list.html | 12 | ||||
| -rw-r--r-- | layouts/single.html | 11 | ||||
| -rw-r--r-- | layouts/taxonomy.html | 8 | ||||
| -rw-r--r-- | layouts/term.html | 8 |
7 files changed, 132 insertions, 0 deletions
diff --git a/layouts/_partials/list-pages.html b/layouts/_partials/list-pages.html new file mode 100644 index 0000000..6ad1411 --- /dev/null +++ b/layouts/_partials/list-pages.html @@ -0,0 +1,16 @@ +<ul>{{ range .Pages.ByDate }} + {{ $aboutCheck := eq ( eq $.Section "about" ) ( eq .Section "about" ) }} + {{ if and ( isset .Params "title" ) $aboutCheck }} + <li class="pages-iter-item" + {{ with merge .Site.Params .Params }} + {{ if .accentColorCheck }} + style="--instance-hue: {{ .accentHue }};" + {{ else if .themeColorCheck }} + style="--instance-hue: {{ .themeHue }};" + {{ end }} + {{ end }} + ><a href="{{ .RelPermalink }}">{{ .Title }}</a> + </li> + {{ end }} +{{ end }}</ul> + diff --git a/layouts/_partials/list-terms.html b/layouts/_partials/list-terms.html new file mode 100644 index 0000000..10bc437 --- /dev/null +++ b/layouts/_partials/list-terms.html @@ -0,0 +1,5 @@ +<ul>{{ range .Data.Terms }} + <li> + <a href="{{ .Page.RelPermalink }}">{{ .Page.LinkTitle }}</a> + </li> +{{ end }}</ul> diff --git a/layouts/baseof.html b/layouts/baseof.html new file mode 100644 index 0000000..fb923a5 --- /dev/null +++ b/layouts/baseof.html @@ -0,0 +1,72 @@ +<!DOCTYPE html>
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>{{ .Page.Title }}</title>
+ <link rel="stylesheet" href="/css/main.css"/>
+ <link rel="stylesheet" href="/css/chroma.css"/>
+ {{ if isset .Site.Params "favicons" }}
+ {{ $fileDict := dict
+ ".svg" "svg+xml"
+ ".png" "png"
+ ".ico" "x-icon"
+ }}
+ {{ range .Site.Params.favicons }}
+ <link rel="icon"
+ type="image/{{ index $fileDict ( path.Ext . ) }}"
+ href="{{ . }}">
+ {{ end }}
+ {{ end }}
+ {{ if isset .Params "tags" }}
+ <meta name="keywords" content="{{ delimit .Params.tags ", " }}">
+ {{ end }}
+ {{ if isset .Params "htmlhead" }}
+ {{ range .Params.htmlHead }}
+ {{ . | safeHTML }}
+ {{ end }}
+ {{ end }}
+ <style>
+ :root {
+ {{ with merge .Site.Params .Params }}
+ --theme-color-check: {{ int .themeColorCheck }};
+ --accent-color-check: {{ int .accentColorCheck }};
+ --theme-hue: {{ .themeHue }};
+ --accent-hue: {{ .accentHue }};
+ {{ end }}
+ }
+ </style>
+</head>
+<body>
+ <div class="dark-mode-container">
+ <input type="checkbox" id="--dark-theme-check">Dark Mode</input>
+ </div>
+ {{ block "main" . }}
+ {{ end }}
+ {{ if isset .Params "tags" }}
+ <nav class="nav-footer">
+ <hr>
+ Related:
+ {{ range .Params.tags }}
+ <a href="/tags/{{ . }}">{{ . }}</a>
+ {{ if not (eq . (index (last 1 $.Params.tags) 0)) }} | {{ end }}
+ {{ end }}
+ </nav>
+ {{ end }}
+ <nav class="nav-footer">
+ <hr>
+ <a href="/">Home Page</a>
+ {{ range where .Site.Sections "Section" "about" }}
+ | <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
+ {{ end }}
+ | <a href="#">Top of Page</a>
+ <hr>
+ </nav>
+ <script src="/css/dark-mode.js"></script>
+ {{ if isset .Params "htmlfoot" }}
+ {{ range .Params.htmlFoot }}
+ {{ . | safeHTML }}
+ {{ end }}
+ {{ end }}
+</body>
+</html>
+
diff --git a/layouts/list.html b/layouts/list.html new file mode 100644 index 0000000..40a2671 --- /dev/null +++ b/layouts/list.html @@ -0,0 +1,12 @@ + +{{ define "main" }} + {{ if isset .Params "title" }} + <h1>{{ .Title }}</h1> + {{ else }} + <h1>{{ .Section | title }}</h1> + {{ end }} + <hr> + {{ .Content }} + {{ partial "list-pages.html" . }} +{{ end }} + diff --git a/layouts/single.html b/layouts/single.html new file mode 100644 index 0000000..d1cfcbe --- /dev/null +++ b/layouts/single.html @@ -0,0 +1,11 @@ + +{{ define "main" }} + + {{ if .Title }} + <h1>{{ .Title }}</h1> + {{ end }} + <hr> + {{ .Content }} + +{{ end }} + diff --git a/layouts/taxonomy.html b/layouts/taxonomy.html new file mode 100644 index 0000000..a284e36 --- /dev/null +++ b/layouts/taxonomy.html @@ -0,0 +1,8 @@ + +{{ define "main" }} + <h1>{{ .Data.Plural | title }}</h1> + <hr> + {{ .Content }} + {{ partial "list-terms.html" . }} +{{ end }} + diff --git a/layouts/term.html b/layouts/term.html new file mode 100644 index 0000000..0e399fa --- /dev/null +++ b/layouts/term.html @@ -0,0 +1,8 @@ + +{{ define "main" }} + <h1>{{ .Data.Term | title }}</h1> + <hr> + {{ .Content }} + {{ partial "list-pages.html" . }} +{{ end }} + |