From 238668de0746d6178b976f08898c1ae868299e08 Mon Sep 17 00:00:00 2001 From: Alexander Avery Date: Fri, 30 May 2025 13:50:30 -0400 Subject: [PATCH] squash merge from branch rewrite Squashed commit of the following: commit 7e2125d97c830e6864e2711953667c423dcbfe97 Author: Alexander Avery Date: Fri May 30 13:48:55 2025 -0400 footer and header li are the same; footer ul has 0 padding commit 439f60d79fd63d3a886efe11b126aa169f49b112 Author: Alexander Avery Date: Fri May 30 13:44:48 2025 -0400 add 404 page commit 6b326600c6338b46a0eac7a3a549a96e759c13ed Author: Alexander Avery Date: Fri May 30 13:41:05 2025 -0400 img instead of image for variable shadowing commit 885195eb8098bcc58592a1a863278bdf03b9038b Author: Alexander Avery Date: Fri May 30 13:40:47 2025 -0400 article has optional date commit a64ea83de06f06114b4548ef3ea7daf56ef1cff0 Author: Alexander Avery Date: Fri May 30 13:40:26 2025 -0400 add # prefix to tags commit bb07d1a9cd63773a36807779855ab5aafe3ed3c1 Author: Alexander Avery Date: Fri May 30 13:37:38 2025 -0400 flex-start article groups and increase size commit 715a99dbaf1faa0f036c0d0c8b9c30a32e2f79fc Author: Alexander Avery Date: Thu May 29 17:33:14 2025 -0400 using image.html partial in authors/list.html; resize image in article-alt.html commit 04db01678864cb98c9d7591d07bde54f484e2f17 Author: Alexander Avery Date: Thu May 29 15:18:04 2025 -0400 fit images in main to 100% width commit 27dc432d65564530b4d80fc8c6c8635fa1363f7a Author: Alexander Avery Date: Thu May 29 15:12:14 2025 -0400 fix list to include images; introduce hideDate parameter commit 165bcfcef7a671df3a0876157d800bd7ef43e7f9 Author: Alexander Avery Date: Thu May 29 14:48:56 2025 -0400 using article-group class and adding shadow class commit 0f8172ef84b24d4199086895e382a873e06d1439 Author: Alexander Avery Date: Thu May 29 14:48:38 2025 -0400 reorganize css commit 44661d9bff54fd103c98b7fcd7aae0ce50da03ef Author: Alexander Avery Date: Thu May 29 14:29:57 2025 -0400 fix typo in image.html context commit 7b710f1fd2da242e6363b5c42e8221f3617a03a2 Author: Alexander Avery Date: Thu May 29 14:29:43 2025 -0400 add header info to authors/list.html commit 9676f087557686b9ee3d46bb8dab309c6156329a Author: Alexander Avery Date: Thu May 29 14:29:23 2025 -0400 add index class to article.html commit 178fa4dda063638ba37d4059995dfb0846ed634e Author: Alexander Avery Date: Thu May 29 14:28:16 2025 -0400 article-alternate for authors commit 32b1417bd72b0a9ac4fa62e50f2015a07a78f617 Author: Alexander Avery Date: Thu May 29 13:45:44 2025 -0400 begin author pages commit dec98241de5540196303f7a8eea698d9e16b725c Author: Alexander Avery Date: Thu May 29 13:45:17 2025 -0400 refactor articles commit feb576b1a6f6ca65ef9f98e4c691e084b2df8fb2 Author: Alexander Avery Date: Thu May 29 13:22:55 2025 -0400 visual articles on home page commit c8d14f6d52c8e2a2d9badcedbd65674a93c19e9a Author: Alexander Avery Date: Thu May 29 12:06:45 2025 -0400 formatting main.css commit 783c338d232503db970c41f63edc3b9b14e27bb1 Author: Alexander Avery Date: Thu May 29 11:59:00 2025 -0400 more css styling commit fbd8eb6b34c0bb73967ffe8fbb0078541ef1e2ed Author: Alexander Avery Date: Thu May 29 11:58:43 2025 -0400 site logo is a link commit 0d3ee84cf9553cb76ebbca01597be81fe26f95fa Author: Alexander Avery Date: Thu May 29 11:58:16 2025 -0400 add rss feed to head.html commit b0945f9774341393904f6d944e4ddaae16b578b6 Author: Alexander Avery Date: Wed May 28 22:52:25 2025 -0400 add many styles commit 1d0e3b74c43eff00f054c13bf7a2a6808100b6d6 Author: Alexander Avery Date: Wed May 28 22:52:18 2025 -0400 add div to header layout commit a45a3a6b920b594344d4af5675b738b728b9b636 Author: Alexander Avery Date: Wed May 28 15:47:28 2025 -0400 configurable footer links with menu.html commit 96536988e06f482c1d4aa4f5d39f698b3ba464bb Author: Alexander Avery Date: Wed May 28 15:45:27 2025 -0400 include site logo if available commit f963a16109d64c9817f365a6f828628897b382ab Author: Alexander Avery Date: Wed May 28 15:44:26 2025 -0400 add explicit favicon commit f28a9ba7e98f2ea87bbd06c4e65f37f7ab7b2666 Author: Alexander Avery Date: Wed May 28 15:11:39 2025 -0400 fix image.html shortcode to use image.html partial commit bd91ccffe96826d0ca64e2a7d650d784635a0324 Author: Alexander Avery Date: Wed May 28 15:08:28 2025 -0400 correctly use slice for classes argument commit 7ebf7c33afa6691a7d42665e3bbb3cb61c48d0cb Author: Alexander Avery Date: Wed May 28 15:08:13 2025 -0400 better whitespace in image.html commit 14827e7d974550655ef49dc7e02e48a976d7e9bf Author: Alexander Avery Date: Wed May 28 14:52:41 2025 -0400 remove redundant
from footer commit 8fa9a9b673415ec8ccb904c2e17f8749b72ee914 Author: Alexander Avery Date: Wed May 28 14:52:28 2025 -0400 added image partial commit 8978136c39083b202295418399e9d009884d82a1 Author: Alexander Avery Date: Wed May 28 14:24:20 2025 -0400 include author and Posted prefix for single.html commit fca23d88f34b5e5d8c6f70cd78b4bed3e6333367 Author: Alexander Avery Date: Wed May 28 14:17:40 2025 -0400 adjust single.html date and list.html section commit 49ce264c7e099401b504ce1a9ab815572827d615 Author: Alexander Avery Date: Wed May 28 14:10:40 2025 -0400 overwrite layout for home.html commit 83b7ba1bfe6d941af74e7ad82cfd388b1e0924ea Author: Alexander Avery Date: Wed May 28 14:10:20 2025 -0400 url instead of pageRef for remote link commit 4db3d6fec75f75e4a95a908256d1296673d19d64 Author: Alexander Avery Date: Wed May 28 14:10:02 2025 -0400 hugo mod init commit bd1ca1f95914b71fa3a923162feb6a67c5523c56 Author: Alexander Avery Date: Wed May 28 14:09:53 2025 -0400 temporary image shortcode commit b047841821740cad482a7ddd3295e590f67c36b8 Author: Alexander Avery Date: Wed May 28 13:49:42 2025 -0400 update footer.html commit a82d81531d2f3a5adadd5eb55fa730ebaab977f7 Author: Alexander Avery Date: Wed May 28 13:45:32 2025 -0400 example site configuration commit e742e18a225f743975cab768c7656e6196301f4b Author: Alexander Avery Date: Wed May 28 13:43:25 2025 -0400 remove taxonomy terms commit eac8874177aebae06d94057cdc82685cba564266 Author: Alexander Avery Date: Wed May 28 13:42:45 2025 -0400 update LICENSE; update theme.toml settings commit 5aad5b82c1bf479678ff363d2e31bd1a608ef1c6 Author: Alexander Avery Date: Wed May 28 13:38:23 2025 -0400 remove js commit ebd14a6a64f6e3cbd1aa1a2827da75f8e959b406 Author: Alexander Avery Date: Wed May 28 13:37:09 2025 -0400 remove content directory commit 269941d0295ec752abc0f5c9beae9108837d32aa Author: Alexander Avery Date: Wed May 28 13:36:49 2025 -0400 hugo new theme commit 323cb72d8142c00e520687b70b759c4d652a7abd Author: Alexander Avery Date: Wed May 28 13:34:45 2025 -0400 remove old files --- LICENSE | 2 +- archetypes/default.md | 5 + assets/css/main.css | 203 ++++++++++++++++++ assets/sass/cards.scss | 42 ---- assets/sass/code.scss | 18 -- assets/sass/colors.scss | 14 -- assets/sass/main.scss | 86 -------- hugo.toml | 29 +++ layouts/404.html | 6 +- layouts/_default/baseof.html | 53 ++--- layouts/_default/home.html | 24 +++ layouts/_default/list.html | 75 +++---- layouts/_default/single.html | 36 ++-- layouts/authors/list.html | 50 ++--- layouts/authors/terms.html | 15 +- layouts/partials/article-alt.html | 25 +++ layouts/partials/article-alternate.html | 14 -- layouts/partials/article-meta.html | 19 -- layouts/partials/article.html | 33 ++- layouts/partials/footer.html | 7 +- layouts/partials/head.html | 9 + layouts/partials/head/css.html | 9 + layouts/partials/head/js.html | 12 ++ layouts/partials/header.html | 19 +- layouts/partials/image-small.html | 28 --- layouts/partials/image.html | 79 +++---- layouts/partials/menu.html | 51 +++++ .../partials/posts-artfully-enumerated.html | 1 - layouts/partials/posts-enumerated.html | 20 -- layouts/partials/terms.html | 23 ++ layouts/shortcodes/image.html | 8 +- static/favicon.ico | Bin 0 -> 15406 bytes theme.toml | 12 ++ 33 files changed, 574 insertions(+), 453 deletions(-) create mode 100644 archetypes/default.md create mode 100644 assets/css/main.css delete mode 100644 assets/sass/cards.scss delete mode 100644 assets/sass/code.scss delete mode 100644 assets/sass/colors.scss delete mode 100644 assets/sass/main.scss create mode 100644 hugo.toml create mode 100644 layouts/_default/home.html create mode 100644 layouts/partials/article-alt.html delete mode 100644 layouts/partials/article-alternate.html delete mode 100644 layouts/partials/article-meta.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/head/css.html create mode 100644 layouts/partials/head/js.html delete mode 100644 layouts/partials/image-small.html create mode 100644 layouts/partials/menu.html delete mode 100644 layouts/partials/posts-artfully-enumerated.html delete mode 100644 layouts/partials/posts-enumerated.html create mode 100644 layouts/partials/terms.html create mode 100644 static/favicon.ico create mode 100644 theme.toml diff --git a/LICENSE b/LICENSE index 551c520..bff57ae 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2022 Beet Box. All rights reserved. +Copyright (c) 2025 Beet Box. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..c6f3fce --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +title = '{{ replace .File.ContentBaseName "-" " " | title }}' +date = {{ .Date }} +draft = true ++++ diff --git a/assets/css/main.css b/assets/css/main.css new file mode 100644 index 0000000..1b20c5e --- /dev/null +++ b/assets/css/main.css @@ -0,0 +1,203 @@ +:root { + --beetbox-red: #9e0008; + --beetbox-pink: #d93370; + --beetbox-purple: #ac65cb; + --beetbox-green: #003f56; + --beetbox-blue: #5fcfd0; + --light: #F8F8FF; + --background: #1f2835; + --text: var(--light); + --links: var(--beetbox-blue); + --link-hover: var(--beetbox-pink); + --header: #F8F8FFCC; + --header-link: #5C2673; /* darker beetbox-purple */ +} + +body { + background-color: var(--background); + color: var(--text); + font-family: sans-serif; + line-height: 1.5; + padding: 0; + margin: 0; +} + +a { + color: var(--links); + text-decoration: none; +} + +a:visited, a:hover { + color: var(--link-hover); + text-decoration: underline; +} + +p { + margin-bottom: 1.5rem; +} + +header div, main, footer { + max-width: 1200px; + margin: 0 auto; + padding: 1rem; +} + +/* Header */ +header { + background-color: var(--header); + box-shadow: 0 5px 10px black; +} + +header div { + display: flex; + align-items: baseline; + justify-content: space-between; +} + +header ul, footer ul { + margin: 0; +} + +header a { + color: var(--header-link); +} + +header li, footer li { + display: inline; + font-weight: 600; + margin-right: 8px; +} + +/* Responsive */ +@media (max-width: 700px) { + aside.index-articles { + display: none; + } +} + +main img { + max-width: 100%; +} + +/* Article Lists */ +.article-group { + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 20px; +} + +.index-articles { + justify-content: flex-end; +} + +.author-articles { + justify-content: flex-start; +} + +.index-articles aside { + flex-shrink: 4; +} + +section.index { + display: flex; + flex-direction: row; +} + +section.index aside { + flex-shrink: 4; +} + +/* Article Cards */ +article { + background-color: #111; + border-radius: 10px; + padding: 1rem; +} + +article.index { + width: 300px; + height: 485px; +} + +article.index img { + height: 50%; + width: 100%; + border-radius: 10px; + object-fit: cover; +} + +article.index h3 { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +article.alt { + display: flex; + flex-wrap: wrap; + gap: 8px; + justify-content: space-evenly; + align-items: center; +} + +article.alt img { + border-radius: 50%; + height: 256px; + width: 256px; +} + +/* Images */ +img.featured, img.author { + display: block; + border-radius: 8px; + margin: 12px 0; + object-fit: cover; + max-height: 500px; +} + +/* Code Blocks */ +code { + white-space: nowrap; +} + +pre { + border-radius: .4rem; + max-width: 100%; +} + +pre code { + display: block; + tab-size: 4; + padding: 1rem 1.5rem; + font-size: 1.05rem; + white-space: pre; + max-width: 100%; + overflow-x: auto; + border-left: .3rem solid var(--beetbox-purple); + border-radius: .4rem; + box-shadow: 0 4px 8px black; +} + +/* Effects */ +.float-on-hover { + transition: all .25s cubic-bezier(.2,.1,.47,1); +} + +.float-on-hover:hover { + transform: translateY(-10px); +} + +.shadow{ + box-shadow: 0 4px 8px black; +} + +/* Footer */ +footer { + border-top: 1px solid var(--light); +} + +footer ul { + padding: 0px; +} + diff --git a/assets/sass/cards.scss b/assets/sass/cards.scss deleted file mode 100644 index 5795f91..0000000 --- a/assets/sass/cards.scss +++ /dev/null @@ -1,42 +0,0 @@ -@mixin shadow { - box-shadow: 0px 4px 8px black; -} - -.shadow { - @include shadow -} - -.float-on-hover { - transition: (all 0.25s cubic-bezier(0.2,0.1,0.47,1)); - &:hover { - transform: (translateY(-10px)); - } -} - -.small-circle { - border-radius: 50%; - width: 250px; - height: 250px; -} - -article { - background-color: $dark; - border-radius: 10px; - height: 420px; - flex: 1 1 305px; - overflow: hidden; - - img { - height: 50%; - width: 100%; - object-fit: cover; - } - - div { - margin: 25px; - display: flex; - flex-direction: column; - justify-content: space-between; - } - -} diff --git a/assets/sass/code.scss b/assets/sass/code.scss deleted file mode 100644 index dd4a795..0000000 --- a/assets/sass/code.scss +++ /dev/null @@ -1,18 +0,0 @@ -code { white-space: nowrap; } - -pre { - background-color: $background-color !important; - max-width: 100%; - - & > code { - @include shadow; - display: block; - padding: 1rem 1.5rem; - font-size: 1.05rem; - white-space: pre; - max-width: 100%; - overflow-x: auto; - border-left: .3rem solid $code-edge; - border-radius: .4rem; - } -} diff --git a/assets/sass/colors.scss b/assets/sass/colors.scss deleted file mode 100644 index 9384057..0000000 --- a/assets/sass/colors.scss +++ /dev/null @@ -1,14 +0,0 @@ -$beetbox-red: #9e0008; -$beetbox-pink: #d93370; -$beetbox-purple: #ac65cb; -$beetbox-green: #003f56; -$beetbox-blue: #5fcfd0; - -$background-color: #1f2835; -$font-color: #f8f8ff; -$font-color-alternate: #1f2835; -$top-bar: #f8f8ffcc; -$dark: #111; -$link-color: $beetbox-blue; -$link-color-visited: #e4cdef; -$code-edge: $beetbox-purple; diff --git a/assets/sass/main.scss b/assets/sass/main.scss deleted file mode 100644 index a625247..0000000 --- a/assets/sass/main.scss +++ /dev/null @@ -1,86 +0,0 @@ -@import 'colors.scss'; -@import 'cards.scss'; -@import 'code.scss'; - -@mixin screen-max($max) { - @media (max-width: $max - 1) { - @content - } -} - -body { - background-color: $background-color; - color: $font-color; - margin: 0px; - overflow-y: scroll; - font-family: 'Helvetica'; - font-size: 1.1rem; -} - -h2 {font-size: 1.2rem;} - -header { - background-color: $top-bar; - box-shadow: 0px 5px 10px black; - nav { - @include screen-max(500px){text-align: center;} - - div {display: inline-block;} - - img { max-width: 300px; } - - a { - margin-right: 12px; - font-weight: bold; - text-decoration: none; - &, &:visited, &:hover {color: $font-color-alternate;} - } - } -} - -header, main, section {padding: 0 16px;} - -nav, main, section {max-width: 1200px; margin: auto;} -main img {max-width: 100%} - -footer {text-align: center;} - - -a { - color: $link-color; - &:visited, &:hover { color: $link-color-visited; } -} - -img.featured{aspect-ratio: 4/3;} -img.featured, img.author { - display: block; - border-radius: 8px; - margin: 12px 0; - object-fit: cover; - max-height: 500px; -} - -.left-to-right { - display: flex; - flex-wrap: wrap; - gap: 8px; - justify-content: space-evenly; - align-items: end; -} - -.align-center { - align-items: center; -} - -section.article-list { - margin: 8px 0px; - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: 40px; -} - -.fill-wh { - width: 100%; - height: 100% -} diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..7b1e4e0 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,29 @@ +# Example site configuration +baseURL = 'https://beetbox.io' +languageCode = 'en-US' +title = 'Beet Box' + +[[menus.main]] +name = 'Home' +pageRef = '/' +weight = 10 + +[[menus.main]] +name = 'Gitea' +url = 'https://gitea.beetbox.io/BeetBox' +weight = 20 + +[[menus.main]] +name = 'Games' +pageRef = '/games' +weight = 30 + +[[menus.footer]] +name = 'Authors' +pageRef = '/authors' +weight = 10 + +[module] + [module.hugoVersion] + extended = false + min = "0.116.0" diff --git a/layouts/404.html b/layouts/404.html index f369e15..037a70f 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,7 +1,5 @@ {{ define "main" }} -
-

404

-

This page doesn't exist. Let's go home

-
+

404 Page not found

+

Home

{{ end }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index d172e6e..39dcbec 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,40 +1,17 @@ - - - - - - {{- with .OutputFormats.Get "rss" }} - {{- printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML -}} - {{ end }} - - - - - {{ with (default .Site.Params.description .Params.description) -}} - - {{- end -}} - - {{ with .Params.keywords -}} - - {{- end }} - - {{ $style := resources.Get "/sass/main.scss" | css.Sass | minify -}} - - - - {{- block "title" . }}{{ .Site.Title }}{{ end -}} - - - - - -{{ partial "header.html" . }} - -{{ block "main" . }} -{{ end }} - -{{ partial "footer.html" . }} - - + + + {{ partial "head.html" . }} + + +
+ {{ partial "header.html" . }} +
+
+ {{ block "main" . }}{{ end }} +
+
+ {{ partial "footer.html" . }} +
+ diff --git a/layouts/_default/home.html b/layouts/_default/home.html new file mode 100644 index 0000000..23310be --- /dev/null +++ b/layouts/_default/home.html @@ -0,0 +1,24 @@ +{{ define "main" }} +{{ .Content }} +
+
+

All Posts:

+ {{ range site.RegularPages.GroupByDate "2006" }} +

{{ .Key }}

+ + {{ end }} +
+ + +
+{{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 510673f..a201d40 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,48 +1,31 @@ {{ define "main" }} - {{ $pages := .Site.RegularPages }} - {{if not .IsHome }} {{ $pages = .Pages }} {{ end }} - -
- {{ if not .IsHome }} -

{{ .Title | markdownify | lower }}

- {{ else }} -

Beet Box

- {{ end }} - - {{ if and .IsSection (not .IsHome) }} {{ partial "article-meta.html" . }} {{ end }} - - {{ with .Content }} -
- {{ . }} -
- {{- end }} - -
- - {{ with $pages.Limit 4 }} -
-

Latest Posts:

-
- {{ range . }} - {{ partial "article.html" . }} - {{ end }} -
-
- {{ end }} - - {{ with $pages }} -
-

All Posts:

- {{ range .GroupByDate "2006" }} -

{{ .Key }}

- - {{ end }} -
- {{ end }} - +

{{ .Title }}

+ + {{- with .Params.authors }} + {{- $author := (index . 0) }} +

Author: {{ $author }}

+ {{- end }} + + {{- if (not .Params.hideDate) }} + {{- $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{- $dateHuman := .Date | time.Format "Mon | Jan 2, 2006" }} +

Posted:

+ {{- end }} + + {{- range (.GetTerms "tags") }} + #{{ .LinkTitle }} + {{- end }} + + {{- partial "image.html" + (dict + "image" (.Resources.GetMatch "featured") + "alt" .Params.featured.alt + "sizes" (slice 320 480 600 800) + "classes" (slice "shadow" "featured")) }} + {{ .Content }} +
+ {{- range .Data.Pages }} + {{ partial "article.html" . }} + {{- end }} +
{{ end }} - diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c1132e3..27a1195 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,20 +1,28 @@ -{{ define "title" }}{{ .Title }}{{ end }} - {{ define "main" }} -
- {{ partial "article-meta.html" . }} +

{{ .Title }}

+ + {{ with .Params.authors }} + {{ $author := (index . 0) }} +

Author: {{ $author }}

+ {{ end }} - {{ .Content }} -
+ {{- if (not .Params.hideDate) }} + {{- $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{- $dateHuman := .Date | time.Format "Mon | Jan 2, 2006" }} +

Posted:

+ {{- end }} -
- {{ with .NextInSection }} -

Next: {{ .Title | markdownify }}

- {{ end }} + {{- range (.GetTerms "tags") }} + #{{ .LinkTitle }} + {{- end }} - {{ with .PrevInSection }} -

Previous: {{ .Title | markdownify }}

- {{ end }} -
+ {{- partial "image.html" + (dict + "image" (.Resources.GetMatch "featured") + "alt" .Params.featured.alt + "sizes" (slice 320 480 600 800) + "classes" (slice "shadow" "featured")) }} + {{ .Content }} + {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} {{ end }} diff --git a/layouts/authors/list.html b/layouts/authors/list.html index cdb2c19..9fe7924 100644 --- a/layouts/authors/list.html +++ b/layouts/authors/list.html @@ -1,33 +1,27 @@ {{ define "main" }} -
+
- {{ with .Resources.GetMatch "avatar" }} - {{ .Params.alt }} - {{ end }} + {{- with (.Resources.GetMatch "avatar") }} + {{- partial "image.html" + (dict + "image" . + "alt" .Params.alt + "sizes" (slice 320 500) + "classes" (slice "shadow" "author")) }} + {{- end }} -
-

{{ .Params.name }}

- Projects - | - {{ .Params.email}} -
- -
- -
- {{ .Content }} -
- -
-

Posts:

- {{ with .Data.Pages }} -
- {{ range . }} - {{ partial "article.html" . }} - {{ end }} -
- {{ end }} -
+
+

{{ .Params.name }}

+ Projects + | + {{ .Params.email}} +
+
+{{ .Content }} +
+ {{- range .Data.Pages }} + {{ partial "article.html" . }} + {{- end }} +
{{ end }} - diff --git a/layouts/authors/terms.html b/layouts/authors/terms.html index 5a750d6..f4f81a9 100644 --- a/layouts/authors/terms.html +++ b/layouts/authors/terms.html @@ -1,9 +1,14 @@ {{ define "main" }} -

Authors

- {{ range .Data.Pages }} - {{ partial "article-alternate.html" . }} - {{ end }} + {{- range .Data.Pages }} + {{- partial "article-alt.html" + (dict + "image" (.Resources.GetMatch "avatar") + "alt" .Params.alt + "title" .Params.name + "summary" .Params.bio + "url" (printf "/%s/%s" "authors" (.Params.name | urlize))) }} + {{- end }}
-{{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/article-alt.html b/layouts/partials/article-alt.html new file mode 100644 index 0000000..a372560 --- /dev/null +++ b/layouts/partials/article-alt.html @@ -0,0 +1,25 @@ +{{- /* +Renders an article card with a circle image, title, and summary. +@context {image} the image resource. +@context {alt} alt text for the image. +@context {title} the title of the card. +@context {summary} the summary text. +@context {url} the url of the article. +*/}} +{{- $image := .image }} +{{- $alt := .alt }} +{{- $title := .title }} +{{- $summary := .summary }} +{{- $url := .url }} +{{- $img := ($image.Resize "256x webp q90") }} + +
+
+ {{ $alt }} +
+
+

{{ $title }}

+

{{ $summary }}

+
+
+
diff --git a/layouts/partials/article-alternate.html b/layouts/partials/article-alternate.html deleted file mode 100644 index 4904ec9..0000000 --- a/layouts/partials/article-alternate.html +++ /dev/null @@ -1,14 +0,0 @@ - -
-
- {{ with .Resources.GetMatch "avatar" }} - {{ .Params.alt }} - {{ end }} -
-
-

{{ .Params.name }}

-

{{ .Params.bio }}

-
-
-
- diff --git a/layouts/partials/article-meta.html b/layouts/partials/article-meta.html deleted file mode 100644 index 85b8c7d..0000000 --- a/layouts/partials/article-meta.html +++ /dev/null @@ -1,19 +0,0 @@ -
- {{ with .Params.authors }} - {{ $author := (index . 0) }} -

Author: {{ $author }}

- {{ end }} - - {{ with .Date }} -

Posted: {{ .Format "Mon | Jan 2, 2006" }}

- {{ end }} - - {{ range (.GetTerms "tags") }} - - {{ .LinkTitle }} - - {{ end }} - - {{ $image := (.Resources.GetMatch "featured") }} - {{ partial "image.html" (dict "image" $image "alt" .Params.featured.alt "class" "shadow featured") }} -
diff --git a/layouts/partials/article.html b/layouts/partials/article.html index e6fa05d..4e290a7 100644 --- a/layouts/partials/article.html +++ b/layouts/partials/article.html @@ -1,22 +1,15 @@ -
- - - {{ $image := .Resources.GetMatch "featured" }} - {{ partial "image-small.html" (dict "image" $image "alt" .Params.featured.alt) }} + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index afd8cb9..675e7e5 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,2 @@ -
-
-

Authors

-

{{ $.Site.Copyright | safeHTML }}

-
+{{ partial "menu.html" (dict "menuID" "footer" "page" .) }} +

© 2020 – {{ now.Year }} Beet Box. All rights reserved.

diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..cba17f5 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,9 @@ + + +{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} +{{- partialCached "head/css.html" . }} + + +{{ with .OutputFormats.Get "rss" }} + {{- printf `` .Rel .MediaType.Type .Permalink site.Title | safeHTML }} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/head/css.html b/layouts/partials/head/css.html new file mode 100644 index 0000000..91b928d --- /dev/null +++ b/layouts/partials/head/css.html @@ -0,0 +1,9 @@ +{{- with resources.Get "css/main.css" }} + {{- if eq hugo.Environment "development" }} + + {{- else }} + {{- with . | minify | fingerprint }} + + {{- end }} + {{- end }} +{{- end }} diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html new file mode 100644 index 0000000..18fe842 --- /dev/null +++ b/layouts/partials/head/js.html @@ -0,0 +1,12 @@ +{{- with resources.Get "js/main.js" }} + {{- if eq hugo.Environment "development" }} + {{- with . | js.Build }} + + {{- end }} + {{- else }} + {{- $opts := dict "minify" true }} + {{- with . | js.Build $opts | fingerprint }} + + {{- end }} + {{- end }} +{{- end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index da6f5b5..d27c5d8 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,11 +1,8 @@ -
- -
+
+{{ with resources.Get site.Params.logo.src }} + {{ site.Params.logo.alt }} +{{ else }} +

{{ site.Title }}

+{{ end }} +{{ partial "menu.html" (dict "menuID" "main" "page" .) }} +
diff --git a/layouts/partials/image-small.html b/layouts/partials/image-small.html deleted file mode 100644 index 9c4c468..0000000 --- a/layouts/partials/image-small.html +++ /dev/null @@ -1,28 +0,0 @@ -{{ .Params.alt }} diff --git a/layouts/partials/image.html b/layouts/partials/image.html index 9c567e9..cfd8d7d 100644 --- a/layouts/partials/image.html +++ b/layouts/partials/image.html @@ -1,38 +1,43 @@ -{{ .Params.alt }} diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html new file mode 100644 index 0000000..7183180 --- /dev/null +++ b/layouts/partials/menu.html @@ -0,0 +1,51 @@ +{{- /* +Renders a menu for the given menu ID. + +@context {page} page The current page. +@context {string} menuID The menu ID. + +@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }} +*/}} + +{{- $page := .page }} +{{- $menuID := .menuID }} + +{{- with index site.Menus $menuID }} + +{{- end }} + +{{- define "partials/inline/menu/walk.html" }} + {{- $page := .page }} + {{- range .menuEntries }} + {{- $attrs := dict "href" .URL }} + {{- if $page.IsMenuCurrent .Menu . }} + {{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }} + {{- else if $page.HasMenuCurrent .Menu .}} + {{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }} + {{- end }} + {{- $name := .Name }} + {{- with .Identifier }} + {{- with T . }} + {{- $name = . }} + {{- end }} + {{- end }} +
  • + {{ $name }} + {{- with .Children }} +
      + {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} +
    + {{- end }} +
  • + {{- end }} +{{- end }} diff --git a/layouts/partials/posts-artfully-enumerated.html b/layouts/partials/posts-artfully-enumerated.html deleted file mode 100644 index 8b13789..0000000 --- a/layouts/partials/posts-artfully-enumerated.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/layouts/partials/posts-enumerated.html b/layouts/partials/posts-enumerated.html deleted file mode 100644 index 38b1727..0000000 --- a/layouts/partials/posts-enumerated.html +++ /dev/null @@ -1,20 +0,0 @@ -{{ with . }} -
    -

    Latest Posts:

    -
    - {{ range .Limit 5 }} - {{ partial "article.html" . }} - {{ end }} -
    - -

    All Posts:

    - {{ range .GroupByDate "2006" }} -

    {{ .Key}}

    - - {{ end }} -
    -{{ end }} diff --git a/layouts/partials/terms.html b/layouts/partials/terms.html new file mode 100644 index 0000000..8a6ebec --- /dev/null +++ b/layouts/partials/terms.html @@ -0,0 +1,23 @@ +{{- /* +For a given taxonomy, renders a list of terms assigned to the page. + +@context {page} page The current page. +@context {string} taxonomy The taxonomy. + +@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} +*/}} + +{{- $page := .page }} +{{- $taxonomy := .taxonomy }} + +{{- with $page.GetTerms $taxonomy }} + {{- $label := (index . 0).Parent.LinkTitle }} +
    +
    {{ $label }}:
    + +
    +{{- end }} diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html index 8bb157d..b01a098 100644 --- a/layouts/shortcodes/image.html +++ b/layouts/shortcodes/image.html @@ -1,3 +1,7 @@ {{ $image := .Page.Resources.GetMatch (.Get "src") }} -{{ partial "image.html" (dict "image" $image "alt" (.Get "alt") "class" "fill-wh") }} - +{{ partial "image.html" + (dict + "image" $image + "alt" (.Get "alt") + "sizes" (slice 320 480 600) + "classes" (slice "fill-wh")) }} \ No newline at end of file diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..67f8b777851849527933b78b1f98bd564d8255d1 GIT binary patch literal 15406 zcmeI3%WEH16vro|f`O{FV5Nc>unpZA42Xe(zeP4Fn0Fu>#YKe(c41L;qszMJ-bXDi z>L1W57+rSdLS5OG#!V^IKxvbj6n@gC#QOREdT$vg^US^Tf(#t)%-r+%o^#KA&hHll zeL;V)Z(l$;7%c7yg4co|7#w``eB{|6_?CCW!=`>H2!44k2#&ym2ojIpQ{=j)r>9?; zot^z+et!PXxw*M}BHinq>XMXKboc`~d=&+uPNklCgSOc%pC zkdxhQd};55Lm1#0hSD%6>D`)|ni^JI((I(w8QJADo{YL>VsSr%Ckg*U$-2s8+X=sG z{FIYm*irl0d{!y{D{f@u4p-n@#^$z+5S`e?RJu8p?Lq>0x`@}vIu7kfT z8Od5bMN4D{&~ch_$NgBcM#n%A`@~N^|ABlif3x_ci!t%#JQ&cWarai1&Z6~TkWOa9 zw}_GQ!9UZ~o(wFidYcy6DoF0rq<yz2-5e zTyl`ty!pUE-U+vC*KNN6@vklal>5+`8rxs}uh#LW?(tW105Q;7(Wx&Lm6uJ~)`e`X z^RF;~r?T~jY{_Q$A_iJ-m%jcoHny$5gr&~)r;P=1C}sVP-puv4#i0EM{FfkKed1Em zy4%`}me{Us{}sjpj#~DgVGO#rYen+cu9FI~=yTd>3AzfcLA`SnbFXu|pT#pXGc&>2(2!(N+83v|%y-!B zH|JI#fb9Zw1NxWuxyA*n7Wlp875YYr(Gs{zKTE)l_AX1Q6wmo%>|9k+6aP<2dk>lant}U*_E8rG3D-5uK;;yPx-8W%=Kfda!;c%(fl0 ze&XHrrr^uM0oGf>Z1DFnHhqLl>1%^5TzTuk|3H|*ul4(0o-gE;Z3>^kyq|VB2&R>$ z;3|M)g|TQza{|6pwl*t(FLk^UW^(9F%1?ditXdD)PeI>TZP%AQuxqb<#h1RS^?+T! z8Ck2^t}lCF{~KLC_TZ^~%@^LN9`I|g*;@RHecST~{FkHc(w1kiUj^&=w&0Dy`6E8G zdj4Yla1TF#N4vKWh(zA3A5dm)G|O@NEjS_AkOu zAJA`duQdQy-kiND%)+h<+}gi?*&_V<{_uGJE+68oBmMcH-Rl|t`yCgB%e&5Zsqq=>yyS- z+H#S&ls3nqdmTC0`~O|AJhXPJKi1jW{{U!5hztM# literal 0 HcmV?d00001 diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..fecded5 --- /dev/null +++ b/theme.toml @@ -0,0 +1,12 @@ +name = 'neon-harvest' +license = 'BSD 3-Clause' +licenselink = 'https://gitea.beetbox.io/BeetBox/neon-harvest/raw/branch/master/LICENSE' +description = 'The current Hugo theme for beetbox.io' + +# The home page of the theme, where the source can be found +homepage = 'https://gitea.beetbox.io/BeetBox/neon-harvest/' + +# If the theme has a single author +[author] + name = 'Alexander Avery' + homepage = 'https://beetbox.io/authors/alexander-avery'