vinyl-records-collection-theme/layouts/_default/single.html
2023-08-19 22:37:41 +02:00

74 lines
4.2 KiB
HTML

{{ define "body_class" }} post-template {{ end }}
{{ define "main" }}
{{- partial "header.html" . -}}
<main class="record">
<article>
<section class="record">
<div>
<h1>{{ .Page.Title }}</h1>
<a href="/band/{{ .Params.band | urlize }}" class="record-band">{{ .Params.band }}</a>
{{ if .Params.description }}
<p>
{{ .Params.description | markdownify }}
</p>
{{ end }}
</div>
<div style="text-align: center;">
{{ if .Params.cover }}
<a href="/{{ .Params.cover | urlize }}">
{{ end }}
<img src="/{{ if .Params.cover }}{{ .Params.cover }}{{ else }}default.png{{ end }}" alt="{{ .Title }}" title="{{ .Title }}" />
{{ if .Params.cover }}
</a>
{{ end }}
</div>
</section>
<section class="record">
<div>
<h1>Record informations</h1>
<ul>
{{ if .Params.label }}
<li><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18"><path d="M10.9042 2.1001L20.8037 3.51431L22.2179 13.4138L13.0255 22.6062C12.635 22.9967 12.0019 22.9967 11.6113 22.6062L1.71184 12.7067C1.32131 12.3162 1.32131 11.683 1.71184 11.2925L10.9042 2.1001ZM11.6113 4.22142L3.83316 11.9996L12.3184 20.4849L20.0966 12.7067L19.036 5.28208L11.6113 4.22142ZM13.7327 10.5854C12.9516 9.80433 12.9516 8.538 13.7327 7.75695C14.5137 6.9759 15.78 6.9759 16.5611 7.75695C17.3421 8.538 17.3421 9.80433 16.5611 10.5854C15.78 11.3664 14.5137 11.3664 13.7327 10.5854Z"></path></svg> Label : <a href="/label/{{ .Params.label | urlize }}" class="album-info">{{ .Params.label }}</a></li>
{{ end }}
{{ if .Params.year }}
<li><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18"><path d="M9 1V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7V1H9ZM20 11H4V19H20V11ZM7 5H4V9H20V5H17V7H15V5H9V7H7V5Z"></path></svg> Year : <a href="/year/{{ .Params.year | urlize }}" class="album-info">{{ .Params.year }}</a></li>
{{ end }}
{{ if .Params.format }}
<li><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18"><path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 15C10.3431 15 9 13.6569 9 12C9 10.3431 10.3431 9 12 9C13.6569 9 15 10.3431 15 12C15 13.6569 13.6569 15 12 15Z"></path></svg> Disc format : <a href="/format/{{ .Params.format | urlize }}" class="album-info">{{ .Params.format }}</a></li>
{{ end }}
</ul>
</div>
<div>
<h1>Genres</h1>
{{ range .Params.genres }}
<a href="/genres/{{ . | urlize }}" class="genres">{{ . }}</a>
{{ end }}
</div>
</div>
{{ if .Params.pictures }}
<section class="record-pictures">
<details>
<summary><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18"><path d="M2.9918 21C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918ZM20 15V5H4V19L14 9L20 15ZM20 17.8284L14 11.8284L6.82843 19H20V17.8284ZM8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11Z"></path></svg> More pictures</summary>
{{ range .Params.pictures }}
<a href="/{{ . }}"><img src="/{{ . }}" alt="{{ . }}" title="{{ . }}" /></a>
{{ end }}
</details>
</section>
{{ end }}
{{ if .Content }}
<section class="content">
{{ .Content }}
</section>
{{ end }}
</article>
</main>
{{ end }}