From dd4235a5eeb12a91589fed11db611cfaefdab3ba Mon Sep 17 00:00:00 2001 From: lcummings3424 Date: Fri, 28 Jun 2024 13:02:27 -0500 Subject: [PATCH 1/7] Implement new side bar --- themes/digital.gov/layouts/events/single.html | 14 ++---- .../partials/core/primary_communities.html | 43 +++++++++++++++++++ 2 files changed, 47 insertions(+), 10 deletions(-) create mode 100644 themes/digital.gov/layouts/partials/core/primary_communities.html diff --git a/themes/digital.gov/layouts/events/single.html b/themes/digital.gov/layouts/events/single.html index ff8b7ac9c2..aa06cc59ef 100644 --- a/themes/digital.gov/layouts/events/single.html +++ b/themes/digital.gov/layouts/events/single.html @@ -26,8 +26,6 @@

{{- .Title | markdownify -}}

{{- if .Params.deck -}}
{{- .Params.deck | markdownify -}}
{{- end -}} - -

{{- .Title | markdownify -}} – {{ with .Params.end_date -}} {{- . | dateFormat "3:04 PM ET" -}} - {{- end -}} + {{- end }}

- {{- if .Params.host -}}

Hosted by Digital.gov and the {{ .Params.host }}

{{- end -}} - @@ -87,7 +83,7 @@

{{- .Title | markdownify -}}

{{/* EVENT Stages — Depending on the type of event, different "event stages" appear on the page. - - Only for upcomming events + - Only for upcoming events ==================================== */}} @@ -97,7 +93,6 @@

{{- .Title | markdownify -}}

{{- if eq $future_event true -}} {{- .Render "stage-youtube-live" -}} {{- end -}} - {{- end -}} {{/* PAST EVENT / Video -------------------- */}} @@ -146,6 +141,8 @@

{{- .Title | markdownify -}}

{{/* Authors */}} + {{- partial "core/primary_communities.html" . -}} + {{- if .Params.authors -}}

In this talk

{{- partial "core/get_authors.html" . -}} @@ -166,9 +163,6 @@

In this talk

{{- end -}} {{- end -}} - {{/* Related Communities and Services */}} - {{- partial "core/get_related.html" . -}} - {{/* Topics */}} {{- partial "core/list-topics.html" . -}} diff --git a/themes/digital.gov/layouts/partials/core/primary_communities.html b/themes/digital.gov/layouts/partials/core/primary_communities.html new file mode 100644 index 0000000000..53e2ea1a97 --- /dev/null +++ b/themes/digital.gov/layouts/partials/core/primary_communities.html @@ -0,0 +1,43 @@ +{{ $mainCommunities := (where .Site.Pages "Section" "communities") }} +{{ $mainCommunities = (where $mainCommunities ".Params.dg_highlight" "eq" true) }} +{{ $featuredCommunity := (where $mainCommunities ".Params.weight" "eq" 2) }} +{{ $mainCommunities = union $featuredCommunity $mainCommunities }} +{{ $mainCommunities = first 8 ($mainCommunities.ByTitle) }} + +{{/* Check if there are main community pages to display */}} +{{- with $mainCommunities -}} + +{{- end -}} From 33a4b4264452c7db50df4b15391038ff5e3ebaf7 Mon Sep 17 00:00:00 2001 From: lcummings3424 Date: Tue, 2 Jul 2024 15:37:16 -0500 Subject: [PATCH 2/7] Update for 8th COP, implement suggestions --- themes/digital.gov/layouts/events/single.html | 6 ++- .../core/display_primary_communities.html | 48 +++++++++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 themes/digital.gov/layouts/partials/core/display_primary_communities.html diff --git a/themes/digital.gov/layouts/events/single.html b/themes/digital.gov/layouts/events/single.html index aa06cc59ef..7fed6d62c2 100644 --- a/themes/digital.gov/layouts/events/single.html +++ b/themes/digital.gov/layouts/events/single.html @@ -141,8 +141,6 @@

{{- .Title | markdownify -}}

{{/* Authors */}} - {{- partial "core/primary_communities.html" . -}} - {{- if .Params.authors -}}

In this talk

{{- partial "core/get_authors.html" . -}} @@ -163,6 +161,10 @@

In this talk

