Skip to content
This repository was archived by the owner on Jul 21, 2019. It is now read-only.

Commit ed347d6

Browse files
Add event_group
1 parent 33e48c6 commit ed347d6

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

layouts/partials/welcome.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,25 @@ <h1 class = "welcome-page">devopsdays {{$e.city}}</h1>
7979
{{- if $e.city -}}
8080
{{- $.Scratch.Set "past-counter" 0 -}}
8181
{{- range sort $.Site.Data.events "startdate" -}}
82-
{{- if .startdate -}} <!-- for some reason, it bails on the city Chicago, and also Paris -->
82+
{{- if .startdate -}}
83+
84+
{{- if $e.event_group -}}
85+
{{- if eq .event_group $e.event_group -}}
86+
{{- if and (ne .startdate $e.startdate) (ne ($.Scratch.Get "past-counter") 1 ) -}}
87+
<i>Other {{ $e.event_group }} Events</i><br />
88+
{{- $.Scratch.Set "past-counter" 1 -}}
89+
{{- end -}}
90+
{{- if ne .startdate $e.startdate -}}
91+
<a href = "{{ (printf "events/%s" .name) | absURL }}" class="welcome-page-masthead-link">{{ dateFormat "2006" .startdate }}</a> &nbsp;&nbsp;
92+
{{- end -}}
93+
{{- end -}}
94+
{{- else -}}
95+
8396
{{- if eq (lower .city) (lower $e.city) -}}
8497
{{- if and (ne .startdate $e.startdate) (ne ($.Scratch.Get "past-counter") 1 ) -}}
8598
<i>Other {{ $e.city }} Events</i><br />
8699
{{- $.Scratch.Set "past-counter" 1 -}}
87100
{{- end -}}
88-
{{- if eq (lower .city) (lower $e.city)}}
89101
{{- if ne .startdate $e.startdate -}}
90102
<a href = "{{ (printf "events/%s" .name) | absURL }}" class="welcome-page-masthead-link">{{ dateFormat "2006" .startdate }}</a> &nbsp;&nbsp;
91103
{{- end -}}

0 commit comments

Comments
 (0)