From 511cbfbafde4ff463751fadf8dd15d3b7eb41cea Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Thu, 24 Oct 2024 08:14:08 -0500 Subject: Refactor theme usage --- config.toml | 1 - layouts/404.html | 0 layouts/_default/baseof.html | 9 + layouts/_default/list.html | 22 ++ layouts/_default/single.html | 21 ++ layouts/partials/footer.html | 3 + layouts/partials/head.html | 45 ++++ layouts/partials/header.html | 13 + static/css/common.css | 288 +++++++++++++++++++++++ static/css/list.css | 0 themes/markskitchen/LICENSE | 21 -- themes/markskitchen/README.md | 1 - themes/markskitchen/archetypes/default.md | 2 - themes/markskitchen/layouts/404.html | 0 themes/markskitchen/layouts/_default/baseof.html | 9 - themes/markskitchen/layouts/_default/list.html | 22 -- themes/markskitchen/layouts/_default/single.html | 21 -- themes/markskitchen/layouts/partials/footer.html | 3 - themes/markskitchen/layouts/partials/head.html | 45 ---- themes/markskitchen/layouts/partials/header.html | 13 - themes/markskitchen/static/css/common.css | 288 ----------------------- themes/markskitchen/static/css/list.css | 0 themes/markskitchen/theme.toml | 21 -- 23 files changed, 401 insertions(+), 447 deletions(-) create mode 100644 layouts/404.html create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html create mode 100644 static/css/common.css create mode 100644 static/css/list.css delete mode 100644 themes/markskitchen/LICENSE delete mode 100644 themes/markskitchen/README.md delete mode 100644 themes/markskitchen/archetypes/default.md delete mode 100644 themes/markskitchen/layouts/404.html delete mode 100644 themes/markskitchen/layouts/_default/baseof.html delete mode 100644 themes/markskitchen/layouts/_default/list.html delete mode 100644 themes/markskitchen/layouts/_default/single.html delete mode 100644 themes/markskitchen/layouts/partials/footer.html delete mode 100644 themes/markskitchen/layouts/partials/head.html delete mode 100644 themes/markskitchen/layouts/partials/header.html delete mode 100644 themes/markskitchen/static/css/common.css delete mode 100644 themes/markskitchen/static/css/list.css delete mode 100644 themes/markskitchen/theme.toml diff --git a/config.toml b/config.toml index 4609e09..67b23df 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,5 @@ languageCode = 'en-us' title = "Mark's Kitchen" -theme = "markskitchen" baseURL = "https://marks.kitchen" paginate = 5 rssLimit = 10 diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..5dc4b24 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,9 @@ + + + {{- partial "head.html" . -}} + + {{- partial "header.html" . -}} + {{- block "main" . }}{{- end }} + {{- partial "footer.html" . -}} + + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..45c8631 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,22 @@ +{{ define "head" }} + +{{ end }} + +{{ define "main" }} +{{ if .Content }} +
+
+ {{ .Content }} +
+{{ else }} +
+ +{{ end}} +
+{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..52e9c13 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,21 @@ +{{ define "head" }} + +{{ end }} + +{{ define "main" }} +
+

{{ .Title }}

+
{{ .PublishDate.Format "January 2, 2006"}}
+
+ {{ .Content }} +
+ {{ if ne .Params.tags nil }} +
+ Keywords: + {{ range .Params.tags }} + #{{ . }} + {{ end }} +
+ {{ end }} +
+{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..ecf9420 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,3 @@ +
+
Mark Powers <> © 2023
+
diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..29e9f49 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + {{ if .Keywords }} + + {{ end }} + + + + + + {{ range .AlternativeOutputFormats -}} + {{ printf ` + ` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + + + + + + {{ template "_internal/schema.html" . }} + + + + + + {{ if .IsHome }} + {{ .Site.Title }} + {{ else }} + {{ .Title }} - {{ .Site.Title }} + {{ end }} + + {{ block "head" . }}{{ end }} + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..97fec62 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,13 @@ + diff --git a/static/css/common.css b/static/css/common.css new file mode 100644 index 0000000..0a248e5 --- /dev/null +++ b/static/css/common.css @@ -0,0 +1,288 @@ +html { + max-width: 70ch; + padding: 3em 1em; + margin: auto; + line-height: 1.75; + font-size: 1.25em; +} + +#main > .post + .post { + margin-top: 2rem; +} + +#main > .post > h2 { + align-items: center; + display: flex; + flex-direction: row; + justify-content: space-between; +} + +#main > .post > h2 > time { + font-size: 1rem; + font-weight: normal; +} + +#main > .post > .content { + padding-top: 1rem; +} + +@media screen and (min-width: 768px) { + #main > .post > div { + margin-left: 2rem; + } +} + +/* global */ + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +a { + color: inherit; +} + +time { + color: gray; + margin-left: 1rem; + min-width: 5rem; +} + +body { + background-color: #FAFAFA; + display: flex; + flex-direction: column; + font-family: 'Latin Modern Roman', 'Times New Roman', serif; + min-height: 100vh; + overflow-wrap: break-word; + padding: 1rem; +} + +.link { + color: #AA0000; + text-decoration: underline; +} + +.paginator { + align-items: flex-end; + display: flex; + flex-direction: row; + justify-content: space-between; + margin-top: 2rem; +} + +::-webkit-scrollbar { + background-color: #FAFAFA; + height: 8px; + width: 8px; +} + +::-webkit-scrollbar-thumb { + background-color: #AAAAAA; +} + +::-webkit-scrollbar-thumb:hover { + background-color: #888888; +} + +/* header */ + +#header { + align-items: center; + display: flex; + flex-direction: column; +} + +#header > h1 { + text-align: center; +} + +@media screen and (min-width: 768px) { + #header > h1 { + font-size: 2.8rem; + } +} + +@media screen and (max-width: 512px) { + .item-date { + display: none; + } +} + +#header > nav { + display: flex; + flex-direction: row; + justify-content: space-around; + flex-wrap: wrap; + max-width: 768px; + width: 100%; + margin: 1rem; +} + +#header > nav > span > a { + font-size: 1.2rem; +} + +/* main */ + +#main { + align-self: center; + display: flex; + flex-direction: column; + flex-grow: 1; + max-width: 768px; + padding: 2rem 0; + width: calc(100% - 2rem); +} + +/* footer */ + +footer { + align-items: center; + display: flex; + font-size: .9rem; + flex-direction: column;; +} + +.content :last-child { + margin-bottom: 0; +} + +.content a { + color: #AA0000; + text-decoration: underline; +} + +.content a.footnote-ref::before { + content: "["; +} + +.content a.footnote-ref::after { + content: "]"; +} + +.content blockquote, +.content div, +.content h1, +.content h2, +.content h3, +.content h4, +.content h5, +.content h6, +.content p, +.content pre, +.content ol, +.content table, +.content ul { + margin-bottom: 1rem; +} + +.content blockquote { + border-left: black 2px solid; + font-style: italic; + padding: 1rem 0 1rem 2rem; +} + +.content code { + background-color: #F5F5F5; + border-radius: .2rem; + color: #AA0000; + font-family: 'Latin Modern Mono', Courier, monospace; + padding: 0 .2rem; +} + +.content h1, .content h2, .content h3, +.content h4, .content h5, .content h6 { + line-height: 1.5; +} + +.content h1 { + font-size: 2.4rem; +} + +.content h2 { + font-size: 1.8rem; +} + +.content h3 { + font-size: 1.4rem; +} + +.content h4 { + font-size: 1.2rem; +} + +.content h5 { + font-size: 1.1rem; +} + +.content h6 { + font-size: 1rem; +} + +.content img { + max-width: 100%; +} + +.content p { + text-align: justify; +} + +.content pre { + background-color: #F5F5F5!important; + border-radius: .2rem; + font-family: 'Latin Modern Mono', Courier, monospace; + margin-top: .5rem; + overflow-x: auto; + padding: .5rem; +} + +.content pre code { + padding: 0; +} + +.content strong.chinese { + font-weight: normal; + text-emphasis-style: dot; + text-emphasis-position: under; + -webkit-text-emphasis-style: dot; + -webkit-text-emphasis-position: under; +} + +.content table { + display: block; + overflow-x: auto; +} + +.content td, .content th { + border: #575C61 1px solid; + padding: .1rem .5rem; +} + +.content th { + background-color: #575C61; + color: #FAFAFA; +} + +.content ol, .content ul { + margin-left: 1.5rem; +} + +dl > dt { + font-weight: bold; +} + +dd { + padding-left: 2em; + padding-bottom: 1em; +} + +li { + margin-bottom: 0.5rem; +} + +.email::after { + content: "@marks.kitchen"; +} diff --git a/static/css/list.css b/static/css/list.css new file mode 100644 index 0000000..e69de29 diff --git a/themes/markskitchen/LICENSE b/themes/markskitchen/LICENSE deleted file mode 100644 index 17a6d8e..0000000 --- a/themes/markskitchen/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2022 Mark Powers -Copyright (c) Creedowl Queensferry - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -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 OR -COPYRIGHT HOLDERS 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. diff --git a/themes/markskitchen/README.md b/themes/markskitchen/README.md deleted file mode 100644 index 8412a42..0000000 --- a/themes/markskitchen/README.md +++ /dev/null @@ -1 +0,0 @@ -Theme style is inspired by https://github.com/queensferryme/hugo-theme-texify diff --git a/themes/markskitchen/archetypes/default.md b/themes/markskitchen/archetypes/default.md deleted file mode 100644 index ac36e06..0000000 --- a/themes/markskitchen/archetypes/default.md +++ /dev/null @@ -1,2 +0,0 @@ -+++ -+++ diff --git a/themes/markskitchen/layouts/404.html b/themes/markskitchen/layouts/404.html deleted file mode 100644 index e69de29..0000000 diff --git a/themes/markskitchen/layouts/_default/baseof.html b/themes/markskitchen/layouts/_default/baseof.html deleted file mode 100644 index 5dc4b24..0000000 --- a/themes/markskitchen/layouts/_default/baseof.html +++ /dev/null @@ -1,9 +0,0 @@ - - - {{- partial "head.html" . -}} - - {{- partial "header.html" . -}} - {{- block "main" . }}{{- end }} - {{- partial "footer.html" . -}} - - diff --git a/themes/markskitchen/layouts/_default/list.html b/themes/markskitchen/layouts/_default/list.html deleted file mode 100644 index 45c8631..0000000 --- a/themes/markskitchen/layouts/_default/list.html +++ /dev/null @@ -1,22 +0,0 @@ -{{ define "head" }} - -{{ end }} - -{{ define "main" }} -{{ if .Content }} -
-
- {{ .Content }} -
-{{ else }} -
- -{{ end}} -
-{{ end }} diff --git a/themes/markskitchen/layouts/_default/single.html b/themes/markskitchen/layouts/_default/single.html deleted file mode 100644 index 52e9c13..0000000 --- a/themes/markskitchen/layouts/_default/single.html +++ /dev/null @@ -1,21 +0,0 @@ -{{ define "head" }} - -{{ end }} - -{{ define "main" }} -
-

{{ .Title }}

-
{{ .PublishDate.Format "January 2, 2006"}}
-
- {{ .Content }} -
- {{ if ne .Params.tags nil }} -
- Keywords: - {{ range .Params.tags }} - #{{ . }} - {{ end }} -
- {{ end }} -
-{{ end }} diff --git a/themes/markskitchen/layouts/partials/footer.html b/themes/markskitchen/layouts/partials/footer.html deleted file mode 100644 index ecf9420..0000000 --- a/themes/markskitchen/layouts/partials/footer.html +++ /dev/null @@ -1,3 +0,0 @@ -
-
Mark Powers <> © 2023
-
diff --git a/themes/markskitchen/layouts/partials/head.html b/themes/markskitchen/layouts/partials/head.html deleted file mode 100644 index 29e9f49..0000000 --- a/themes/markskitchen/layouts/partials/head.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - {{ if .Keywords }} - - {{ end }} - - - - - - {{ range .AlternativeOutputFormats -}} - {{ printf ` - ` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} - {{ end -}} - - - - - - {{ template "_internal/schema.html" . }} - - - - - - {{ if .IsHome }} - {{ .Site.Title }} - {{ else }} - {{ .Title }} - {{ .Site.Title }} - {{ end }} - - {{ block "head" . }}{{ end }} - diff --git a/themes/markskitchen/layouts/partials/header.html b/themes/markskitchen/layouts/partials/header.html deleted file mode 100644 index 97fec62..0000000 --- a/themes/markskitchen/layouts/partials/header.html +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/themes/markskitchen/static/css/common.css b/themes/markskitchen/static/css/common.css deleted file mode 100644 index 0a248e5..0000000 --- a/themes/markskitchen/static/css/common.css +++ /dev/null @@ -1,288 +0,0 @@ -html { - max-width: 70ch; - padding: 3em 1em; - margin: auto; - line-height: 1.75; - font-size: 1.25em; -} - -#main > .post + .post { - margin-top: 2rem; -} - -#main > .post > h2 { - align-items: center; - display: flex; - flex-direction: row; - justify-content: space-between; -} - -#main > .post > h2 > time { - font-size: 1rem; - font-weight: normal; -} - -#main > .post > .content { - padding-top: 1rem; -} - -@media screen and (min-width: 768px) { - #main > .post > div { - margin-left: 2rem; - } -} - -/* global */ - -* { - box-sizing: border-box; - margin: 0; - padding: 0; -} - -a { - color: inherit; -} - -time { - color: gray; - margin-left: 1rem; - min-width: 5rem; -} - -body { - background-color: #FAFAFA; - display: flex; - flex-direction: column; - font-family: 'Latin Modern Roman', 'Times New Roman', serif; - min-height: 100vh; - overflow-wrap: break-word; - padding: 1rem; -} - -.link { - color: #AA0000; - text-decoration: underline; -} - -.paginator { - align-items: flex-end; - display: flex; - flex-direction: row; - justify-content: space-between; - margin-top: 2rem; -} - -::-webkit-scrollbar { - background-color: #FAFAFA; - height: 8px; - width: 8px; -} - -::-webkit-scrollbar-thumb { - background-color: #AAAAAA; -} - -::-webkit-scrollbar-thumb:hover { - background-color: #888888; -} - -/* header */ - -#header { - align-items: center; - display: flex; - flex-direction: column; -} - -#header > h1 { - text-align: center; -} - -@media screen and (min-width: 768px) { - #header > h1 { - font-size: 2.8rem; - } -} - -@media screen and (max-width: 512px) { - .item-date { - display: none; - } -} - -#header > nav { - display: flex; - flex-direction: row; - justify-content: space-around; - flex-wrap: wrap; - max-width: 768px; - width: 100%; - margin: 1rem; -} - -#header > nav > span > a { - font-size: 1.2rem; -} - -/* main */ - -#main { - align-self: center; - display: flex; - flex-direction: column; - flex-grow: 1; - max-width: 768px; - padding: 2rem 0; - width: calc(100% - 2rem); -} - -/* footer */ - -footer { - align-items: center; - display: flex; - font-size: .9rem; - flex-direction: column;; -} - -.content :last-child { - margin-bottom: 0; -} - -.content a { - color: #AA0000; - text-decoration: underline; -} - -.content a.footnote-ref::before { - content: "["; -} - -.content a.footnote-ref::after { - content: "]"; -} - -.content blockquote, -.content div, -.content h1, -.content h2, -.content h3, -.content h4, -.content h5, -.content h6, -.content p, -.content pre, -.content ol, -.content table, -.content ul { - margin-bottom: 1rem; -} - -.content blockquote { - border-left: black 2px solid; - font-style: italic; - padding: 1rem 0 1rem 2rem; -} - -.content code { - background-color: #F5F5F5; - border-radius: .2rem; - color: #AA0000; - font-family: 'Latin Modern Mono', Courier, monospace; - padding: 0 .2rem; -} - -.content h1, .content h2, .content h3, -.content h4, .content h5, .content h6 { - line-height: 1.5; -} - -.content h1 { - font-size: 2.4rem; -} - -.content h2 { - font-size: 1.8rem; -} - -.content h3 { - font-size: 1.4rem; -} - -.content h4 { - font-size: 1.2rem; -} - -.content h5 { - font-size: 1.1rem; -} - -.content h6 { - font-size: 1rem; -} - -.content img { - max-width: 100%; -} - -.content p { - text-align: justify; -} - -.content pre { - background-color: #F5F5F5!important; - border-radius: .2rem; - font-family: 'Latin Modern Mono', Courier, monospace; - margin-top: .5rem; - overflow-x: auto; - padding: .5rem; -} - -.content pre code { - padding: 0; -} - -.content strong.chinese { - font-weight: normal; - text-emphasis-style: dot; - text-emphasis-position: under; - -webkit-text-emphasis-style: dot; - -webkit-text-emphasis-position: under; -} - -.content table { - display: block; - overflow-x: auto; -} - -.content td, .content th { - border: #575C61 1px solid; - padding: .1rem .5rem; -} - -.content th { - background-color: #575C61; - color: #FAFAFA; -} - -.content ol, .content ul { - margin-left: 1.5rem; -} - -dl > dt { - font-weight: bold; -} - -dd { - padding-left: 2em; - padding-bottom: 1em; -} - -li { - margin-bottom: 0.5rem; -} - -.email::after { - content: "@marks.kitchen"; -} diff --git a/themes/markskitchen/static/css/list.css b/themes/markskitchen/static/css/list.css deleted file mode 100644 index e69de29..0000000 diff --git a/themes/markskitchen/theme.toml b/themes/markskitchen/theme.toml deleted file mode 100644 index faa0387..0000000 --- a/themes/markskitchen/theme.toml +++ /dev/null @@ -1,21 +0,0 @@ -# theme.toml template for a Hugo theme -# See https://github.com/gohugoio/hugoThemes#themetoml for an example - -name = "Markskitchen" -license = "MIT" -licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE" -description = "" -homepage = "http://example.com/" -tags = [] -features = [] -min_version = "0.41.0" - -[author] - name = "" - homepage = "" - -# If porting an existing theme -[original] - name = "" - homepage = "" - repo = "" -- cgit v1.2.3