{{- end -}} {{- end -}} + + {{/* Display Primary communities */}} + {{- partial "core/display_primary_communities.html" . -}} + {{/* Topics */}} {{- partial "core/list-topics.html" . -}} diff --git a/themes/digital.gov/layouts/partials/core/display_primary_communities.html b/themes/digital.gov/layouts/partials/core/display_primary_communities.html new file mode 100644 index 0000000000..ece3caf28e --- /dev/null +++ b/themes/digital.gov/layouts/partials/core/display_primary_communities.html @@ -0,0 +1,48 @@ +{{/* ====================================== + Display Primary Communites + Displays the list of primary COPs on the side bar of community pages. + ====================================== +*/}} +{{ $mainCommunities := (where .Site.Pages "Section" "communities") }} +{{ $mainCommunities = (where $mainCommunities ".Params.dg_highlight" "eq" true) }} +{{ $featuredCommunity := (where $mainCommunities ".Params.weight" "eq" 2) }} +{{ $mainCommunities = union $featuredCommunity $mainCommunities }} +{{ $mainCommunities = first 8 ($mainCommunities.ByTitle) }} + +{{/* Check if there are main community pages to display */}} +{{- with $mainCommunities -}} + +{{- end -}} From e991bd71b01daaae0a7c8f724d071fed46efda41 Mon Sep 17 00:00:00 2001 From: lcummings3424 Date: Tue, 2 Jul 2024 16:23:05 -0500 Subject: [PATCH 3/7] Formatting fix --- themes/digital.gov/layouts/events/single.html | 1 - .../layouts/partials/core/display_primary_communities.html | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/themes/digital.gov/layouts/events/single.html b/themes/digital.gov/layouts/events/single.html index 7fed6d62c2..f5744ba03c 100644 --- a/themes/digital.gov/layouts/events/single.html +++ b/themes/digital.gov/layouts/events/single.html @@ -161,7 +161,6 @@

In this talk

{{- end -}} {{- end -}} - {{/* Display Primary communities */}} {{- partial "core/display_primary_communities.html" . -}} diff --git a/themes/digital.gov/layouts/partials/core/display_primary_communities.html b/themes/digital.gov/layouts/partials/core/display_primary_communities.html index ece3caf28e..e0162acc37 100644 --- a/themes/digital.gov/layouts/partials/core/display_primary_communities.html +++ b/themes/digital.gov/layouts/partials/core/display_primary_communities.html @@ -1,6 +1,6 @@ {{/* ====================================== Display Primary Communites - Displays the list of primary COPs on the side bar of community pages. + Displays the list of primary COPs on the side bar of community pages. ====================================== */}} {{ $mainCommunities := (where .Site.Pages "Section" "communities") }} From 1ca60438cc46427f92050aaceb6df334410e6e85 Mon Sep 17 00:00:00 2001 From: lcummings3424 Date: Mon, 8 Jul 2024 09:41:24 -0500 Subject: [PATCH 4/7] Implement suggestions --- themes/digital.gov/layouts/events/single.html | 9 +++++++-- ...primary_communities.html => primary-communities.html} | 0 2 files changed, 7 insertions(+), 2 deletions(-) rename themes/digital.gov/layouts/partials/core/{display_primary_communities.html => primary-communities.html} (100%) diff --git a/themes/digital.gov/layouts/events/single.html b/themes/digital.gov/layouts/events/single.html index f5744ba03c..da3f75259e 100644 --- a/themes/digital.gov/layouts/events/single.html +++ b/themes/digital.gov/layouts/events/single.html @@ -1,3 +1,8 @@ +{{/* + This template renders an event page with dynamic content including date, time, host, registration options, + and different event stages based on the platform and whether the event is in the future or past. + It includesthe event title, description, location, and actions for users to register or add the event to their calendar. +*/}} {{- define "content" -}} {{/* This sets $future_event to true or false */}} {{- $future_event := (time .Params.end_date).After now -}} @@ -161,8 +166,8 @@

In this talk

