blob: 3aaa36133ceb319b5aa4bbaea64e3faeab5af407 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
{{ define "hero" }}
<div
style="background: linear-gradient( rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15) ){{ with resources.Get (index .Params.images 0) }}
, url('{{ .RelPermalink }}')
{{ end }}; background-position: center;"
class="pv5"
>
<div id="hero" class="mw7 center ph2 near-white lh-copy tc">
{{ $avatar := index .Params.images 1 }}
{{ if hasPrefix $avatar "http" }}
{{ $avatar = resources.GetRemote $avatar }}
{{ else }}
{{ $avatar = resources.Get $avatar }}
{{ end }}
{{ with $avatar }}
<img src="{{ .RelPermalink }}" class="br-100 w5" />
{{ end }}
<h1 class="f1 mv1">
{{ .Title }}
</h1>
{{ with .Params.Subtitle }}
<h2 class="f3 fw3 mv1">
{{ . | markdownify }}
</h2>
{{ end }}
<div class="f2 mt3">
{{ if .Params.personal }}
{{ partial "social_links" .Site.Author }}
{{ else }}
{{ partial "social_links" .Site.Params }}
{{ end }}
</div>
</div>
</div>
{{ end }}
{{ define "main" }}
{{ range .Paginator.Pages }}
<div class="stripe-dark">
<div class="mw7 center pv2 lh-copy f4-ns ph1">
<h2
id="{{ anchorize .Title | safeURL }}"
class="baskerville lh-title f2"
>
{{ .Title }}
</h2>
{{ with .Content }}
<div class="main-content">{{ . }}</div>
{{ end }}
{{ range where site.RegularPages "Type" "eq" .Params.subsection }}
{{ partial "post.html" . }}
{{ end }}
</div>
</div>
{{ end }}
{{ end }}
|