Add site title to galleries, add support for ng+pixiv urls
This commit is contained in:
parent
26b2a2d4f7
commit
eec95ca88a
2 changed files with 25 additions and 13 deletions
|
@ -22,11 +22,13 @@
|
||||||
"pieces": [
|
"pieces": [
|
||||||
{
|
{
|
||||||
"title": "summer byleth",
|
"title": "summer byleth",
|
||||||
"filename": "summer-byleth.webp"
|
"filename": "summer-byleth.webp",
|
||||||
|
"pixiv_url": "test"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "summer eva girls",
|
"title": "summer eva girls",
|
||||||
"filename": "summer-eva-girls.webp"
|
"filename": "summer-eva-girls.webp",
|
||||||
|
"newgrounds_url": "test"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "office date",
|
"title": "office date",
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
<h2>{{ .Title }}</h2>
|
||||||
|
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
{{ $art := (index site.Data ($.Param "json")) }}
|
{{ $art := (index site.Data ($.Param "json")) }}
|
||||||
|
@ -13,18 +15,26 @@
|
||||||
<figure>
|
<figure>
|
||||||
{{ $full := resources.Get (printf "%s/%s" ($.Param "json") .filename) }}
|
{{ $full := resources.Get (printf "%s/%s" ($.Param "json") .filename) }}
|
||||||
|
|
||||||
<a href="{{ $full.Permalink }}">
|
<a href="{{ $full.Permalink }}">
|
||||||
{{ if $.Params.thumbnails }}
|
{{ if $.Params.thumbnails }}
|
||||||
{{ $thumb := resources.Get (printf "%s-thumbs/%s" ($.Param "json") .filename) }}
|
{{ $thumb := resources.Get (printf "%s-thumbs/%s" ($.Param "json") .filename) }}
|
||||||
<img alt="{{ .title }}" width="128px" height="128px" src="{{ $thumb.Permalink }}"/>
|
<img alt="{{ .title }}" width="128px" height="128px" src="{{ $thumb.Permalink }}"/>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<img alt="{{ .title }}" src="{{ $full.Permalink }}"/>
|
<img alt="{{ .title }}" src="{{ $full.Permalink }}"/>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<figcaption>"{{ .title }}"</figcaption>
|
<figcaption>
|
||||||
</figure>
|
"{{ .title }}"
|
||||||
{{ end }}
|
{{ if .newgrounds_url }}
|
||||||
|
<a href="{{ .newgrounds_url }}">Newgrounds</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .pixiv_url }}
|
||||||
|
<a href="{{ .pixiv_url }}">Pixiv</a>
|
||||||
|
{{ end }}
|
||||||
|
</figcaption>
|
||||||
|
</figure>
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue