From a86e5b684b8b0a546221d2024c38e484af34b313 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Thu, 2 Feb 2017 12:14:57 -0600 Subject: [PATCH] Display single-day events correctly --- layouts/partials/future.html | 7 +++++++ layouts/partials/welcome.html | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/layouts/partials/future.html b/layouts/partials/future.html index da3c72279..1306ebff3 100644 --- a/layouts/partials/future.html +++ b/layouts/partials/future.html @@ -18,10 +18,17 @@

{{ dateFormat "2006" .startdate }}

{{ dateFormat "January" .startdate }}

{{- $.Scratch.Set "month-displayed" "true" -}} {{- end -}} + {{- if ne .startdate .enddate }} {{ dateFormat "Jan 2" .startdate }} - {{ dateFormat "Jan 2" .enddate }} {{ .city }}
+ {{- else -}} + + {{ dateFormat "Jan 2" .startdate }} + {{ .city }} +
+ {{- end -}} {{- end -}} {{- end -}} {{- end -}} diff --git a/layouts/partials/welcome.html b/layouts/partials/welcome.html index 67c08bf81..4b599e994 100644 --- a/layouts/partials/welcome.html +++ b/layouts/partials/welcome.html @@ -10,7 +10,11 @@

DevOpsDays {{ $e.city }}

{{ end }} {{ if $e.startdate }} - {{- dateFormat "January 2" $e.startdate -}} - {{- dateFormat "2, 2006" $e.enddate -}} + {{- if ne $e.startdate $e.enddate }} + {{- dateFormat "January 2" $e.startdate -}} - {{- dateFormat "2, 2006" $e.enddate -}} + {{- else }} + {{- dateFormat "January 2" $e.startdate -}} + {{- end }} {{ end }}
{{if $e.location }}