use preserving space

This commit is contained in:
2021-08-08 10:37:22 +02:00
parent fc0357c4c2
commit 714c718493

View File

@@ -13,7 +13,7 @@
{{- $len := (len .links) -}} <!-- amount of elements under .links --> {{- $len := (len .links) -}} <!-- amount of elements under .links -->
{{- range $index, $element := .links -}} <!-- range over links, but keep index --> {{- range $index, $element := .links -}} <!-- range over links, but keep index -->
{{- with .href }}<a href="{{.}}" target="_blank">{{ end }}{{.text}}{{ with .href }}</a>{{end}} {{- with .href }}<a href="{{.}}" target="_blank">{{ end }}{{.text}}{{ with .href }}</a>{{end}}
{{- if ne (add $index 1) $len -}}, {{- end -}} <!-- only append comma if not last element (index starts with 0) --> {{- if ne (add $index 1) $len -}},&#32;{{- end -}} <!-- only append comma if not last element (index starts with 0) -->
{{- end -}} {{- end -}}
{{- if or (.video) (.audio) (.slides) }},{{ end -}} {{- if or (.video) (.audio) (.slides) }},{{ end -}}
{{ with .video }}&nbsp;<a href="{{ . }}" target="_blank" aria-label="Video Recording"><i class="fas fa-video" aria-hidden="true" title="Video Recording"></i></a>{{ end }} {{ with .video }}&nbsp;<a href="{{ . }}" target="_blank" aria-label="Video Recording"><i class="fas fa-video" aria-hidden="true" title="Video Recording"></i></a>{{ end }}