2022-08-02 14:05:56 -04:00
|
|
|
{{ define "main" }}
|
2022-08-24 10:26:21 -04:00
|
|
|
<h2>{{ .Title }}</h2>
|
|
|
|
|
2022-08-03 13:38:29 -04:00
|
|
|
{{ .Content }}
|
2022-08-02 14:05:56 -04:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
{{ $selected_year := $.Param "selectedyear" }}
|
|
|
|
{{ $art := (index site.Data ($.Param "json")) }}
|
|
|
|
{{ $pixiv_icon := resources.Get "pixiv.webp" }}
|
|
|
|
{{ $newgrounds_icon := resources.Get "newgrounds.webp" }}
|
|
|
|
|
|
|
|
<details>
|
|
|
|
<summary>Table of Contents</summary>
|
|
|
|
<ul>
|
|
|
|
{{ range $art.categories }}
|
|
|
|
{{ $without_space := replaceRE "(\\s)" "" .name }}
|
|
|
|
<li><a href="#{{ $without_space }}">{{ .name }}</a></li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</details>
|
2022-12-27 21:47:12 -05:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
{{ range $art.categories }}
|
|
|
|
{{ $should_include := false }}
|
2022-12-20 19:16:53 -05:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
{{ range sort .years "year" "desc" }}
|
|
|
|
{{ if eq (int .year) (int $selected_year) }}
|
|
|
|
{{ $should_include = true }}
|
2022-12-27 21:47:12 -05:00
|
|
|
{{ end }}
|
2022-12-27 21:59:30 -05:00
|
|
|
{{ end }}
|
2022-12-20 19:16:53 -05:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
{{ if $should_include }}
|
|
|
|
{{ $without_space := replaceRE "(\\s)" "" .name }}
|
|
|
|
<h3 id="{{ $without_space }}">{{ .name }}</h3>
|
|
|
|
{{ range sort .years "year" "desc" }}
|
|
|
|
{{ if eq (int .year) (int $selected_year) }}
|
|
|
|
{{ $year := .year }}
|
2022-12-20 19:16:53 -05:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
<div class="gallery-con">
|
|
|
|
{{ range .pieces }}
|
|
|
|
<figure class="gallery-fig">
|
|
|
|
{{ $full := resources.Get (printf "%s/%s" ($.Param "json") .filename) }}
|
|
|
|
{{ if $full }}
|
2022-12-20 19:16:53 -05:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
{{ $filename_without_ext := strings.TrimSuffix (path.Ext .filename) .filename }}
|
2022-12-20 19:16:53 -05:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
{{ $month := 1 }}
|
2022-12-27 21:47:12 -05:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
{{ if .date }}
|
|
|
|
{{ $split := split .date "-" }}
|
|
|
|
{{ $month = index $split 0 }}
|
|
|
|
{{ end }}
|
2022-08-03 13:38:29 -04:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
{{ $path := printf "/art/%d/%.2d/%s" (int $year) (int $month) $filename_without_ext}}
|
2022-11-08 10:01:15 -05:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
<a href="{{ $path }}" aria-label="Click to view details">
|
|
|
|
{{ if $.Params.thumbnails }}
|
|
|
|
{{ $title := .title }}
|
|
|
|
{{ with resources.Get (printf "%s-thumbs/%s" ($.Param "json") .filename) }}
|
|
|
|
<img class="gallery-img" alt="{{ $title }}" width="128" height="128" src="{{ .Permalink }}"/>
|
2022-12-20 19:16:53 -05:00
|
|
|
{{ else }}
|
2022-12-27 21:59:30 -05:00
|
|
|
<p>Thumbnail not found!</p>
|
2022-12-20 19:16:53 -05:00
|
|
|
{{ end }}
|
2022-12-27 21:59:30 -05:00
|
|
|
{{ else }}
|
|
|
|
<img alt="{{ .title }}" src="{{ $full.Permalink }}"/>
|
|
|
|
{{ end }}
|
|
|
|
</a>
|
2022-10-27 08:52:30 -04:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
<figcaption>
|
2022-10-27 08:52:30 -04:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
{{ with .title }}
|
|
|
|
"{{ . }}"
|
|
|
|
{{ end }}
|
|
|
|
{{ if .newgrounds_url }}
|
|
|
|
<a href="{{ .newgrounds_url }}" style="vertical-align: bottom"><img alt="Newgrounds Icon" style="vertical-align: bottom" width="19" height="19" src="{{ $newgrounds_icon.Permalink }}"></a>
|
|
|
|
{{ end }}
|
|
|
|
{{ if .pixiv_url }}
|
|
|
|
<a href="{{ .pixiv_url }}" style="vertical-align: bottom"><img alt="Pixiv Icon" style="vertical-align: bottom" width="19" height="19" src="{{ $pixiv_icon.Permalink }}"></a>
|
|
|
|
{{ end }}
|
|
|
|
</figcaption>
|
2022-10-27 08:52:30 -04:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
{{ else }}
|
2022-10-25 16:08:36 -04:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
<em>CANNOT FIND {{.filename }}</em>
|
2022-12-20 19:16:53 -05:00
|
|
|
|
|
|
|
{{ end }}
|
2022-12-27 21:59:30 -05:00
|
|
|
</figure>
|
|
|
|
{{ end }}
|
2022-12-20 19:16:53 -05:00
|
|
|
|
2022-12-27 21:59:30 -05:00
|
|
|
</div>
|
2022-12-20 19:16:53 -05:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2022-08-02 14:05:56 -04:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|