redstrate.com/themes/red/layouts/_default/art-detail.html

114 lines
3.8 KiB
HTML
Raw Normal View History

2022-12-20 19:16:53 -05:00
{{ define "main" }}
<h2>{{ .Title }}</h2>
2023-02-23 17:39:20 -05:00
<hr>
2022-12-28 11:12:01 -05:00
{{ with resources.Get .Params.filename }}
2023-04-13 11:45:52 -04:00
{{ if $.Params.threed }}
{{ $cameraorbit := $.Params.orbit }}
{{ $cameratarget := $.Params.target }}
{{ $fov := $.Params.fov }}
2023-04-17 16:42:41 -04:00
<model-viewer style="margin-top: 10px; margin-bottom: 10px;" class="gallery-img" alt="{{ $.Params.alt_text }}" title="{{ $.Params.alt_text }}" src="{{ .RelPermalink }}" shadow-intensity="1" camera-controls touch-action="pan-y" camera-orbit="{{ $cameraorbit }}" camera-target="{{ $cameratarget }}" field-of-view="{{ $fov }}"></model-viewer>
2023-04-13 11:45:52 -04:00
{{ else }}
{{ if $.Params.animation }}
2023-04-13 12:49:55 -04:00
<div style="text-align: center;">
2023-04-17 16:43:21 -04:00
<video class="gallery-img" controls>
<source src="{{ .RelPermalink }}" type="video/webm">
</video>
</div>
{{ else }}
<img class="gallery-img" style="display: block; max-height: 1000px; margin-left: auto; margin-right: auto; width: auto; margin-top: 10px; margin-bottom: 10px; max-width: 100%; height: auto" alt="{{ $.Params.alt_text }}" title="{{ $.Params.alt_text }}" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
{{ end }}
2023-04-13 11:45:52 -04:00
{{ end }}
2022-12-28 11:12:01 -05:00
{{ end }}
2022-12-20 19:16:53 -05:00
2022-12-27 21:47:12 -05:00
<table>
2022-12-27 22:34:31 -05:00
<tr>
2023-04-17 15:29:13 -04:00
<th>Date</th>
2022-12-27 22:34:31 -05:00
<td>
2023-04-17 15:29:13 -04:00
<time datetime="{{ .Page.Lastmod.Format "2006-01-02" }}" class="text-muted">
{{ $.Date.Format "January 2006" }}
</time>
2022-12-27 22:34:31 -05:00
</td>
</tr>
2023-03-25 11:24:12 -04:00
2023-04-17 15:29:13 -04:00
{{ with .Params.arttags }}
<tr>
<th>Tags</th>
<td>
{{ $len := (len .) }}
{{ range $index, $element := . }}
<a href="/art/tags/{{ urlize . }}/"><strong>{{ $element }}</strong></a>{{ if not (eq (add $index 1) $len) }},{{ end }}
{{ end }}
</td>
</tr>
{{ end }}
2023-03-26 13:54:00 -04:00
2023-04-17 15:29:13 -04:00
{{ with .Params.characters }}
<tr>
<th>Characters</th>
<td>
{{ $len := (len .) }}
{{ range $index, $element := . }}
<a href="/art/characters/{{ urlize .}}/"><strong>{{ $element }}</strong></a>{{ if not (eq (add $index 1) $len) }},{{ end }}
{{ end }}
</td>
</tr>
{{ end }}
2023-03-25 11:24:12 -04:00
2023-04-17 15:29:13 -04:00
{{ with .Params.program }}
<tr>
<th>Program</th>
<td>
{{ . }}
</td>
</tr>
{{ end }}
2023-03-25 11:24:12 -04:00
2023-04-17 15:29:13 -04:00
{{ with .Params.mastodon_url }}
<tr>
<th>Mastodon URL</th>
<td>
2023-04-29 22:01:25 -04:00
<a href="{{ . }}">Mastodon Post</a>
2023-04-17 15:29:13 -04:00
</td>
</tr>
{{ end }}
2023-03-25 11:24:12 -04:00
2023-04-17 15:29:13 -04:00
{{ with .Params.newgrounds_url }}
<tr>
<th>Newgrounds URL</th>
<td>
2023-04-29 22:01:25 -04:00
<a href="{{ . }}">Newgrounds Post</a>
2023-04-17 15:29:13 -04:00
</td>
</tr>
{{ end }}
2023-03-25 11:24:12 -04:00
2023-04-17 15:29:13 -04:00
{{ with .Params.pixiv_url }}
<tr>
<th>Pixiv URL</th>
<td>
2023-04-29 22:01:25 -04:00
<a href="{{ . }}">Pixiv Post</a>
2023-04-17 15:29:13 -04:00
</td>
</tr>
{{ end }}
2022-12-27 21:47:12 -05:00
</table>
2022-12-20 19:16:53 -05:00
2023-04-17 15:29:13 -04:00
{{ partial "voting" . }}
2023-03-08 10:42:43 -05:00
{{ with .Content }}
2023-04-13 17:19:53 -04:00
<h3>Commentary</h3>
2022-12-28 11:09:13 -05:00
2023-04-13 17:19:53 -04:00
<p>{{ . }}</p>
2023-03-08 10:42:43 -05:00
{{ end }}
2022-12-28 11:09:13 -05:00
2023-04-13 11:45:52 -04:00
{{ 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 }}
2022-12-27 22:34:31 -05:00
{{ partial "comments" . }}
2022-12-20 19:16:53 -05:00
{{ end }}