WIP of gallery redesign

This commit is contained in:
Joshua Goins 2024-10-16 17:57:10 -04:00
parent b9753bc9f5
commit 83fbdc3ae9
20 changed files with 153 additions and 167 deletions

View file

@ -0,0 +1,5 @@
---
title: "NSFW Art"
layout: "art-nsfw"
---

View file

@ -0,0 +1,6 @@
---
title: "Original Art"
layout: "art-originals"
---
These are artworks I created of my own original characters!

View file

@ -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"
}

View file

@ -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"
}

View file

@ -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"
}

View file

@ -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"
}

View file

@ -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"
}

View file

@ -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"
}

View file

@ -128,6 +128,7 @@ body {
accent-color: var(--accent-color); accent-color: var(--accent-color);
color: var(--text-color); color: var(--text-color);
font-family: sans-serif;
} }
@ -382,10 +383,31 @@ figure figcaption {
margin-right: 5px; 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 { .grid-item img {
border: 1px inset black; border-bottom: 1px solid var(--border-color);
border-radius: 3px; }
.grid-item span {
padding: 10px;
color: var(--text-color);
} }
.grid { .grid {

View file

@ -2,7 +2,12 @@
{{ define "main" }} {{ define "main" }}
<h2>{{ .Title }}</h2> <h2>{{ .Title }}</h2>
<i style="margin: 0">
Posted on
<time datetime="{{ .Page.Lastmod.Format "2006-01-02" }}" class="text-muted">
{{ $.Date.Format "January 2006" }}
</time>
</i>
<hr> <hr>
{{ if (and (not $.Params.animation) (and (not (in .File.Dir "art/guest")) (and (not $.Params.threed) (not $.Params.comic) )) ) }} {{ 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" . }} {{ partial "voting" . }}
<table> {{ with .Content }}
<tr> {{ $.Scratch.Set "header-type" "h3" }}
<th>{{ i18n "date" }}</th> {{ $.Scratch.Set "header-name" "Commentary" }}
<td> {{ partial "fake-heading.html" $ }}
<time datetime="{{ .Page.Lastmod.Format "2006-01-02" }}" class="text-muted">
{{ $.Date.Format "January 2006" }}
</time>
</td>
</tr>
{{ . }}
{{ end }}
{{ if .Params.threed }}
{{ $site := resources.Get "js/model-viewer.min.js" }}
{{ if hugo.IsProduction }}
{{ $site = $site | fingerprint | resources.PostProcess }}
{{ end }}
<script type="module" src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>
{{ end }}
{{ partial "comments" . }}
{{ end }}
{{ define "details" }}
<strong>This artwork was also posted on:</strong>
<br>
{{ with .Params.mastodon_url }}
<a href="{{ . }}"><img class="symbolic-icon" alt="Mastodon icon" title="Mastodon" width="32" height="32" src="/icons/mastodon.svg"/></a>
{{ end }}
{{ with .Params.pixiv_url }}
<a href="{{ . }}"><img class="symbolic-icon" alt="Pixiv icon" title="Pixiv" width="32" height="32" src="/icons/pixiv.svg"/></a>
{{ end }}
<br>
<strong>Created with:</strong>
<br>
{{ with .Params.program }}
<span>{{ . }}</span>
{{ end }}
<table>
{{ with .Params.arttags }} {{ with .Params.arttags }}
<tr> <tr>
<th>{{ i18n "tags" }}</th> <th>{{ i18n "tags" }}</th>
@ -93,50 +129,5 @@
</td> </td>
</tr> </tr>
{{ end }} {{ end }}
{{ with .Params.program }}
<tr>
<th>{{ i18n "program" }}</th>
<td>
{{ . }}
</td>
</tr>
{{ end }}
{{ with .Params.mastodon_url }}
<tr>
<th>Mastodon URL</th>
<td>
<a href="{{ . }}">Mastodon Post</a>
</td>
</tr>
{{ end }}
{{ with .Params.pixiv_url }}
<tr>
<th>Pixiv URL</th>
<td>
<a href="{{ . }}">Pixiv Post</a>
</td>
</tr>
{{ end }}
</table> </table>
{{ 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 }}
<script type="module" src="{{ $site.RelPermalink }}" integrity="{{ $site.Data.Integrity }}"></script>
{{ end }}
{{ partial "comments" . }}
{{ end }} {{ end }}

View file

@ -0,0 +1,19 @@
{{/* Page layout used for the main art gallery page. */}}
{{ define "main" }}
<h2>{{ .Title }}</h2>
<hr>
{{ .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 }}

View file

@ -0,0 +1,22 @@
{{/* Page layout used for the main art gallery page. */}}
{{ define "main" }}
<h2>{{ .Title }}</h2>
<hr>
{{ .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 }}

View file

@ -5,9 +5,6 @@
<hr> <hr>
{{ $paginator := .Paginate (where .RegularPagesRecursive "Type" "art") }}
{{ if eq $paginator.PageNumber 1}}
<div class="art-outer"> <div class="art-outer">
<div class="art-inner"> <div class="art-inner">
{{ $alertimg := resources.Get "alert.png" }} {{ $alertimg := resources.Get "alert.png" }}
@ -24,15 +21,15 @@
</div> </div>
<div class="art-button-container"> <div class="art-button-container">
<a class="art-button" href="/art/characters">Characters</a>
<a class="art-button" href="/art/tags">Tags</a>
<a class="art-button" href="/art/stats">Statistics</a> <a class="art-button" href="/art/stats">Statistics</a>
<a class="art-button" href="/art/guest">Guest Art</a> <a class="art-button" href="/commission">Commission Info</a>
<a class="art-button" href="/commission">Commission</a>
</div> </div>
{{ end }}
{{ partial "art-gallery" . }} <a class="art-button" href="/art/original">Original</a><br>
<a class="art-button" href="/art/tags/fan-art/">Fanart</a><br>
<a class="art-button" href="/art/nsfw">NSFW</a><br>
<a class="art-button" href="/art/guest">Guest</a><br>
<a class="art-button" href="/art/characters">Characters</a>
{{ partial "art-years" . }} {{ partial "art-years" . }}

View file

@ -1,6 +1,7 @@
{{ define "main" }} {{ define "main" }}
<h2>{{ .Title }}</h2> <h2>{{ .Title }}</h2>
<hr> <hr>
{{ $.Scratch.Set "paginator" (.Paginate (where .Pages "Type" "art")) }}
{{ partial "art-gallery" . }} {{ partial "art-gallery" . }}
{{ partial "gallery-js" . }} {{ partial "gallery-js" . }}
{{ end }} {{ end }}

View file

@ -11,6 +11,7 @@
</div> </div>
{{- block "main" . }}{{- end }} {{- block "main" . }}{{- end }}
</article> </article>
<aside>{{- block "details" . }}{{- end }}</aside>
</div> </div>
<footer>{{- partial "footer.html" . -}}</footer> <footer>{{- partial "footer.html" . -}}</footer>

View file

@ -30,6 +30,7 @@
<hr> <hr>
{{ end }} {{ end }}
{{ $paginator := .Paginate (where $.Site.Pages "Type" "art") }}
{{ partial "art-gallery" . }} {{ partial "art-gallery" . }}
{{ $paginator := (where (where .RegularPagesRecursive "Type" "art") "Params.guest" "=" true) }} {{ $paginator := (where (where .RegularPagesRecursive "Type" "art") "Params.guest" "=" true) }}

View file

@ -10,6 +10,7 @@
{{ .Content }} {{ .Content }}
{{ end }} {{ end }}
{{ $.Scratch.Set "paginator" (.Paginate ((where (where .RegularPagesRecursive "Type" "art") "Params.guest" "=" true))) }}
{{ partial "art-gallery" . }} {{ partial "art-gallery" . }}
{{ partial "gallery-js" . }} {{ partial "gallery-js" . }}

View file

@ -6,6 +6,7 @@
<hr> <hr>
<h3>Original</h3> <h3>Original</h3>
<div class="generic-con">
{{ range $name, $taxonomy := (index .Site.Taxonomies .Params.listtag) }} {{ range $name, $taxonomy := (index .Site.Taxonomies .Params.listtag) }}
{{ $original := false }} {{ $original := false }}
@ -17,10 +18,10 @@
<a class="character" href="{{ $.Params.url | relLangURL }}{{ $name | urlize }}"><img class="gallery-img" width=256 height=256 src="{{ $.Site.Params.image_host }}/chars/{{ $name | urlize }}.jpg"/><span>{{ $taxonomy.Page.Title }}</span></a> <a class="character" href="{{ $.Params.url | relLangURL }}{{ $name | urlize }}"><img class="gallery-img" width=256 height=256 src="{{ $.Site.Params.image_host }}/chars/{{ $name | urlize }}.jpg"/><span>{{ $taxonomy.Page.Title }}</span></a>
{{ end }} {{ end }}
{{ end }} {{ end }}
</div>
<h3>Others</h3> <h3>Others</h3>
<div class="generic-con">
{{ range $name, $taxonomy := (index .Site.Taxonomies .Params.listtag) }} {{ range $name, $taxonomy := (index .Site.Taxonomies .Params.listtag) }}
{{ $original := false }} {{ $original := false }}
{{ if $taxonomy.Page.Params.original }} {{ if $taxonomy.Page.Params.original }}
@ -31,5 +32,5 @@
<a class="character" href="{{ $.Params.url | relLangURL }}{{ $name | urlize }}"><img class="gallery-img" width=256 height=256 src="{{ $.Site.Params.image_host }}/chars/{{ $name | urlize }}.jpg"/><span>{{ $taxonomy.Page.Title }}</span></a> <a class="character" href="{{ $.Params.url | relLangURL }}{{ $name | urlize }}"><img class="gallery-img" width=256 height=256 src="{{ $.Site.Params.image_host }}/chars/{{ $name | urlize }}.jpg"/><span>{{ $taxonomy.Page.Title }}</span></a>
{{ end }} {{ end }}
{{ end }} {{ end }}
</div>
{{ end }} {{ end }}

View file

@ -1,20 +1,17 @@
{{/* Partial used to display a grid of artwork. */}} {{/* Partial used to display a grid of artwork. */}}
{{ $paginator := .Paginate (where $.Site.Pages "Type" "art") }}
{{ template "_internal/pagination.html" . }} {{ template "_internal/pagination.html" . }}
{{ $on_guest := eq .Title "Guest Art" }} {{ $paginator := .Scratch.Get "paginator" }}
<div class="grid-container">
<div class="grid"> <div class="grid">
<div class="grid-sizer"></div> <div class="grid-sizer"></div>
<div class="gutter-sizer"></div> <div class="gutter-sizer"></div>
{{ range $paginator.Pages }} {{ range $paginator.Pages }}
{{ $is_guest := .Params.guest }} {{ partial "render-art" . }}
{{ if eq $on_guest $is_guest }}
{{ partial "render-art" . }}
{{ end }}
{{ end }} {{ end }}
</div> </div>
</div>
{{ template "_internal/pagination.html" . }} {{ template "_internal/pagination.html" . }}

View file

@ -9,28 +9,33 @@
{{ $year := .Date.Format "2006" }} {{ $year := .Date.Format "2006" }}
{{ with $full }} {{ with $full }}
<picture>
<source srcset="{{ $full }}" type="image/avif" width="{{ $.Params.thumb_width }}" height="{{ $.Params.thumb_height }}"/>
<img style="width: 100%; height: auto;" alt="{{ $.Params.alt_text }}" width="{{ $.Params.thumb_width }}" height="{{ $.Params.thumb_height }}" src="{{ $jpeg }}"/>
</picture>
<span>
{{ $title }}, {{ $year }}
{{ if $.Params.threed }} {{ if $.Params.threed }}
{{ with resources.Get "3d.png" }} {{ with resources.Get "3d.png" }}
<img class="gallery-type-icon-hidden" alt="3D cube icon" title="Viewable 3D" style="z-index: 1; position: absolute; left: 10px; top: 10px; border: none" src="{{ .RelPermalink }}"> <img width="16" height="16" alt="3D cube icon" title="Viewable 3D Model" src="{{ .RelPermalink }}">
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if $.Params.comic }} {{ if $.Params.comic }}
{{ with resources.Get "comic.png" }} {{ with resources.Get "comic.png" }}
<img class="gallery-type-icon-hidden" alt="Comic icon" title="Viewable Comic" style="z-index: 1; position: absolute; left: 10px; top: 10px; border: none" src="{{ .RelPermalink }}"> <img width="16" height="16" alt="Comic icon" title="Viewable Comic" src="{{ .RelPermalink }}">
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if $.Params.animation }} {{ if $.Params.animation }}
{{ with resources.Get "play-circle.png" }} {{ with resources.Get "play-circle.png" }}
<img class="gallery-type-icon-hidden" alt="Play animation icon" title="Viewable Animation" style="z-index: 1; position: absolute; left: 10px; top: 10px; border: none" src="{{ .RelPermalink }}"> <img width="16" height="16" alt="Play animation icon" title="Viewable Animation" src="{{ .RelPermalink }}">
{{ end }} {{ end }}
{{ end }} {{ end }}
</span>
<picture>
<source srcset="{{ $full }}" type="image/avif" width="{{ $.Params.thumb_width }}" height="{{ $.Params.thumb_height }}"/>
<img style="width: 100%; height: auto;" alt="{{ $.Params.alt_text }}" title="{{ $title }} ({{ $year }})" width="{{ $.Params.thumb_width }}" height="{{ $.Params.thumb_height }}" src="{{ $jpeg }}"/>
</picture>
{{ end }} {{ end }}
</a> </a>