Hardcode thumbnail name
This commit is contained in:
parent
9e79b08227
commit
210e2a5170
@ -8,9 +8,8 @@
|
||||
<a href="{{ .RelPermalink }}" class="subalbum">
|
||||
<div class="teaser">
|
||||
{{ $sa := . }}
|
||||
{{ with .Params.teaserImage }}
|
||||
{{ $img := $sa.Resources.Get . }}
|
||||
<img src="{{ ($img.Fit "300x200 webm").RelPermalink }}" alt="{{ $sa.Title }}">
|
||||
{{ with .Resources.Get "thumbnail.jpg" }}
|
||||
<img src="{{ (.Fit "300x200 webm").RelPermalink }}" alt="{{ $sa.Title }}">
|
||||
{{ else }}
|
||||
{{ warnf "Could not find teaser image for %s" .RelPermalink }}
|
||||
<img src="{{ (resources.Get "img/no-image.png").RelPermalink }}">
|
||||
|
@ -1,9 +1,6 @@
|
||||
{{- $first := true -}}
|
||||
{{- $filter := images.AutoOrient -}}
|
||||
{{- $teaser := "" -}}
|
||||
{{- with .Params.teaserImage -}}
|
||||
{{- $teaser = $.Resources.GetMatch . -}}
|
||||
{{- end -}}
|
||||
{{- $teaser := .Resources.GetMatch "thumbnail.jpg" -}}
|
||||
{{- range .Resources.ByType "image" -}}
|
||||
{{- if not (eq $teaser .) -}}
|
||||
{{- if not $first }}, {{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user