diff --git a/layouts/partials/events/event-infos.html b/layouts/partials/events/event-infos.html index 8e0f22e15c253588010689d987fa85d5ec5c4f38..82a475a2f82c71d245ad35bf08ac85b29121ef69 100644 --- a/layouts/partials/events/event-infos.html +++ b/layouts/partials/events/event-infos.html @@ -33,27 +33,27 @@ {{ $eventTime := time.AsTime .Params.dates.from.day}} {{ if gt $eventTime time.Now }} - {{ with .Params.dates.add_to_calendar }} - {{ $links := . }} - <li class="events-actions"> - <span>{{ i18n "events.add_to_calendar.title" }}</span> - {{- $types := slice "ical" "google" "office" "outlook" "yahoo" -}} - {{- range $type := $types -}} - {{ $label := i18n (printf "events.add_to_calendar.%s" $type) }} - {{ with index $links $type }} - <a class="chip" - {{ if eq $type "ical" -}} - {{ printf `href="%s"` . | safeHTMLAttr }} download - {{ else }} - href="{{ . }}" - target="_blank" - {{ end }} > - {{- $label -}} - </a> + {{ with .Params.dates.add_to_calendar }} + {{ $links := . }} + <li class="events-actions"> + <span>{{ i18n "events.add_to_calendar.title" }}</span> + {{- $types := slice "ical" "google" "office" "outlook" "yahoo" -}} + {{- range $type := $types -}} + {{ $label := i18n (printf "events.add_to_calendar.%s" $type) }} + {{ with index $links $type }} + <a class="chip" + {{ if eq $type "ical" -}} + {{ printf `href="%s"` . | safeHTMLAttr }} download + {{ else }} + href="{{ . }}" + target="_blank" + {{ end }} > + {{- $label -}} + </a> + {{- end }} {{- end }} - {{- end }} - </li> - {{- end }} + </li> + {{- end }} {{- end }} </ul>