hugo-theme-zzo/layouts/_default/summary.html

34 lines
1.2 KiB
HTML
Raw Normal View History

2019-11-04 13:09:44 +00:00
<article class="summary">
<header>
<h5 class="title h5"><a href='{{ .Permalink }}'> {{ .Title }}</a> </h5>
2019-11-04 13:09:44 +00:00
<h6 class="subtitle caption">🕓 {{ .Date.Format (i18n "summary-dateformat") }} · ☕{{ .ReadingTime }} min read</h6>
</header>
{{ $params := .Params }}
<div class="summary__content">
<div class="summary__text p2">
{{ with $params.Description }}
2019-11-04 13:09:44 +00:00
{{ . }}
{{ else }}
{{ .Summary }}
{{ end }}
</div>
{{ if $params.featured_image }}
<div class="summary__image-wrapper">
2019-11-05 08:51:53 +00:00
{{ with (print "images/" $params.featured_image) }}
2019-11-05 08:22:56 +00:00
<img data-src="{{ . | relURL }}" alt="{{ print $params.featured_image }}" class="lazyload summary__image">
2019-11-04 13:09:44 +00:00
{{ end }}
</div>
{{ else if $params.featured_video }}
2019-11-05 09:57:50 +00:00
{{ with print ("videos/poster/" | relURL) $params.featured_video_poster }}
<div class="video-wrapper">
<video class="video" controls preload='none' poster='{{ . | relURL }}' data-setup='{"fluid": true}'>
2019-11-05 09:57:50 +00:00
{{ with print ("videos/" | relURL) $params.featured_video }}
2019-11-05 08:22:56 +00:00
<source src="{{ . | relURL }}" type='video/mp4'>
2019-11-04 13:09:44 +00:00
{{ end }}
</video>
</div>
{{ end }}
{{ end }}
</div>
<hr/>
</article>