From c3c96d57e6544c0202f514ce874831f4cd83a96d Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 12 Oct 2024 14:59:49 -0400 Subject: [PATCH] Remove more of me from the theme --- config.yaml | 2 ++ themes/red/layouts/_default/art-detail.html | 12 ++++++------ themes/red/layouts/_default/art-stats.html | 2 +- themes/red/layouts/_default/listchar.html | 4 ++-- themes/red/layouts/_default/wallpaper.html | 6 +++--- themes/red/layouts/partials/art-years.html | 2 +- themes/red/layouts/partials/featured-art.html | 4 ++-- themes/red/layouts/partials/render-art.html | 4 ++-- themes/red/layouts/shortcodes/kofi.html | 2 +- 9 files changed, 20 insertions(+), 18 deletions(-) diff --git a/config.yaml b/config.yaml index cff29fb..99807bf 100644 --- a/config.yaml +++ b/config.yaml @@ -36,6 +36,8 @@ params: - rss-image.png author: 'redstrate' fediverse_url: "@redstrate@mastodon.art" + image_host: "https://images.redstrate.com" + kofi_username: 'redstrate' permalinks: blog: 'blog/:year/:month/:title/' diff --git a/themes/red/layouts/_default/art-detail.html b/themes/red/layouts/_default/art-detail.html index 7733d6d..d02ad21 100644 --- a/themes/red/layouts/_default/art-detail.html +++ b/themes/red/layouts/_default/art-detail.html @@ -6,8 +6,8 @@
{{ if (and (not $.Params.animation) (and (not (in .File.Dir "art/guest")) (and (not $.Params.threed) (not $.Params.comic) )) ) }} - {{ $full := printf "https://images.redstrate.com/art/%s.avif" $.Params.slug }} - {{ $jpeg := printf "https://images.redstrate.com/art/%s.jpg" $.Params.slug }} + {{ $full := printf "%s/art/%s.avif" $.Site.Params.image_host $.Params.slug }} + {{ $jpeg := printf "%s/art/%s.jpg" $.Site.Params.image_host $.Params.slug }} @@ -16,7 +16,7 @@ {{ else }} {{ if $.Params.threed }} - {{ $file := printf "https://images.redstrate.com/3d/%s.glb" $.Params.slug }} + {{ $file := printf "%s/3d/%s.glb" $.Site.Params.image_host $.Params.slug }} {{ with $file }} {{ $cameraorbit := $.Params.orbit }} {{ $cameratarget := $.Params.target }} @@ -24,7 +24,7 @@ {{ end }} {{ else }} - {{ $file := printf "https://images.redstrate.com/animation/%s.webm" $.Params.slug }} + {{ $file := printf "%s/animation/%s.webm" $.Site.Params.image_host $.Params.slug }} {{ with $file }} {{ if $.Params.animation }}
@@ -39,8 +39,8 @@ {{ if $.Params.comic }} {{ range $.Params.pages }} - {{ $full := printf "https://images.redstrate.com/art/%s.avif" .filename }} - {{ $jpeg := printf "https://images.redstrate.com/art/%s.jpg" .filename}} + {{ $full := printf "%s/art/%s.avif" $.Site.Params.image_host .filename }} + {{ $jpeg := printf "%s/art/%s.jpg" $.Site.Params.image_host .filename}} diff --git a/themes/red/layouts/_default/art-stats.html b/themes/red/layouts/_default/art-stats.html index bcbb4e3..0f8f156 100644 --- a/themes/red/layouts/_default/art-stats.html +++ b/themes/red/layouts/_default/art-stats.html @@ -12,7 +12,7 @@ {{ range first 10 (index site.Taxonomies "characters").ByCount }} {{ $year := .Page.Title }} {{ $num := .Count }} - {{ $year }}
({{ $num }} artworks)
+ {{ $year }}
({{ $num }} artworks)
{{ end }} diff --git a/themes/red/layouts/_default/listchar.html b/themes/red/layouts/_default/listchar.html index e264289..4388eb3 100644 --- a/themes/red/layouts/_default/listchar.html +++ b/themes/red/layouts/_default/listchar.html @@ -14,7 +14,7 @@ {{ end }} {{ if $original }} - {{ $taxonomy.Page.Title }} + {{ $taxonomy.Page.Title }} {{ end }} {{ end }} @@ -28,7 +28,7 @@ {{ end }} {{ if not $original }} - {{ $taxonomy.Page.Title }} + {{ $taxonomy.Page.Title }} {{ end }} {{ end }} diff --git a/themes/red/layouts/_default/wallpaper.html b/themes/red/layouts/_default/wallpaper.html index d402997..d1d8415 100644 --- a/themes/red/layouts/_default/wallpaper.html +++ b/themes/red/layouts/_default/wallpaper.html @@ -31,8 +31,8 @@ {{ $title := .Title }} - {{ $full := printf "https://images.redstrate.com/thumb/%s.avif" $filename_without_ext }} - {{ $jpeg := printf "https://images.redstrate.com/thumb/%s.jpg" $filename_without_ext }} + {{ $full := printf "%s/thumb/%s.avif" $.Site.Params.image_host $filename_without_ext }} + {{ $jpeg := printf "%s/thumb/%s.jpg" $.Site.Params.image_host $filename_without_ext }} @@ -48,6 +48,6 @@ {{ end }}

