night0721.xyz/layouts/shortcodes/links.html

20 lines
733 B
HTML
Raw Normal View History

2023-11-07 21:55:50 +01:00
{{ $rss := readFile "assets/icons/rss.svg" }}
{{- $filledPathRss := replace $rss "<path" "<path fill='currentColor'" -}}
{{- $titledRss := replaceRE "<svg (.*?)>" (printf `<svg role="img" width="16" height="16" $1 ><title>RSS</title>`) $filledPathRss -}}
<div class="links-containter">
{{ range .Site.Data.links }}
<div class="{{ .class }}">
<h2 class="classifiers">{{ .title }}</h2>
</div>
<ul>
{{ range .links }}
<li>
<strong><a class="link-item" href="{{ .link }}">{{ .title }}</a></strong>
2023-11-08 00:07:01 +01:00
{{ if .description }} <a> - {{ .description }}</a>{{ end }}
2023-11-07 21:55:50 +01:00
{{ if .rss }} <a href="{{ .rss }}"><span class="icon-inline icon-rss">{{ $titledRss | safeHTML }}</span></a>{{ end }}
</li>
{{ end }}
</ul>
{{ end }}