blob: 6fa6c3426cfb64484812a986ff9a2058d6642ce1 (
plain)
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
32
33
34
|
{{ define "main" }}
<article id="content">
{{ if eq .Type "posts" }}
{{ $showdate := .Date }}
{{ if .Param "eventdate" }}
{{ $showdate = .Param "eventdate" }}
{{ end }}
<section class="post-date">
<p> {{ time.Format ":date_long" $showdate }} </p>
</section>
{{ end }}
{{ if .Param "Image" }}
{{ $imagename := .Param "image" }}
{{ $myimg := resources.Get $imagename }}
{{ if $myimg }}
{{ $myimg := $myimg.Resize "1024x" }}
<figure class="small-figure">
<picture>
<source type="image/jpeg" srcset="{{ $myimg.RelPermalink }}">
<img class="gallery-photo" alt="{{ .Title }}" src="{{ $myimg.RelPermalink }}"/>
</picture>
<figcaption class="gallery-caption">{{ .Param "caption" }}</figcaption>
</figure>
{{ else }}
{{ errorf "Can not find image: %s" $imagename }}
{{ end }}
{{ end }}
<h1>{{ .Title }}</h1>
{{ .Content }}
</article>
{{ end }}
|