From 24897b4ec55af3f21ce690783b9ca62c51f2ee67 Mon Sep 17 00:00:00 2001 From: frosty Date: Mon, 19 May 2025 08:48:52 -0400 Subject: initial commit --- themes/polaris/LICENSE | 24 ++++++ themes/polaris/assets/css/style.css | 125 ++++++++++++++++++++++++++++ themes/polaris/layouts/_default/baseof.html | 23 +++++ themes/polaris/layouts/_default/home.html | 4 + themes/polaris/layouts/_default/now.html | 8 ++ themes/polaris/layouts/_default/single.html | 5 ++ themes/polaris/layouts/partials/footer.html | 0 themes/polaris/layouts/partials/nav.html | 16 ++++ themes/polaris/layouts/partials/posts.html | 18 ++++ 9 files changed, 223 insertions(+) create mode 100644 themes/polaris/LICENSE create mode 100644 themes/polaris/assets/css/style.css create mode 100644 themes/polaris/layouts/_default/baseof.html create mode 100644 themes/polaris/layouts/_default/home.html create mode 100644 themes/polaris/layouts/_default/now.html create mode 100644 themes/polaris/layouts/_default/single.html create mode 100644 themes/polaris/layouts/partials/footer.html create mode 100644 themes/polaris/layouts/partials/nav.html create mode 100644 themes/polaris/layouts/partials/posts.html (limited to 'themes') diff --git a/themes/polaris/LICENSE b/themes/polaris/LICENSE new file mode 100644 index 0000000..efb9808 --- /dev/null +++ b/themes/polaris/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/themes/polaris/assets/css/style.css b/themes/polaris/assets/css/style.css new file mode 100644 index 0000000..f84c768 --- /dev/null +++ b/themes/polaris/assets/css/style.css @@ -0,0 +1,125 @@ +:root { + --body-background: #1a1a1a; + --body-foreground: #eeeeee; + --body-link: lightblue; + --nav-background: #3a3a3a; + --nav-foreground: #eeeeee; + --nav-active-background: #eeeeee; + --nav-active-foreground: #1a1a1a; + --hr-background: #8a8a8a; +} + +body { + margin: 0; + background-color: var(--body-background); + color: var(--body-foreground); +} + +a { + color: var(--body-link); + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +.nav-over, main, footer { + max-width: 1000px; + margin: 0 auto; +} + +@media only screen and (max-width: 1100px) { + .nav-over, main, footer { + max-width: 800px; + } +} + +@media only screen and (max-width: 900px) { + .nav-over, main, footer { + max-width: 700px; + } +} + +@media only screen and (max-width: 750px) { + .nav-over, main, footer { + max-width: none; + } + + .nav-title, main, footer { + margin: 0 16px; + } +} + +.nav-under { + background-color: var(--nav-background); + padding: 4px 0; +} + +.nav-title h2 { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + padding: 16px 0; +} + +.nav-subtext { + margin-left: 16px; + color: #999999; + font-style: italic; +} + +nav ul { + list-style-type: none; + margin: 0; + padding-left: 0; + overflow: hidden; +} + +.nav-link { + background-color: var(--nav-background); + color: var(--nav-foreground); + display: block; + padding: 8px 12px; +} + +.link-active { + background-color: var(--nav-active-background); + color: var(--nav-active-foreground); +} + +.link-left { + float: left; +} + +.link-right { + float: right; +} + +@media only screen and (max-width: 400px) { + .link-left, .link-right { + float: none; + } + + .nav-under { + display: none; + } +} + +hr { + background-color: var(--hr-background); + height: 1px; + border: none; +} + +footer { + text-align: center; +} + +.footer-break { + width: 120px; +} + +.build-date { + font-style: italic; +} diff --git a/themes/polaris/layouts/_default/baseof.html b/themes/polaris/layouts/_default/baseof.html new file mode 100644 index 0000000..b6ccdac --- /dev/null +++ b/themes/polaris/layouts/_default/baseof.html @@ -0,0 +1,23 @@ + + + + + {{ .Site.Title }} + + {{ $style := resources.Get "css/style.css" | minify | fingerprint }} + + + + +
+ {{ block "main" . }} + {{ .Content }} + {{ end }} +
+
+ {{ partial "footer.html" . }} +
+ + diff --git a/themes/polaris/layouts/_default/home.html b/themes/polaris/layouts/_default/home.html new file mode 100644 index 0000000..6e46985 --- /dev/null +++ b/themes/polaris/layouts/_default/home.html @@ -0,0 +1,4 @@ +{{ define "main" }} + {{ .Content }} + {{ partial "posts.html" }} +{{ end }} diff --git a/themes/polaris/layouts/_default/now.html b/themes/polaris/layouts/_default/now.html new file mode 100644 index 0000000..bb77eaf --- /dev/null +++ b/themes/polaris/layouts/_default/now.html @@ -0,0 +1,8 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} +

+ Last updated {{ .Date | time.Format "Jan 02 2006" }}. + What the heck is a “now page”? +

+{{ end }} diff --git a/themes/polaris/layouts/_default/single.html b/themes/polaris/layouts/_default/single.html new file mode 100644 index 0000000..d87f112 --- /dev/null +++ b/themes/polaris/layouts/_default/single.html @@ -0,0 +1,5 @@ +{{ define "main" }} +

{{ .Title }}

+

Written {{ .Date | time.Format "Jan 02 2006" }}.

+ {{ .Content }} +{{ end }} diff --git a/themes/polaris/layouts/partials/footer.html b/themes/polaris/layouts/partials/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/polaris/layouts/partials/nav.html b/themes/polaris/layouts/partials/nav.html new file mode 100644 index 0000000..56d2fa9 --- /dev/null +++ b/themes/polaris/layouts/partials/nav.html @@ -0,0 +1,16 @@ + + diff --git a/themes/polaris/layouts/partials/posts.html b/themes/polaris/layouts/partials/posts.html new file mode 100644 index 0000000..7fd87de --- /dev/null +++ b/themes/polaris/layouts/partials/posts.html @@ -0,0 +1,18 @@ +{{ $pages := where site.RegularPages "Section" "blog" }} +{{ $pagesLen := (len $pages) }} + +{{ if eq $pagesLen 0 }} +

It sure is quiet around here.

+{{ end }} + +{{ range $index, $element := $pages }} +
+
+

{{ .Title }}

+
+

{{ .Date | time.Format "Jan 02 2006" }}

+
+ {{ if ne (add $index 1) $pagesLen }} +
+ {{ end }} +{{ end }} -- cgit v1.2.3-70-g09d2