From f89969d98637f244b9325f16c0b3b923fb65ef59 Mon Sep 17 00:00:00 2001 From: frosty Date: Thu, 28 Aug 2025 10:48:45 -0400 Subject: work on layout and write basic nginx page --- themes/orca/assets/style.css | 55 ++++++++++++++++++++--------- themes/orca/layouts/_default/baseof.html | 1 + themes/orca/layouts/_default/blog.html | 8 ----- themes/orca/layouts/_default/single.html | 16 ++++++++- themes/orca/layouts/_default/whatnot.html | 8 +++++ themes/orca/layouts/partials/footer.html | 6 ++++ themes/orca/layouts/partials/header.html | 11 +++--- themes/orca/layouts/partials/post-item.html | 8 +++-- 8 files changed, 79 insertions(+), 34 deletions(-) delete mode 100644 themes/orca/layouts/_default/blog.html create mode 100644 themes/orca/layouts/_default/whatnot.html create mode 100644 themes/orca/layouts/partials/footer.html (limited to 'themes/orca') diff --git a/themes/orca/assets/style.css b/themes/orca/assets/style.css index 49c53ad..a4dcc49 100644 --- a/themes/orca/assets/style.css +++ b/themes/orca/assets/style.css @@ -1,45 +1,52 @@ +:root { + --header-color: purple; + --highlight-color: violet; + --background-color: #090909; + --foreground-color: white; + --ruler-color: lightgray; + --item-color: #191919; +} + body { margin: 0; - background-color: #090909; - color: white; + background-color: var(--background-color); + color: var(--foreground-color); } a { - color: violet; + color: var(--highlight-color); } header nav { - background: purple; + background: var(--header-color); padding: 4px; - color: violet; + color: var(--highlight-color); } header nav a { text-decoration: none; - color: white; + color: var(--foreground-color); } header nav a:hover { text-decoration: underline; } -header nav *.right { - float: right; -} - +header .title, +header nav div, main { - margin: 0 0.8em; - max-width: 50em; + margin: auto; + max-width: 70em; } main h1, main h2, main h3 { - border-bottom: 1px lightgray dotted; + border-bottom: 1px var(--ruler-color) dotted; } .post { - background: #191919; + background: var(--item-color); padding: 0.5em; } @@ -49,11 +56,11 @@ main h3 { hr { border: none; - border-bottom: 1px lightgray dotted; + border-bottom: 1px var(--ruler-color) dotted; } header .title { - margin: 0.5em; + margin: 0.5em auto; } header .title img { @@ -76,3 +83,19 @@ header .title h2 a { header .title h2 a:hover { text-decoration: underline; } + +pre { + padding: 4px; +} + +.res { + background-color: var(--item-color); + min-width: 200px; + float: right; +} + +.res div { + text-align: center; + background-color: var(--header-color); + padding: 4px; +} diff --git a/themes/orca/layouts/_default/baseof.html b/themes/orca/layouts/_default/baseof.html index 034b6a1..227f431 100644 --- a/themes/orca/layouts/_default/baseof.html +++ b/themes/orca/layouts/_default/baseof.html @@ -14,6 +14,7 @@ {{ block "main" . }} {{ .Content }} {{ end }} + {{ partial "footer.html" . }} diff --git a/themes/orca/layouts/_default/blog.html b/themes/orca/layouts/_default/blog.html deleted file mode 100644 index 0f73423..0000000 --- a/themes/orca/layouts/_default/blog.html +++ /dev/null @@ -1,8 +0,0 @@ -{{ define "main" }} -

{{ .Title }}

- {{ .TableOfContents }} - {{ .Content }} - {{ with .Lastmod }} -

Last modified {{ .Format "January 2nd, 2006" }}.

- {{ end }} -{{ end }} diff --git a/themes/orca/layouts/_default/single.html b/themes/orca/layouts/_default/single.html index a59ecb7..66ded2e 100644 --- a/themes/orca/layouts/_default/single.html +++ b/themes/orca/layouts/_default/single.html @@ -1,6 +1,20 @@ {{ define "main" }}

{{ .Title }}

- {{ .Content }} +{{ with .Params.res }} +
+
Resources
+ +
+{{ end }} +{{ .Summary }} +{{ .TableOfContents }} +{{ (replace .Content .Summary "") | safeHTML }} {{ with .Lastmod }}

Last modified {{ .Format "January 2nd, 2006" }}.

{{ end }} diff --git a/themes/orca/layouts/_default/whatnot.html b/themes/orca/layouts/_default/whatnot.html new file mode 100644 index 0000000..0f73423 --- /dev/null +++ b/themes/orca/layouts/_default/whatnot.html @@ -0,0 +1,8 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .TableOfContents }} + {{ .Content }} + {{ with .Lastmod }} +

Last modified {{ .Format "January 2nd, 2006" }}.

+ {{ end }} +{{ end }} diff --git a/themes/orca/layouts/partials/footer.html b/themes/orca/layouts/partials/footer.html new file mode 100644 index 0000000..a2ad329 --- /dev/null +++ b/themes/orca/layouts/partials/footer.html @@ -0,0 +1,6 @@ +
+

All content is written by frosty unless noted otherwise. If you think something is incorrect, let me know.

+Gentoo Linux +Vim: the editor +
+
diff --git a/themes/orca/layouts/partials/header.html b/themes/orca/layouts/partials/header.html index 77d2a39..666539a 100644 --- a/themes/orca/layouts/partials/header.html +++ b/themes/orca/layouts/partials/header.html @@ -1,14 +1,13 @@
diff --git a/themes/orca/layouts/partials/post-item.html b/themes/orca/layouts/partials/post-item.html index 183dd28..b20a8f8 100644 --- a/themes/orca/layouts/partials/post-item.html +++ b/themes/orca/layouts/partials/post-item.html @@ -1,11 +1,13 @@
{{ .Type }} - {{ .Title }} -
{{ .Date.Format "January 2nd, 2006" }}
+ {{ .Title }}
- {{ range $i, $t := .Params.tags }}{{ if $i }}, {{ end }}{{ $t }}{{ end }} +{{ range $i, $t := .Params.tags -}} + {{ if $i }}, {{ end -}} + {{ $t -}} +{{- end }}
-- cgit v1.2.3