From 42a9fa056d10120cd5f0e7ac6452eebe9e3089af Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Fri, 11 Oct 2024 19:17:41 -0400 Subject: [PATCH] Add wallpapers page --- content/art/wallpapers/_index.md | 6 +++ data/wallpapers.json | 29 ++++++++++++ themes/red/layouts/_default/wallpaper.html | 53 ++++++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 content/art/wallpapers/_index.md create mode 100644 data/wallpapers.json create mode 100644 themes/red/layouts/_default/wallpaper.html diff --git a/content/art/wallpapers/_index.md b/content/art/wallpapers/_index.md new file mode 100644 index 0000000..6acf681 --- /dev/null +++ b/content/art/wallpapers/_index.md @@ -0,0 +1,6 @@ +--- +title: "Wallpapers" +layout: "wallpaper" +--- + +Here's a selection of my artwork as uncompressed PNG (ideal for wallpapers), instead of the 1920 x 1080 compressed versions you'll find elsewhere: diff --git a/data/wallpapers.json b/data/wallpapers.json new file mode 100644 index 0000000..2b5044b --- /dev/null +++ b/data/wallpapers.json @@ -0,0 +1,29 @@ +{ + "wallpapers": [ + { + "art": "another-thursday", + "resolution": "3840 x 2160", + "size": "6.5 MiB" + }, + { + "art": "bringontheketchup", + "resolution": "3840 x 2160", + "size": "4.4 MiB" + }, + { + "art": "moonlight", + "resolution": "3840 x 2160", + "size": "5.5 MiB" + }, + { + "art": "orbit-correction", + "resolution": "3840 x 2160", + "size": "4.2 MiB" + }, + { + "art": "mythra", + "resolution": "3840 x 2160", + "size": "4.8 MiB" + } + ] +} diff --git a/themes/red/layouts/_default/wallpaper.html b/themes/red/layouts/_default/wallpaper.html new file mode 100644 index 0000000..d402997 --- /dev/null +++ b/themes/red/layouts/_default/wallpaper.html @@ -0,0 +1,53 @@ +{{/* Page layout used for art wallpapers page. */}} + +{{ define "main" }} +

{{ .Title }}

+
+ + {{ .Content }} + + {{ $art := $.GetPage "/art" }} + + {{ $wallpapers := index .Site.Data "wallpapers" }} + {{ range $wallpapers.wallpapers }} + {{ with $art.GetPage .art }} + + {{ $month := "1" }} + {{ $year := "1" }} + + {{ if .Date }} + {{ $split := split .Date "-" }} + {{ $month = index $split 1 }} + {{ $year = index $split 0 }} + {{ end }} + +
+

{{ .Title }} ({{ $year }})

+ + {{ end }} +

{{ .resolution }}

+

Download PNG ({{ .size }})

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