From 58c728f1abc23f3e06fdcd988f212b06d7276df8 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Thu, 2 Feb 2017 17:27:44 -0600 Subject: [PATCH 1/7] Sample data - moved description --- exampleSite/content/events/2017-minneapolis/welcome.md | 1 - exampleSite/data/events/2017-minneapolis.yml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/content/events/2017-minneapolis/welcome.md b/exampleSite/content/events/2017-minneapolis/welcome.md index 8a6d128c7..a75e87c01 100644 --- a/exampleSite/content/events/2017-minneapolis/welcome.md +++ b/exampleSite/content/events/2017-minneapolis/welcome.md @@ -6,7 +6,6 @@ aliases = ["/events/2017-minneapolis"] +++ -**devopsdays is returning to {{< event_location >}} for a fourth year!**
diff --git a/exampleSite/data/events/2017-minneapolis.yml b/exampleSite/data/events/2017-minneapolis.yml index 2effcf863..b3bba7eab 100644 --- a/exampleSite/data/events/2017-minneapolis.yml +++ b/exampleSite/data/events/2017-minneapolis.yml @@ -1,6 +1,7 @@ name: "2017-minneapolis" year: "2017" city: "Minneapolis" +description: "devopsdays is returning to Minneapolis for a fourth year!" startdate: 2017-07-25 enddate: 2017-07-26 From b8e838faf9e01a97dd06ce1c20f1755024ef0cc2 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Thu, 2 Feb 2017 17:28:35 -0600 Subject: [PATCH 2/7] Readability changes --- layouts/partials/sponsors.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layouts/partials/sponsors.html b/layouts/partials/sponsors.html index 7cd46896e..07c281604 100644 --- a/layouts/partials/sponsors.html +++ b/layouts/partials/sponsors.html @@ -9,6 +9,7 @@
+

{{ $level.label }} Sponsors

{{- if ( $e.startdate) or (ge (dateFormat "2006-01-02" $e.startdate) (dateFormat "2006-01-02" ($.Now.Format "2006-01-02"))) -}} {{- if ne $e.sponsors_accepted "no" -}} @@ -40,3 +41,4 @@

{{ $level.label }} Sponsors

{{- end -}} {{- end -}} {{- end -}} +

From 1167afb37a65cda62d7fd86f2d53533d0b1e8030 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Thu, 2 Feb 2017 17:29:32 -0600 Subject: [PATCH 3/7] Link to site mainpage --- layouts/partials/event_navbar.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layouts/partials/event_navbar.html b/layouts/partials/event_navbar.html index 4d1369f1a..300b71e21 100644 --- a/layouts/partials/event_navbar.html +++ b/layouts/partials/event_navbar.html @@ -1,6 +1,8 @@ +{{/* site data query copypasta */}} {{ $path := split $.Source.File.Path .Site.Params.pathseperator }} {{ $event_slug := index $path 1 }} - +{{ $e := (index $.Site.Data.events $event_slug) }} +{{/* end site data query */}}
From 7e60cd11800bd90e8b5a4cecb2af4ed6c4294e13 Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Thu, 2 Feb 2017 17:31:41 -0600 Subject: [PATCH 6/7] Cosmetic re-arrangements. --- layouts/partials/welcome.html | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/layouts/partials/welcome.html b/layouts/partials/welcome.html index f9f85331e..91b5401d2 100644 --- a/layouts/partials/welcome.html +++ b/layouts/partials/welcome.html @@ -5,10 +5,10 @@ {{/* end site data query */}}
+
- {{ if $e.city }} -

DevOpsDays {{ $e.city }}

- {{ end }} + + {{ if $e.startdate }} {{- if ne $e.startdate $e.enddate }} {{- dateFormat "January 2" $e.startdate -}} - {{- dateFormat "2, 2006" $e.enddate -}} @@ -17,34 +17,45 @@

DevOpsDays {{ $e.city }}

{{- end }} {{ end }}
+ {{if $e.location }} {{- $e.location -}}
{{ end }} + + {{ if $e.description }} + {{ $e.description | markdownify }} +

+ {{ end }} +
+ +
+ {{ partial "events/cta.html" . }} +
+ +
+ {{if $e.city }} {{- $.Scratch.Set "past-counter" 0 -}} {{- range sort $.Site.Data.events "startdate" -}} {{- if .startdate -}} {{- if eq (lower .city) (lower $e.city) -}} {{- if ne .startdate $e.startdate -}} - Past {{ $e.city }} Events
+Past {{ $e.city }} Events
{{- $.Scratch.Set "past-counter" 1 -}} {{- end -}} - {{- end -}} {{- if eq (lower .city) (lower $e.city)}} {{- if ne .startdate $e.startdate -}} - {{ dateFormat "2006" .startdate }}
+ {{ dateFormat "2006" .startdate }}    {{- end -}} {{- end -}} + {{- end -}} {{- end -}} {{- end -}} -
- {{ end }} - {{ partial "events/cta.html" . }} - {{ if $e.description }} - {{ $e.description | markdownify }} +

{{ end }} +
From 726d2fc4eb21fa20b10b2efd4beeaf6a34ea7dde Mon Sep 17 00:00:00 2001 From: Bridget Kromhout Date: Thu, 2 Feb 2017 17:38:24 -0600 Subject: [PATCH 7/7] Still needs a conditional check for any past at all. --- layouts/partials/welcome.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/welcome.html b/layouts/partials/welcome.html index 91b5401d2..6d9ae4c73 100644 --- a/layouts/partials/welcome.html +++ b/layouts/partials/welcome.html @@ -35,13 +35,13 @@
+Past {{ $e.city }} Events
{{if $e.city }} {{- $.Scratch.Set "past-counter" 0 -}} {{- range sort $.Site.Data.events "startdate" -}} {{- if .startdate -}} {{- if eq (lower .city) (lower $e.city) -}} {{- if ne .startdate $e.startdate -}} -Past {{ $e.city }} Events
{{- $.Scratch.Set "past-counter" 1 -}} {{- end -}} {{- if eq (lower .city) (lower $e.city)}}