[LAYOUT] Add default archive banner if no thumb.jpg image exist
This commit is contained in:
parent
f9fb6e3ec5
commit
93477924f7
1 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,10 @@
|
|||
<a class="archive hidden_link" href="{{ .Params.ExternalLink | default .RelPermalink }}">
|
||||
<img class="thumbnail" src="{{ .RelPermalink }}/thumb.jpg" />
|
||||
{{ $thumb := $.Page.Resources.GetMatch "thumb.jpg"}}
|
||||
{{ if $thumb }}
|
||||
<img class="thumbnail" src="{{ .RelPermalink }}thumb.jpg" />
|
||||
{{ else }}
|
||||
<img class="thumbnail" src="/images/thumb.jpg" />
|
||||
{{ end }}
|
||||
<div class="description">
|
||||
<span class="title">{{ .Title }}</span>
|
||||
<p>{{ .Description }}</p>
|
||||
|
|
Loading…
Reference in a new issue