{{ .Title }} diff --git a/themes/academic/layouts/partials/evento.html b/themes/academic/layouts/partials/evento.html index 52be41d..9f5e1e5 100644 --- a/themes/academic/layouts/partials/evento.html +++ b/themes/academic/layouts/partials/evento.html @@ -1,10 +1,4 @@ - - {{ $cover := (index (.Resources.ByType "image") 0) }} - {{ if not $cover }} - {{ $cover = resources.Get "images/default-events-cover.png" }} - {{ end }} - - +{{ partial "thumbnail" . }}
{{ .Title }} diff --git a/themes/academic/layouts/partials/thumbnail.html b/themes/academic/layouts/partials/thumbnail.html new file mode 100644 index 0000000..f9d8f6d --- /dev/null +++ b/themes/academic/layouts/partials/thumbnail.html @@ -0,0 +1,12 @@ + + {{ $cover := (.Resources.GetMatch "cover.*") }} + {{ if not $cover }} + {{ $cover := (index (.Resources.ByType "image") 0) }} + {{ if not $cover }} + {{ $cover = resources.Get "images/default-events-cover.png" }} + {{ end }} + {{ end }} + {{ with $cover }} + + {{ end }} +