{{- end -}} {{- end -}} - {{/* Display Primary communities */}} - {{- partial "core/display_primary_communities.html" . -}} + {{/* Display Primary Communities */}} + {{- partial "core/primary-communities.html" . -}} {{/* Topics */}} {{- partial "core/list-topics.html" . -}} diff --git a/themes/digital.gov/layouts/partials/core/display_primary_communities.html b/themes/digital.gov/layouts/partials/core/primary-communities.html similarity index 100% rename from themes/digital.gov/layouts/partials/core/display_primary_communities.html rename to themes/digital.gov/layouts/partials/core/primary-communities.html From fc8fc0511f4e31d4dca298f621e9da030a6b57c0 Mon Sep 17 00:00:00 2001 From: lcummings3424 Date: Mon, 8 Jul 2024 09:49:24 -0500 Subject: [PATCH 5/7] formatting fix --- themes/digital.gov/layouts/events/single.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/themes/digital.gov/layouts/events/single.html b/themes/digital.gov/layouts/events/single.html index da3f75259e..7571fc4a9c 100644 --- a/themes/digital.gov/layouts/events/single.html +++ b/themes/digital.gov/layouts/events/single.html @@ -1,7 +1,6 @@ -{{/* - This template renders an event page with dynamic content including date, time, host, registration options, - and different event stages based on the platform and whether the event is in the future or past. - It includesthe event title, description, location, and actions for users to register or add the event to their calendar. +{{/* This template renders an event page with dynamic content including date, time, host, registration options, + and different event stages based on the platform and whether the event is in the future or past. + It includesthe event title, description, location, and actions for users to register or add the event to their calendar. */}} {{- define "content" -}} {{/* This sets $future_event to true or false */}} From 58001c02463152a2a609b6603f6304d67a2325e9 Mon Sep 17 00:00:00 2001 From: lcummings3424 Date: Thu, 11 Jul 2024 11:18:03 -0500 Subject: [PATCH 6/7] Delete extra file --- .../partials/core/primary_communities.html | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 themes/digital.gov/layouts/partials/core/primary_communities.html diff --git a/themes/digital.gov/layouts/partials/core/primary_communities.html b/themes/digital.gov/layouts/partials/core/primary_communities.html deleted file mode 100644 index 53e2ea1a97..0000000000 --- a/themes/digital.gov/layouts/partials/core/primary_communities.html +++ /dev/null @@ -1,43 +0,0 @@ -{{ $mainCommunities := (where .Site.Pages "Section" "communities") }} -{{ $mainCommunities = (where $mainCommunities ".Params.dg_highlight" "eq" true) }} -{{ $featuredCommunity := (where $mainCommunities ".Params.weight" "eq" 2) }} -{{ $mainCommunities = union $featuredCommunity $mainCommunities }} -{{ $mainCommunities = first 8 ($mainCommunities.ByTitle) }} - -{{/* Check if there are main community pages to display */}} -{{- with $mainCommunities -}} - -{{- end -}} From e2a703bcfd71ac0bdf9bfb806107f5e179a74292 Mon Sep 17 00:00:00 2001 From: Nick Lyons Date: Thu, 11 Jul 2024 14:07:16 -0400 Subject: [PATCH 7/7] Fixed formatting for comments --- themes/digital.gov/layouts/events/single.html | 5 +++-- .../layouts/partials/core/primary-communities.html | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/digital.gov/layouts/events/single.html b/themes/digital.gov/layouts/events/single.html index 7571fc4a9c..d6b79470d2 100644 --- a/themes/digital.gov/layouts/events/single.html +++ b/themes/digital.gov/layouts/events/single.html @@ -1,6 +1,7 @@ -{{/* This template renders an event page with dynamic content including date, time, host, registration options, +{{/* ==== + This template renders an event page with dynamic content including date, time, host, registration options, and different event stages based on the platform and whether the event is in the future or past. - It includesthe event title, description, location, and actions for users to register or add the event to their calendar. + It includes the event title, description, location, and actions for users to register or add the event to their calendar. */}} {{- define "content" -}} {{/* This sets $future_event to true or false */}} diff --git a/themes/digital.gov/layouts/partials/core/primary-communities.html b/themes/digital.gov/layouts/partials/core/primary-communities.html index e0162acc37..ca323c5f84 100644 --- a/themes/digital.gov/layouts/partials/core/primary-communities.html +++ b/themes/digital.gov/layouts/partials/core/primary-communities.html @@ -1,6 +1,5 @@ {{/* ====================================== - Display Primary Communites - Displays the list of primary COPs on the side bar of community pages. + Displays a vertical list of primary CoP's on the sidebar on event pages. ====================================== */}} {{ $mainCommunities := (where .Site.Pages "Section" "communities") }}