From 83fbdc3ae92bbe4996a5077a0063c25c35399131 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 16 Oct 2024 17:57:10 -0400 Subject: [PATCH] WIP of gallery redesign --- content/art/nsfw/_index.md | 5 + content/art/original/_index.md | 6 ++ data/art/2024/charsheet-drfrizzly.json | 14 --- data/art/2024/charsheet-juritta.json | 14 --- data/art/2024/charsheet-luci.json | 14 --- data/art/2024/charsheet-merume.json | 14 --- .../charsheet-mysterious-swordswoman.json | 14 --- data/art/2024/charsheet-sakura.json | 13 --- themes/red/assets/css/site.css | 26 ++++- themes/red/layouts/_default/art-detail.html | 101 ++++++++---------- themes/red/layouts/_default/art-nsfw.html | 19 ++++ .../red/layouts/_default/art-originals.html | 22 ++++ themes/red/layouts/_default/art.html | 15 ++- themes/red/layouts/_default/arttag.html | 1 + themes/red/layouts/_default/baseof.html | 1 + themes/red/layouts/_default/character.html | 1 + themes/red/layouts/_default/guestart.html | 1 + themes/red/layouts/_default/listchar.html | 7 +- themes/red/layouts/partials/art-gallery.html | 11 +- themes/red/layouts/partials/render-art.html | 21 ++-- 20 files changed, 153 insertions(+), 167 deletions(-) create mode 100644 content/art/nsfw/_index.md create mode 100644 content/art/original/_index.md delete mode 100644 data/art/2024/charsheet-drfrizzly.json delete mode 100644 data/art/2024/charsheet-juritta.json delete mode 100644 data/art/2024/charsheet-luci.json delete mode 100644 data/art/2024/charsheet-merume.json delete mode 100644 data/art/2024/charsheet-mysterious-swordswoman.json delete mode 100644 data/art/2024/charsheet-sakura.json create mode 100644 themes/red/layouts/_default/art-nsfw.html create mode 100644 themes/red/layouts/_default/art-originals.html diff --git a/content/art/nsfw/_index.md b/content/art/nsfw/_index.md new file mode 100644 index 0000000..24a3e4a --- /dev/null +++ b/content/art/nsfw/_index.md @@ -0,0 +1,5 @@ +--- +title: "NSFW Art" +layout: "art-nsfw" +--- + diff --git a/content/art/original/_index.md b/content/art/original/_index.md new file mode 100644 index 0000000..f21b278 --- /dev/null +++ b/content/art/original/_index.md @@ -0,0 +1,6 @@ +--- +title: "Original Art" +layout: "art-originals" +--- + +These are artworks I created of my own original characters! diff --git a/data/art/2024/charsheet-drfrizzly.json b/data/art/2024/charsheet-drfrizzly.json deleted file mode 100644 index c3d582e..0000000 --- a/data/art/2024/charsheet-drfrizzly.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "alt_text": "Character sheet of one Dr. Frizzly, a (mad?) scientist who makes minigames. He's clad in a white coat, a dark green undershirt and one messy tie. He's also decked out in khakis.", - "characters": [ - "Dr. Frizzly" - ], - "date": "2024-06-22", - "description": "Artfight preparation :-)", - "mastodon_url": "https://mastodon.art/@redstrate/112662289434324901", - "program": "Krita", - "tags": [ - "character sheet" - ], - "title": "Dr. Frizzly Character Sheet" -} diff --git a/data/art/2024/charsheet-juritta.json b/data/art/2024/charsheet-juritta.json deleted file mode 100644 index 81cdd5b..0000000 --- a/data/art/2024/charsheet-juritta.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "alt_text": "Character sheet of Juritta, a Warrior of Light from FFXIV. She's a Viera, and clad in a green-ish dancers outfit. She has her hair tied up on one side, while letting the rest loose.", - "characters": [ - "Juritta" - ], - "date": "2024-06-22", - "description": "Artfight preparation :-)", - "mastodon_url": "https://mastodon.art/@redstrate/112662299507727427", - "program": "Krita", - "tags": [ - "character sheet" - ], - "title": "Juritta Character Sheet" -} diff --git a/data/art/2024/charsheet-luci.json b/data/art/2024/charsheet-luci.json deleted file mode 100644 index f433a47..0000000 --- a/data/art/2024/charsheet-luci.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "alt_text": "Character sheet of Luci, an electrical engineering student. To that end, she's wearing a T-shirt with \"EE\" on it. She also has purple short hair, a pair of red glasses and some baggy dark pants.", - "characters": [ - "Luci" - ], - "date": "2024-06-22", - "description": "Artfight preparation :-)", - "mastodon_url": "https://mastodon.art/@redstrate/112662289434324901", - "program": "Krita", - "tags": [ - "character sheet" - ], - "title": "Luci Character Sheet" -} diff --git a/data/art/2024/charsheet-merume.json b/data/art/2024/charsheet-merume.json deleted file mode 100644 index 618bbac..0000000 --- a/data/art/2024/charsheet-merume.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "alt_text": "Character sheet of Merume, a four-armed succubus with blue ponytails. She has long elven-like ears, a basic tanktop on and some shorts. She's also sporting a tail and some socks.", - "characters": [ - "Merume" - ], - "date": "2024-06-22", - "description": "Artfight preparation :-)", - "mastodon_url": "https://mastodon.art/@redstrate/112662299507727427", - "program": "Krita", - "tags": [ - "character sheet" - ], - "title": "Merume Character Sheet" -} diff --git a/data/art/2024/charsheet-mysterious-swordswoman.json b/data/art/2024/charsheet-mysterious-swordswoman.json deleted file mode 100644 index f80a80a..0000000 --- a/data/art/2024/charsheet-mysterious-swordswoman.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "alt_text": "Character sheet of a young woman, nicknamed \"Mysterious Swordswoman\". She has medium long brown hair, dark eyes and is dressed in dark garments with a golden touch. She is wielding a sword on her right.", - "characters": [ - "Mysterious Swordswoman" - ], - "date": "2024-06-22", - "description": "Artfight preparation :-) Based off of her 2023 sheet", - "mastodon_url": "https://mastodon.art/@redstrate/112662289434324901", - "program": "Krita", - "tags": [ - "character sheet" - ], - "title": "Mysterious Swordswoman Character Sheet" -} diff --git a/data/art/2024/charsheet-sakura.json b/data/art/2024/charsheet-sakura.json deleted file mode 100644 index be5cb9c..0000000 --- a/data/art/2024/charsheet-sakura.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "alt_text": "Character sheet of Sakura, one lone catgirl with long dirty blonde hair. She's got leggings and a sports tank on. Oh, and some shoes for running?", - "characters": [ - "Sakura" - ], - "date": "2024-06-22", - "description": "Artfight preparation :-) Based off of her 2023 sheet", - "mastodon_url": "https://mastodon.art/@redstrate/112662299507727427", - "tags": [ - "character sheet" - ], - "title": "Sakura Character Sheet" -} diff --git a/themes/red/assets/css/site.css b/themes/red/assets/css/site.css index b174dcc..8acfdd5 100644 --- a/themes/red/assets/css/site.css +++ b/themes/red/assets/css/site.css @@ -128,6 +128,7 @@ body { accent-color: var(--accent-color); color: var(--text-color); + font-family: sans-serif; } @@ -382,10 +383,31 @@ figure figcaption { margin-right: 5px; } +.grid-container { + background-color: var(--background-tertiary); + margin: -15px; + margin-top: 20px; + margin-bottom: 20px; + padding: 15px; + border-top: 1px solid var(--border-color); + border-bottom: 1px solid var(--border-color); +} + +.grid-item { + border: 1px solid var(--border-color); + border-radius: 3px; + background-color: var(--background-secondary); + margin-bottom: 8px; + padding-bottom: 5px; +} .grid-item img { - border: 1px inset black; - border-radius: 3px; + border-bottom: 1px solid var(--border-color); +} + +.grid-item span { + padding: 10px; + color: var(--text-color); } .grid { diff --git a/themes/red/layouts/_default/art-detail.html b/themes/red/layouts/_default/art-detail.html index f560807..af14b26 100644 --- a/themes/red/layouts/_default/art-detail.html +++ b/themes/red/layouts/_default/art-detail.html @@ -2,7 +2,12 @@ {{ define "main" }}

{{ .Title }}

- + + Posted on + +
{{ if (and (not $.Params.animation) (and (not (in .File.Dir "art/guest")) (and (not $.Params.threed) (not $.Params.comic) )) ) }} @@ -51,16 +56,47 @@ {{ partial "voting" . }} - - - - - + {{ with .Content }} + {{ $.Scratch.Set "header-type" "h3" }} + {{ $.Scratch.Set "header-name" "Commentary" }} + {{ partial "fake-heading.html" $ }} + {{ . }} + {{ end }} + + {{ if .Params.threed }} + {{ $site := resources.Get "js/model-viewer.min.js" }} + {{ if hugo.IsProduction }} + {{ $site = $site | fingerprint | resources.PostProcess }} + {{ end }} + + {{ end }} + + {{ partial "comments" . }} +{{ end }} + +{{ define "details" }} + This artwork was also posted on: + +
+ + {{ with .Params.mastodon_url }} + Mastodon icon + {{ end }} + + {{ with .Params.pixiv_url }} + Pixiv icon + {{ end }} +
+ + Created with: +
+ + {{ with .Params.program }} + {{ . }} + {{ end }} + +
{{ i18n "date" }} - -
{{ with .Params.arttags }} @@ -93,50 +129,5 @@ {{ end }} - - {{ with .Params.program }} - - - - - {{ end }} - - {{ with .Params.mastodon_url }} - - - - - {{ end }} - - {{ with .Params.pixiv_url }} - - - - - {{ end }}
{{ i18n "tags" }}
{{ i18n "program" }} - {{ . }} -
Mastodon URL - Mastodon Post -
Pixiv URL - Pixiv Post -
- - {{ with .Content }} - {{ $.Scratch.Set "header-type" "h3" }} - {{ $.Scratch.Set "header-name" "Commentary" }} - {{ partial "fake-heading.html" $ }} - - {{ . }} - {{ end }} - - {{ if .Params.threed }} - {{ $site := resources.Get "js/model-viewer.min.js" }} - {{ if hugo.IsProduction }} - {{ $site = $site | fingerprint | resources.PostProcess }} - {{ end }} - - {{ end }} - - {{ partial "comments" . }} {{ end }} diff --git a/themes/red/layouts/_default/art-nsfw.html b/themes/red/layouts/_default/art-nsfw.html new file mode 100644 index 0000000..bf3d195 --- /dev/null +++ b/themes/red/layouts/_default/art-nsfw.html @@ -0,0 +1,19 @@ +{{/* Page layout used for the main art gallery page. */}} + +{{ define "main" }} +

{{ .Title }}

+ +
+ + {{ .Content }} + + {{ $tags := slice "fan art" "artfight" }} + {{ $art := .Site.GetPage "/art" }} + {{ $artworks := (where $art.RegularPagesRecursive "Type" "art") }} + {{ $nsfw_art := (where $artworks "Params.nsfw" "=" true) }} + + {{ $.Scratch.Set "paginator" (.Paginate $nsfw_art) }} + {{ partial "art-gallery" . }} + + {{ partial "gallery-js" . }} +{{ end }} diff --git a/themes/red/layouts/_default/art-originals.html b/themes/red/layouts/_default/art-originals.html new file mode 100644 index 0000000..6121f07 --- /dev/null +++ b/themes/red/layouts/_default/art-originals.html @@ -0,0 +1,22 @@ +{{/* Page layout used for the main art gallery page. */}} + +{{ define "main" }} +

{{ .Title }}

+ +
+ + {{ .Content }} + + {{ $tags := slice "fan art" "artfight" }} + {{ $art := .Site.GetPage "/art" }} + {{ $artworks := (where $art.RegularPagesRecursive "Type" "art") }} + {{ $fan_art := (where $artworks "Params.arttags" "intersect" $tags) }} + {{ $guest_art := (where $artworks "Params.guest" "=" true) }} + {{ $nsfw_art := (where $artworks "Params.nsfw" "=" true) }} + {{ $originals := complement $fan_art $guest_art $nsfw_art $artworks }} + + {{ $.Scratch.Set "paginator" (.Paginate $originals) }} + {{ partial "art-gallery" . }} + + {{ partial "gallery-js" . }} +{{ end }} diff --git a/themes/red/layouts/_default/art.html b/themes/red/layouts/_default/art.html index c5c0d68..0c5137f 100644 --- a/themes/red/layouts/_default/art.html +++ b/themes/red/layouts/_default/art.html @@ -5,9 +5,6 @@
- {{ $paginator := .Paginate (where .RegularPagesRecursive "Type" "art") }} - - {{ if eq $paginator.PageNumber 1}}
{{ $alertimg := resources.Get "alert.png" }} @@ -24,15 +21,15 @@
- {{ end }} - {{ partial "art-gallery" . }} + Original
+ Fanart
+ NSFW
+ Guest
+ Characters {{ partial "art-years" . }} diff --git a/themes/red/layouts/_default/arttag.html b/themes/red/layouts/_default/arttag.html index 874f06a..39078e9 100644 --- a/themes/red/layouts/_default/arttag.html +++ b/themes/red/layouts/_default/arttag.html @@ -1,6 +1,7 @@ {{ define "main" }}

{{ .Title }}


+ {{ $.Scratch.Set "paginator" (.Paginate (where .Pages "Type" "art")) }} {{ partial "art-gallery" . }} {{ partial "gallery-js" . }} {{ end }} diff --git a/themes/red/layouts/_default/baseof.html b/themes/red/layouts/_default/baseof.html index 315de14..9c164d1 100644 --- a/themes/red/layouts/_default/baseof.html +++ b/themes/red/layouts/_default/baseof.html @@ -11,6 +11,7 @@
{{- block "main" . }}{{- end }} + diff --git a/themes/red/layouts/_default/character.html b/themes/red/layouts/_default/character.html index 419c97a..a64ba3d 100644 --- a/themes/red/layouts/_default/character.html +++ b/themes/red/layouts/_default/character.html @@ -30,6 +30,7 @@
{{ end }} + {{ $paginator := .Paginate (where $.Site.Pages "Type" "art") }} {{ partial "art-gallery" . }} {{ $paginator := (where (where .RegularPagesRecursive "Type" "art") "Params.guest" "=" true) }} diff --git a/themes/red/layouts/_default/guestart.html b/themes/red/layouts/_default/guestart.html index 8e17a7a..a8507f0 100644 --- a/themes/red/layouts/_default/guestart.html +++ b/themes/red/layouts/_default/guestart.html @@ -10,6 +10,7 @@ {{ .Content }} {{ end }} + {{ $.Scratch.Set "paginator" (.Paginate ((where (where .RegularPagesRecursive "Type" "art") "Params.guest" "=" true))) }} {{ partial "art-gallery" . }} {{ partial "gallery-js" . }} diff --git a/themes/red/layouts/_default/listchar.html b/themes/red/layouts/_default/listchar.html index 4388eb3..633986e 100644 --- a/themes/red/layouts/_default/listchar.html +++ b/themes/red/layouts/_default/listchar.html @@ -6,6 +6,7 @@

Original

+
{{ range $name, $taxonomy := (index .Site.Taxonomies .Params.listtag) }} {{ $original := false }} @@ -17,10 +18,10 @@ {{ $taxonomy.Page.Title }} {{ end }} {{ end }} +

Others

- - +
{{ range $name, $taxonomy := (index .Site.Taxonomies .Params.listtag) }} {{ $original := false }} {{ if $taxonomy.Page.Params.original }} @@ -31,5 +32,5 @@ {{ $taxonomy.Page.Title }} {{ end }} {{ end }} - +
{{ end }} diff --git a/themes/red/layouts/partials/art-gallery.html b/themes/red/layouts/partials/art-gallery.html index dce2a72..853efa7 100644 --- a/themes/red/layouts/partials/art-gallery.html +++ b/themes/red/layouts/partials/art-gallery.html @@ -1,20 +1,17 @@ {{/* Partial used to display a grid of artwork. */}} -{{ $paginator := .Paginate (where $.Site.Pages "Type" "art") }} - {{ template "_internal/pagination.html" . }} -{{ $on_guest := eq .Title "Guest Art" }} +{{ $paginator := .Scratch.Get "paginator" }} +
{{ range $paginator.Pages }} - {{ $is_guest := .Params.guest }} - {{ if eq $on_guest $is_guest }} - {{ partial "render-art" . }} - {{ end }} + {{ partial "render-art" . }} {{ end }}
+
{{ template "_internal/pagination.html" . }} diff --git a/themes/red/layouts/partials/render-art.html b/themes/red/layouts/partials/render-art.html index 272316a..f9ff583 100644 --- a/themes/red/layouts/partials/render-art.html +++ b/themes/red/layouts/partials/render-art.html @@ -9,28 +9,33 @@ {{ $year := .Date.Format "2006" }} {{ with $full }} + + + {{ $.Params.alt_text }} + + + + {{ $title }}, {{ $year }} + {{ if $.Params.threed }} {{ with resources.Get "3d.png" }} - 3D cube icon + 3D cube icon {{ end }} {{ end }} {{ if $.Params.comic }} {{ with resources.Get "comic.png" }} - Comic icon + Comic icon {{ end }} {{ end }} + {{ if $.Params.animation }} {{ with resources.Get "play-circle.png" }} - Play animation icon + Play animation icon {{ end }} {{ end }} - - - - {{ $.Params.alt_text }} - + {{ end }}