From 3ff03f81feb9ccecafc194418d55898adc68164c Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Thu, 9 Dec 2021 17:50:30 +0100 Subject: [PATCH] event listing as a timeline Signed-off-by: Toshaan Bharvani --- .../assets/css/timeline.scss | 2 +- .../layouts/events/list.html | 86 +++++++------------ 2 files changed, 32 insertions(+), 56 deletions(-) diff --git a/themes/openpowerfoundation/assets/css/timeline.scss b/themes/openpowerfoundation/assets/css/timeline.scss index e3d1fcd..7416647 100644 --- a/themes/openpowerfoundation/assets/css/timeline.scss +++ b/themes/openpowerfoundation/assets/css/timeline.scss @@ -1,4 +1,4 @@ -$primary: #007aad; +$primary: #2566f4; $dark-primary: #303F9F; $light-primary: #000000; $text: #ffffff; diff --git a/themes/openpowerfoundation/layouts/events/list.html b/themes/openpowerfoundation/layouts/events/list.html index 777e4ce..7897a29 100644 --- a/themes/openpowerfoundation/layouts/events/list.html +++ b/themes/openpowerfoundation/layouts/events/list.html @@ -1,60 +1,36 @@ {{ partial "header.html" . }} + {{ partial "navbar.html" . }} -
-
-
-

{{ .Title }}

- {{ $.Scratch.Set "pre" true }} - {{ $.Scratch.Set "post" true }} - {{ range .Pages.ByDate.Reverse }} - {{ $eventdate := .Param "eventdate" }} - {{ $t := (time $eventdate)}} - {{ if and ($t.After now) ( $.Scratch.Get "pre")}} -

Upcoming Events

- {{ $.Scratch.Set "pre" false }} - {{ end }} - {{ if and ($t.Before now) ($.Scratch.Get "post")}} -

Past Events

- {{ $.Scratch.Set "post" false }} - {{ end }} -
-
- {{ if .Param "image" }} - {{ $imagename := .Param "image" }} - {{ $imagelocation := (printf "%s/%s" "images/events/" $imagename) }} - {{ $imageresource := resources.Get $imagelocation }} - {{ $image := $imageresource }} - {{ .Param - {{ else }} - {{ .Param "title" }} - {{ end }} -
-
-

{{ .Param "title" }}

-

- {{ dateFormat "January 2, 2006" $eventdate }}
- {{ .Param "eventtime" }}
- {{ .Param "eventcalendar" }} -

-

{{ .Content }}

-

- {{ if and ($t.After now) }} - Registration - {{ else }} - Access event content - {{ end }} -

+
+
+
+
+

{{ .Title }}

+

{{ .Content }}

+
+
+
+
+
+
+ {{ range .Pages.ByDate.Reverse }} +
+
+
+

{{ .Title }}

+ {{ $eventdate := .Param "eventdate" }} +
{{ dateFormat "2 January 2006" $eventdate }}
+

{{ .Summary }}

+
-
- {{ end }} -
-
- - - + {{ end }} + + + + + + + -{{ partial "footer.html" . }} \ No newline at end of file +{{ partial "footer.html" . }}