Skip to content
This repository was archived by the owner on Jul 21, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 55 additions & 4 deletions layouts/events/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ <h2>Future</h2>
{{- $.Scratch.Set "year" (dateFormat "2006" .startdate) -}}
{{- $.Scratch.Set "year-displayed" "false" -}}
{{- end -}}
{{- if ne ($.Scratch.Get "month") (dateFormat "January" .startdate ) -}}
{{- $.Scratch.Set "month" (dateFormat "January" .startdate ) -}}
{{- if ne ($.Scratch.Get "month") (dateFormat "January 2006" .startdate ) -}}
{{- $.Scratch.Set "month" (dateFormat "January 2006" .startdate ) -}}
{{- $.Scratch.Set "month-displayed" "false" -}}
{{- end -}}
{{- if ne ($.Scratch.Get "month-displayed") "true" -}}
{{- if eq ($.Scratch.Get "close-tag") "true"}}
</div>
{{- end -}}
<div class = "col-md-6 col-lg-3 events-page-col">
<h4 class="events-page-months">{{ dateFormat "January" .startdate }}</h4>
<h4 class="events-page-months">{{ dateFormat "January 2006" .startdate }}</h4>
{{- $.Scratch.Set "month-displayed" "true" -}}
{{- $.Scratch.Set "close-tag" "true" -}}
{{- end -}}
Expand Down Expand Up @@ -61,6 +61,57 @@ <h4 class="events-page-months">TBD</h4>
{{- end -}}
</div>
</div>
{{- partial "past.html" . -}}

<div class = "row">
<div class = "col-md-12">
<h2>Past</h2>
</div>
</div>
{{- range sort $.Site.Data.events "startdate" "desc" -}}
{{- if .startdate -}}
{{- if le (time .enddate) now -}}
{{- if ne ($.Scratch.Get "year") (dateFormat "2006" .startdate) -}}
{{- $.Scratch.Set "year" (dateFormat "2006" .startdate) -}}
{{- $.Scratch.Set "year-displayed" "false" -}}
{{- end -}}
{{- if ne ($.Scratch.Get "year") (dateFormat "2006" .startdate) -}}
{{- $.Scratch.Set "year" (dateFormat "2006" .startdate) -}}
{{- $.Scratch.Set "year-displayed" "false" -}}
{{- end -}}
{{- if ne ($.Scratch.Get "month") (dateFormat "January 2006" .startdate ) -}}
{{- $.Scratch.Set "month" (dateFormat "January 2006" .startdate ) -}}
{{- $.Scratch.Set "month-displayed" "false" -}}
{{- end -}}
{{- if ne ($.Scratch.Get "month-displayed") "true" -}}
{{- if eq ($.Scratch.Get "close-tag") "true"}}
</div>
{{- end -}}
<div class = "col-md-6 col-lg-3 events-page-col">
<h4 class="events-page-months">{{ dateFormat "January 2006" .startdate }}</h4>
{{- $.Scratch.Set "month-displayed" "true" -}}
{{- $.Scratch.Set "close-tag" "true" -}}
{{- end -}}
{{- if ne .startdate .enddate }}
{{- if eq (time .startdate).Month (time .enddate).Month -}}
<a href = "{{ (printf "events/%s" .name) | absURL }}" class = "events-page-event">
{{ dateFormat "Jan 2" .startdate }} - {{ dateFormat "2" .enddate }}:
{{ .city }}
</a><br />
{{- else -}}
<a href = "{{ (printf "events/%s" .name) | absURL }}" class = "events-page-event">
{{ dateFormat "Jan 2" .startdate }} - {{ dateFormat "Jan 2" .enddate }}:
{{ .city }}
</a><br />
{{- end -}}
{{- else -}}
<a href = "{{ (printf "events/%s" .name) | absURL }}" class = "events-page-event">
{{ dateFormat "Jan 2" .startdate }}:
{{ .city }}
</a><br />
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}


{{ end }}
45 changes: 0 additions & 45 deletions layouts/partials/past.html

This file was deleted.