From ff7fcadfdbdc067de69e9385084bc4b13ac4aa65 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Sun, 31 Jul 2022 09:34:20 -0400 Subject: [PATCH] add bbb theme (split to separate repo later --- themes/bbb/LICENSE | 20 +++++++++++++++++ themes/bbb/archetypes/default.md | 2 ++ themes/bbb/layouts/404.html | 0 themes/bbb/layouts/_default/baseof.html | 11 ++++++++++ themes/bbb/layouts/_default/list.html | 10 +++++++++ themes/bbb/layouts/_default/single.html | 6 ++++++ themes/bbb/layouts/index.html | 5 +++++ themes/bbb/layouts/partials/footer.html | 1 + themes/bbb/layouts/partials/head.html | 15 +++++++++++++ themes/bbb/layouts/partials/header.html | 14 ++++++++++++ themes/bbb/layouts/partials/metadata.html | 11 ++++++++++ themes/bbb/static/css/style.css | 26 +++++++++++++++++++++++ themes/bbb/theme.toml | 12 +++++++++++ 13 files changed, 133 insertions(+) create mode 100644 themes/bbb/LICENSE create mode 100644 themes/bbb/archetypes/default.md create mode 100644 themes/bbb/layouts/404.html create mode 100644 themes/bbb/layouts/_default/baseof.html create mode 100644 themes/bbb/layouts/_default/list.html create mode 100644 themes/bbb/layouts/_default/single.html create mode 100644 themes/bbb/layouts/index.html create mode 100644 themes/bbb/layouts/partials/footer.html create mode 100644 themes/bbb/layouts/partials/head.html create mode 100644 themes/bbb/layouts/partials/header.html create mode 100644 themes/bbb/layouts/partials/metadata.html create mode 100644 themes/bbb/static/css/style.css create mode 100644 themes/bbb/theme.toml diff --git a/themes/bbb/LICENSE b/themes/bbb/LICENSE new file mode 100644 index 0000000..5d392a1 --- /dev/null +++ b/themes/bbb/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2022 Joel Beckmeyer + +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/bbb/archetypes/default.md b/themes/bbb/archetypes/default.md new file mode 100644 index 0000000..ac36e06 --- /dev/null +++ b/themes/bbb/archetypes/default.md @@ -0,0 +1,2 @@ ++++ ++++ diff --git a/themes/bbb/layouts/404.html b/themes/bbb/layouts/404.html new file mode 100644 index 0000000..e69de29 diff --git a/themes/bbb/layouts/_default/baseof.html b/themes/bbb/layouts/_default/baseof.html new file mode 100644 index 0000000..a99d9fe --- /dev/null +++ b/themes/bbb/layouts/_default/baseof.html @@ -0,0 +1,11 @@ + + + {{- partial "head.html" . -}} + + {{- partial "header.html" . -}} +
+ {{- block "main" . }}{{- end }} +
+ {{- partial "footer.html" . -}} + + diff --git a/themes/bbb/layouts/_default/list.html b/themes/bbb/layouts/_default/list.html new file mode 100644 index 0000000..2e11903 --- /dev/null +++ b/themes/bbb/layouts/_default/list.html @@ -0,0 +1,10 @@ +{{ define "main" }} +

{{ .Title }}

+{{ range .Pages.ByPublishDate.Reverse }} +

+

{{ .Title }}

+ {{ partial "metadata.html" . }} + +

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

{{ .Title }}

+{{ partial "metadata.html" . }} +

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

{{ .Site.Title }}

+
+{{ end }} diff --git a/themes/bbb/layouts/partials/footer.html b/themes/bbb/layouts/partials/footer.html new file mode 100644 index 0000000..2386a52 --- /dev/null +++ b/themes/bbb/layouts/partials/footer.html @@ -0,0 +1 @@ + diff --git a/themes/bbb/layouts/partials/head.html b/themes/bbb/layouts/partials/head.html new file mode 100644 index 0000000..651b4c4 --- /dev/null +++ b/themes/bbb/layouts/partials/head.html @@ -0,0 +1,15 @@ + + + + + + + + {{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + + {{ $title := print .Site.Title " | " .Title }} + {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }} + {{ $title }} + diff --git a/themes/bbb/layouts/partials/header.html b/themes/bbb/layouts/partials/header.html new file mode 100644 index 0000000..5a21c9e --- /dev/null +++ b/themes/bbb/layouts/partials/header.html @@ -0,0 +1,14 @@ +
diff --git a/themes/bbb/layouts/partials/metadata.html b/themes/bbb/layouts/partials/metadata.html new file mode 100644 index 0000000..65a164f --- /dev/null +++ b/themes/bbb/layouts/partials/metadata.html @@ -0,0 +1,11 @@ +{{ $dateTime := .PublishDate.Format "2006-01-02" }} +{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }} + + +{{ with .Params.tags }} + +{{ range . }} +{{ $href := print (absURL "tags/") (urlize .) }} +{{ . }} +{{ end }} +{{ end }} diff --git a/themes/bbb/static/css/style.css b/themes/bbb/static/css/style.css new file mode 100644 index 0000000..39b1c27 --- /dev/null +++ b/themes/bbb/static/css/style.css @@ -0,0 +1,26 @@ +* { + max-width: 650px; + margin: auto; +} + +.nav { + margin-top: 1rem; + margin-bottom: 1rem; + text-align: center; +} + +.nav-link { + padding: .25rem; +} + +.title { + max-width: 650px; + margin-top: 1rem; + margin-bottom: 1rem; + text-align: center; +} + +.footer { + position: relative; + text-align: center; +} diff --git a/themes/bbb/theme.toml b/themes/bbb/theme.toml new file mode 100644 index 0000000..e7db140 --- /dev/null +++ b/themes/bbb/theme.toml @@ -0,0 +1,12 @@ +name = "bbb" +license = "MIT" +licenselink = "https://git.beckmeyer.us/TnSb/bbb-hugo-theme/blob/master/LICENSE" +description = "Basic, Boring, Barebones Hugo Theme" +homepage = "https://git.beckmeyer.us/TnSb/bbb" +tags = [] +features = [] +min_version = "0.41.0" + +[author] + name = "Joel Beckmeyer" + homepage = "https://beckmeyer.us/"