diff --git a/assets/photos/20220519_0001.webp b/assets/photos/20220519_0001.webp new file mode 100644 index 0000000..e40f171 Binary files /dev/null and b/assets/photos/20220519_0001.webp differ diff --git a/content/_index.md b/content/_index.md index eaafc00..c9ccace 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,3 +1,5 @@ See my [gallery](/art)! +See my [photos](/photos)! + See my [about page](/about)! diff --git a/content/art/_index.md b/content/art/_index.md index 42a63e5..7b7b293 100644 --- a/content/art/_index.md +++ b/content/art/_index.md @@ -1,6 +1,8 @@ --- title: "Art" layout: "gallery" +json: "art" +thumbnails: true --- Welcome to my gallery! I try to include some of my old art here as well, which I've kept since ~2016. diff --git a/content/photos/_index.md b/content/photos/_index.md new file mode 100644 index 0000000..1a51348 --- /dev/null +++ b/content/photos/_index.md @@ -0,0 +1,8 @@ +--- +title: "Art" +layout: "gallery" +json: "photos" +thumbnails: false +--- + +{{< toc >}} diff --git a/data/photos.json b/data/photos.json new file mode 100644 index 0000000..0c7f9df --- /dev/null +++ b/data/photos.json @@ -0,0 +1,19 @@ +{ + "categories": [ + { + "name": "Figures", + "description": "This is a photo collection of my figure collection.", + "years": [ + { + "year": 2022, + "pieces": [ + { + "title": "2B", + "filename": "20220519_0001.webp" + } + ] + } + ] + } + ] +} diff --git a/themes/red/layouts/_default/gallery.html b/themes/red/layouts/_default/gallery.html index b58d5ab..5916ff8 100644 --- a/themes/red/layouts/_default/gallery.html +++ b/themes/red/layouts/_default/gallery.html @@ -1,19 +1,25 @@ {{ define "main" }} {{ .Content }} - {{ $art := site.Data.art }} + {{ $art := (index site.Data ($.Param "json")) }} {{ range $art.categories }}

{{ .name }}

+

{{ .description }}

{{ range sort .years "year" "desc" }}

{{ .year }}

+ {{ range .pieces }}
- {{ $thumb := resources.Get (printf "art-thumbs/%s" .filename) }} - {{ $full := resources.Get (printf "art/%s" .filename) }} + {{ $full := resources.Get (printf "%s/%s" ($.Param "json") .filename) }} - + {{ if $.Params.thumbnails }} + {{ $thumb := resources.Get (printf "%s-thumbs/%s" ($.Param "json") .filename) }} + + {{ else }} + + {{ end }}
"{{ .title }}"