blob: 4c87b4163577fabd3c3902c568b39ca846b29fc4 (
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
|
{{- $caption := .Inner }}
{{ $lastLetter := "Dupa" }}
{{ with resources.Get "more/links.yml"}}
{{ with . | transform.Unmarshal }}
<table class="links">
{{ range (sort .links "Title" "asc") }}
{{ $letter := slicestr .Title 0 1 }}
{{ $letter = strings.ToUpper $letter }}
{{ if findRE `\d` $letter }}
{{ $letter = "0-9" }}
{{ end}}
{{ if not (eq $letter $lastLetter) }}
<tr>
<td colspan="2">
<hr>
<h2>{{ $letter}}</h2>
</td>
</tr>
{{ end }}
{{ $lastLetter = $letter }}
<tr>
<td class="button">
{{ if .Button }}
<a href="{{.Url}}">
{{- $path := printf "webbuttons_31/%s" .Button}}
{{- $img := resources.Get $path }}
<img
loading="lazy"
class="webbutton"
alt="{{ .Name }}"
src="{{ $img.Permalink }}"
width="{{ $img.Width }}"
height="{{ $img.Height }}">
</a>
{{ end }}
</td>
<td style="padding-bottom: 10px">
<a href="{{.Url}}"> <b>{{ .Title }}</b></a>
{{ if .Video }}
(videos on {{.Video}})
{{ end }}
<br>
{{ .Description }}
</a>
</td>
</tr>
{{ end }}
</links>
{{ end }}
{{ end }}
|