Add JSON gallery support
BIN
assets/art-thumbs/after-school.webp
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
assets/art-thumbs/office-date.webp
Normal file
After Width: | Height: | Size: 96 KiB |
BIN
assets/art-thumbs/summer-byleth.webp
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
assets/art-thumbs/summer-eva-girls.webp
Normal file
After Width: | Height: | Size: 98 KiB |
BIN
assets/art/after-school.webp
Normal file
After Width: | Height: | Size: 215 KiB |
BIN
assets/art/office-date.webp
Normal file
After Width: | Height: | Size: 352 KiB |
BIN
assets/art/summer-byleth.webp
Normal file
After Width: | Height: | Size: 156 KiB |
BIN
assets/art/summer-eva-girls.webp
Normal file
After Width: | Height: | Size: 362 KiB |
|
@ -1,3 +1,4 @@
|
||||||
baseURL = 'http://example.org/'
|
baseURL = 'http://example.org/'
|
||||||
languageCode = 'en-us'
|
languageCode = 'en-us'
|
||||||
title = 'My New Hugo Site'
|
title = 'My New Hugo Site'
|
||||||
|
theme = 'red'
|
||||||
|
|
1
content/about.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
|
8
content/art/_index.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
title: "Art"
|
||||||
|
layout: "gallery"
|
||||||
|
---
|
||||||
|
|
||||||
|
Welcome to my gallery! I try to include some of my old art here as well, which I've kept since ~2016.
|
||||||
|
|
||||||
|
{{< toc >}}
|
44
data/art/art.json
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{
|
||||||
|
"categories": [
|
||||||
|
{
|
||||||
|
"name": "2D Art",
|
||||||
|
"description": "This is a collection of my “finished” work, sorted by year originally posted.",
|
||||||
|
"years": [
|
||||||
|
{
|
||||||
|
"year": 2016,
|
||||||
|
"pieces": [
|
||||||
|
{
|
||||||
|
"title": "Old Stuff",
|
||||||
|
"filename": "summer-byleth.webp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Another old thing",
|
||||||
|
"filename": "summer-byleth.webp"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"year": 2022,
|
||||||
|
"pieces": [
|
||||||
|
{
|
||||||
|
"title": "summer byleth",
|
||||||
|
"filename": "summer-byleth.webp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "summer eva girls",
|
||||||
|
"filename": "summer-eva-girls.webp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "office date",
|
||||||
|
"filename": "office-date.webp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "after school",
|
||||||
|
"filename": "after-school.webp"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
24
themes/red/layouts/_default/gallery.html
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
{{ $art := site.Data.art.art }}
|
||||||
|
|
||||||
|
{{ range $art.categories }}
|
||||||
|
<h2>{{ .name }}</h2>
|
||||||
|
{{ range sort .years "year" "desc" }}
|
||||||
|
<h3>{{ .year }}</h3>
|
||||||
|
{{ range .pieces }}
|
||||||
|
<figure>
|
||||||
|
{{ $local := resources.Get (printf "art-thumbs/%s" .filename) }}
|
||||||
|
{{ $full :=resources.Get (printf "art/%s" .filename) }}
|
||||||
|
<a href="{{ $full.Permalink }}">
|
||||||
|
<img width="128px" height="128px" src="{{ $local.Permalink }}"/>
|
||||||
|
</a>
|
||||||
|
<figcaption>"{{ .title }}"</figcaption>
|
||||||
|
</figure>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
|
||||||
|
<h2>{{ .Title }}</h2>
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
{{ end }}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
|
||||||
|
<h2>{{ .Title }}</h2>
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
{{ end }}
|
4
themes/red/layouts/shortcodes/toc.html
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<details>
|
||||||
|
<summary>Table of Contents</summary>
|
||||||
|
{{ .Page.TableOfContents }}
|
||||||
|
</details>
|
|
@ -1,21 +1,15 @@
|
||||||
# theme.toml template for a Hugo theme
|
# theme.toml template for a Hugo theme
|
||||||
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
|
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
|
||||||
|
|
||||||
name = "Red"
|
name = "red"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE"
|
licenselink = "https://git.sr.ht/~redstrate/redstrate.com/tree/master/item/themes/red/LICENSE"
|
||||||
description = ""
|
description = ""
|
||||||
homepage = "http://example.com/"
|
homepage = "https://redstrate.com/"
|
||||||
tags = []
|
tags = []
|
||||||
features = []
|
features = []
|
||||||
min_version = "0.41.0"
|
min_version = "0.41.0"
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = ""
|
name = "redstrate <josh@redstrate.com>"
|
||||||
homepage = ""
|
homepage = "https://redstrate.com/"
|
||||||
|
|
||||||
# If porting an existing theme
|
|
||||||
[original]
|
|
||||||
name = ""
|
|
||||||
homepage = ""
|
|
||||||
repo = ""
|
|
||||||
|
|