diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-03-03 23:29:38 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-03-03 23:29:38 +0800 |
commit | 228811363d9f48f032a46d177869e378d10b17c7 (patch) | |
tree | 09de8983011d1e4da3b0acc2d8f472af0ae5070f /www/layouts/shortcodes/link-group.html | |
parent | f4f4a347e3dd40974fe707fe833bf2f4df7d05c3 (diff) | |
download | crupest-228811363d9f48f032a46d177869e378d10b17c7.tar.gz crupest-228811363d9f48f032a46d177869e378d10b17c7.tar.bz2 crupest-228811363d9f48f032a46d177869e378d10b17c7.zip |
feat(www): hurd and todos.
Diffstat (limited to 'www/layouts/shortcodes/link-group.html')
-rw-r--r-- | www/layouts/shortcodes/link-group.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/www/layouts/shortcodes/link-group.html b/www/layouts/shortcodes/link-group.html new file mode 100644 index 0000000..b16c2bc --- /dev/null +++ b/www/layouts/shortcodes/link-group.html @@ -0,0 +1,25 @@ +<div class="mono link-group"> + {{ $self := . }} + {{ $lines := slice }} + {{ range split .Inner "\n" }} + {{ if strings.ContainsNonSpace . }} + {{ $lines = $lines | append (strings.TrimSpace .) }} + {{ end }} + {{ end }} + {{ $notitle := false }} + {{ if .IsNamedParams }} + {{ $notitle = .Get "notitle" }} + {{ else }} + {{ $notitle = in .Params "notitle" }} + {{ end }} + {{ if not $notitle }} + {{ $title := index $lines 0 }} + <div class="link-group-title">{{ $title | $self.Page.RenderString }}</div> + {{ $lines = $lines | after 1 }} + {{ end }} + <div class="link-group-list"> + {{ range $lines }} + <div class="link-group-item">{{ . | $self.Page.RenderString }}</div> + {{ end }} + </div> +</div> |