mirror of
https://github.com/Wivik/vinyl-records-collection-theme.git
synced 2024-11-25 00:53:30 +01:00
fix: moved default image to theme
This commit is contained in:
parent
9232bacdf2
commit
f1d584a2bb
BIN
assets/img/default.png
Normal file
BIN
assets/img/default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 87 KiB |
@ -8,7 +8,8 @@
|
|||||||
<main class="album-list">
|
<main class="album-list">
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
|
|
||||||
<section class="album-card" style="background-image: url('{{ .Site.BaseURL }}/{{ if .Params.cover }}{{ .Params.cover }}{{ else }}default.png{{ end }}')">
|
{{ $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.band }}
|
{{ if .Params.band }}
|
||||||
<a href="/band/{{ .Params.band | urlize }}" class="album-band">{{ .Params.band }}</a>
|
<a href="/band/{{ .Params.band | urlize }}" class="album-band">{{ .Params.band }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -21,7 +21,8 @@
|
|||||||
{{ if .Params.cover }}
|
{{ if .Params.cover }}
|
||||||
<a href="/{{ .Params.cover | urlize }}">
|
<a href="/{{ .Params.cover | urlize }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<img src="/{{ if .Params.cover }}{{ .Params.cover }}{{ else }}default.png{{ end }}" alt="{{ .Title }}" title="{{ .Title }}" />
|
{{ $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 }}" />
|
||||||
{{ if .Params.cover }}
|
{{ if .Params.cover }}
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user