-
-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathteaser.html
More file actions
31 lines (28 loc) · 1.03 KB
/
teaser.html
File metadata and controls
31 lines (28 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{{- $page := .page }}
{{- $listview := .listview | default "false" }}
{{ $dateMachine := $page.Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := $page.Date | time.Format ":date_long" }}
<div class="m-teaser {{ if $listview }}m-teaser--listview{{ end }}">
<a href="{{ $page.RelPermalink }}" class="m-teaser__wrapper">
{{ $image := (partial "helper/contentImage" $page) }}
{{ if $image }}
<div class="m-teaser__image">
{{ partial "image" $image }}
</div>
{{ end }}
<div class="m-teaser__content">
<time class="m-teaser__dateline" datetime="{{ $dateMachine }}"
>{{ $dateHuman }}</time
>
{{ if $listview }}
<h2 class="m-teaser__headline">{{ $page.Title }}</h2>
{{ else }}
<h3 class="m-teaser__headline">{{ $page.Title }}</h3>
{{ end }}
<div class="m-teaser__text">
{{ partial "modifiers/strip-material-icons" $page.Summary | plainify | truncate 500 }}
</div>
{{- partial "icon" "arrow_forward" -}}
</div>
</a>
</div>