vinyl-records-collection-theme/layouts/_default/single.html

79 lines
5.0 KiB
HTML
Raw Normal View History

2023-08-19 22:37:41 +02:00
{{ define "body_class" }} post-template {{ end }}
{{ define "main" }}
{{- partial "header.html" . -}}
<main class="record">
<article>
<section class="record">
<div>
2023-08-20 21:46:20 +02:00
<h1 class="album-title">{{ .Page.Title }}</h1>
<a href="/artist/{{ .Params.artist | urlize }}" class="record-artist">{{ .Params.artist }}</a>
2023-08-19 22:37:41 +02:00
{{ if .Params.description }}
<p>
{{ .Params.description | markdownify }}
</p>
{{ end }}
</div>
<div style="text-align: center;">
{{ if .Params.cover }}
<a href="/{{ .Params.cover | urlize }}">
{{ end }}
2023-08-20 00:17:23 +02:00
{{ $default_img := resources.Get "img/default.png" }}
<img src="{{ if .Params.cover }}{{ .Site.BaseURL }}/{{ .Params.cover }}{{ else }}{{ $default_img.Permalink }}{{ end }}" alt="{{ .Title }}" title="{{ .Title }}" />
2023-08-19 22:37:41 +02:00
{{ 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 }}
2023-08-20 21:46:20 +02:00
<li><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22C6.48 22 2 17.52 2 12C2 6.48 6.48 2 12 2ZM12 16C14.2133 16 16 14.2133 16 12C16 9.78667 14.2133 8 12 8C9.78667 8 8 9.78667 8 12C8 14.2133 9.78667 16 12 16ZM12 11C12.55 11 13 11.45 13 12C13 12.55 12.55 13 12 13C11.45 13 11 12.55 11 12C11 11.45 11.45 11 12 11Z"></path></svg> Disc format : <a href="/format/{{ .Params.format | urlize }}" class="album-info">{{ .Params.format }}</a>{{ if .Params.number_of_discs }} ({{ .Params.number_of_discs }} discs){{ end }}</li>
2023-08-19 22:37:41 +02:00
{{ end }}
2023-08-20 21:46:20 +02:00
{{ if .Params.condition }}
<li><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M3.78307 2.82598L12 1L20.2169 2.82598C20.6745 2.92766 21 3.33347 21 3.80217V13.7889C21 15.795 19.9974 17.6684 18.3282 18.7812L12 23L5.6718 18.7812C4.00261 17.6684 3 15.795 3 13.7889V3.80217C3 3.33347 3.32553 2.92766 3.78307 2.82598ZM5 4.60434V13.7889C5 15.1263 5.6684 16.3752 6.7812 17.1171L12 20.5963L17.2188 17.1171C18.3316 16.3752 19 15.1263 19 13.7889V4.60434L12 3.04879L5 4.60434Z"></path></svg> Condition : {{ .Params.condition }}</li>
{{ end }}
2023-08-19 22:37:41 +02:00
</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 }}