summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authormms <git@sapka.me>2024-12-05 00:02:53 +0100
committermms <git@sapka.me>2024-12-05 00:02:53 +0100
commita0320fa44b33d0080560b627bff6eb2b9ab1e30b (patch)
treed2acaaed2f20f212f28f8cdd6b37cf566b5c57eb /layouts
parent662cdbda9f478c998859e3bb1ea3e63914032a29 (diff)
feat: add links with script
Diffstat (limited to 'layouts')
-rw-r--r--layouts/shortcodes/links.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/layouts/shortcodes/links.html b/layouts/shortcodes/links.html
index 2707af2..58143cf 100644
--- a/layouts/shortcodes/links.html
+++ b/layouts/shortcodes/links.html
@@ -4,8 +4,8 @@
{{ with . | transform.Unmarshal }}
<table class="links">
- {{ range (sort .links "Title" "asc") }}
- {{ $letter := slicestr .Title 0 1 }}
+ {{ range (sort .links "title" "asc") }}
+ {{ $letter := slicestr .title 0 1 }}
{{ $letter = strings.ToUpper $letter }}
{{ if findRE `\d` $letter }}
{{ $letter = "0-9" }}
@@ -22,14 +22,14 @@
{{ $lastLetter = $letter }}
<tr>
<td class="button">
- {{ if .Button }}
- <a href="{{.Url}}">
- {{- $path := printf "webbuttons_31/%s" .Button}}
+ {{ if .button }}
+ <a href="{{.url}}">
+ {{- $path := printf "webbuttons_31/%s" .button}}
{{- $img := resources.Get $path }}
<img
loading="lazy"
class="webbutton"
- alt="{{ .Name }}"
+ alt="{{ .title }}"
src="{{ $img.Permalink }}"
width="{{ $img.Width }}"
height="{{ $img.Height }}">
@@ -37,13 +37,13 @@
{{ end }}
</td>
<td style="padding-bottom: 10px">
- <a href="{{.Url}}"> <b>{{ .Title }}</b></a>
- {{ if .Video }}
- (videos on {{.Video}})
+ <a href="{{.url}}"> <b>{{ .title }}</b></a>
+ {{ if .video }}
+ (videos on {{.video}})
{{ end }}
<br>
- {{ .Description }}
+ {{ .description }}
</a>
</td>
</tr>