use icons for video/audio/slides, rearrange, add 2 events

This commit is contained in:
2020-02-26 20:35:19 +01:00
parent 4c932d6834
commit 7fe539095c
3 changed files with 69 additions and 43 deletions

View File

@@ -8,9 +8,13 @@
<li>{{.desc}}
{{- $len := (len .links) -}} <!-- amount of elements under .links -->
{{- range $index, $element := .links -}} <!-- range over links, but keep index -->
{{ with .href }}<a href="{{.}}">{{ 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) -->
{{- end -}}
{{- if or (.video) (.audio) (.slides) }},{{ end -}}
{{ with .video }}&nbsp;<a href="{{ . }}" target="_blank" title="Video Recording"><i class="fas fa-video"></i></a>{{ end }}
{{ with .audio }}&nbsp;<a href="{{ . }}" target="_blank" title="Audio Recording"><i class="fas fa-microphone"></i></a>{{ end }}
{{ with .slides }}&nbsp;<a href="{{ . }}" target="_blank" title="Slides"><i class="fas fa-desktop"></i></a>{{ end }}
{{- with .date }} ({{.}}){{ end }}
{{ range .tags }}<span class="label label-success">{{ . }}</span>&nbsp;{{ end }}
</li>