mirror of
https://github.com/Wivik/vinyl-records-collection-theme.git
synced 2024-11-24 16:43:18 +01:00
41 lines
2.9 KiB
HTML
41 lines
2.9 KiB
HTML
{{ define "body_class" }} post-template {{ end }}
|
|
|
|
{{ define "main" }}
|
|
|
|
{{- partial "header.html" . -}}
|
|
|
|
|
|
<main class="album-list">
|
|
{{ range sort .Pages "Title" }}
|
|
|
|
{{ $default_img := resources.Get "img/default.png" }}
|
|
<section class="album-card" style="background-image: url('{{ if .Params.cover }}{{ .Site.BaseURL }}/{{ .Params.cover }}{{ else }}{{ $default_img.Permalink }}{{ end }}')">
|
|
{{ if .Params.artist }}
|
|
<a href="/artist/{{ .Params.band | urlize }}" class="album-artist">{{ .Params.artist }}</a>
|
|
{{ end }}
|
|
<a href="{{ .Page.Permalink }}" class="album-title">{{ .Title }}</a>
|
|
{{ if .Params.genres }}
|
|
<p class="album-genres">
|
|
{{ range .Params.genres }}
|
|
<a href="/genres/{{ . | urlize }}" class="genres">{{ . }}</a>
|
|
{{ end }}
|
|
</p>
|
|
{{ end }}
|
|
<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 }}" 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="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>
|
|
{{ end }}
|
|
</ul>
|
|
</section>
|
|
|
|
|
|
{{ end }}
|
|
</main>
|
|
{{ end }}
|