{{ .resolution }}

-

Download PNG ({{ .size }})

+

Download PNG ({{ .size }})

{{ end }} {{ end }} diff --git a/themes/red/layouts/partials/art-years.html b/themes/red/layouts/partials/art-years.html index 5a37254..fec09ac 100644 --- a/themes/red/layouts/partials/art-years.html +++ b/themes/red/layouts/partials/art-years.html @@ -4,7 +4,7 @@ {{ range (where .Site.RegularPages "Type" "in" "art").GroupByDate "2006" }} {{ with .Key }} - {{ $thumbp := printf "https://images.redstrate.com/year-thumbs/%s.webp" . }} + {{ $thumbp := printf "%s/year-thumbs/%s.webp" $.Site.Params.image_host . }} A thumbnail of {{ . }}'s art with the text in the center. {{ end }} diff --git a/themes/red/layouts/partials/featured-art.html b/themes/red/layouts/partials/featured-art.html index 5da6fc4..ace15b2 100644 --- a/themes/red/layouts/partials/featured-art.html +++ b/themes/red/layouts/partials/featured-art.html @@ -29,8 +29,8 @@ {{ $title := .Title }} {{ if $use_newformat }} - {{ $full := printf "https://images.redstrate.com/thumb/%s.avif" $filename_without_ext }} - {{ $jpeg := printf "https://images.redstrate.com/thumb/%s.jpg" $filename_without_ext }} + {{ $full := printf "%s/thumb/%s.avif" $.Site.Params.image_host $filename_without_ext }} + {{ $jpeg := printf "%s/thumb/%s.jpg" $.Site.Params.image_host $filename_without_ext }} diff --git a/themes/red/layouts/partials/render-art.html b/themes/red/layouts/partials/render-art.html index 4ad0e0f..d6c77be 100644 --- a/themes/red/layouts/partials/render-art.html +++ b/themes/red/layouts/partials/render-art.html @@ -1,7 +1,7 @@ {{/* Partial used to display a thumbnail of an artwork. */}} -{{ $full := printf "https://images.redstrate.com/thumb/%s.avif" .Params.slug }} -{{ $jpeg := printf "https://images.redstrate.com/thumb/%s.jpg" .Params.slug }} +{{ $full := printf "%s/thumb/%s.avif" $.Site.Params.image_host .Params.slug }} +{{ $jpeg := printf "%s/thumb/%s.jpg" $.Site.Params.image_host .Params.slug }} diff --git a/themes/red/layouts/shortcodes/kofi.html b/themes/red/layouts/shortcodes/kofi.html index 0e25d55..821a5bc 100644 --- a/themes/red/layouts/shortcodes/kofi.html +++ b/themes/red/layouts/shortcodes/kofi.html @@ -1 +1 @@ - +