From 753bfd35cc6fd3ab51446c8dcf220bce04335bb1 Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Sun, 29 May 2022 13:47:51 +0200 Subject: [PATCH] add cadence and nextmeeting to group front page Signed-off-by: Toshaan Bharvani --- .../layouts/groups/single.html | 58 +++++++++++++++++-- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/themes/openpowerfoundation/layouts/groups/single.html b/themes/openpowerfoundation/layouts/groups/single.html index 5772a7e..6b27af7 100644 --- a/themes/openpowerfoundation/layouts/groups/single.html +++ b/themes/openpowerfoundation/layouts/groups/single.html @@ -1,7 +1,7 @@ {{ partial "header.html" . }} {{ partial "navbar.html" . }} {{ $filename := .File.BaseFileName }} -{{ $datafile := index $.Site.Data.groups.members $filename }} +{{ $groupdatafile := index $.Site.Data.groups $filename }}
@@ -57,7 +57,7 @@ {{ end }} {{ if eq (.Param "participation") "Members" }} - + {{ end }} {{ if eq (.Param "participation") "Limited" }} @@ -66,6 +66,56 @@ {{ end }} +
  • Workgroup Involvment +
      + {{ if .Param "cadence" }} +
    • Workgroup Meeting Cadence :
      {{ .Param "cadence" }}
    • +{{ if $groupdatafile.nextmeeting }} +{{ $today := int (now.Format "20060102") }} +{{ $nextmeetingdate := $groupdatafile.nextmeeting.date }} +{{ $nextmeetingday := int ((time $groupdatafile.nextmeeting.date).Format "20060102") }} +{{ $nextmeetingtime := $groupdatafile.nextmeeting.time }} +{{ $datediff := (sub $today $nextmeetingday) }} +{{ if lt $datediff 0 }} +
    • Next meeting on :
      +
      +  +{{ $datetime := time (printf "%sT%s:00.00+00:00" $nextmeetingdate $nextmeetingtime) }} +{{ $datetime.Format "2" }}{{ if in (slice 1 21 31) $datetime.Day}}st{{ else if in (slice 2 22) $datetime.Day}}nd{{ else if in (slice 3 23) $datetime.Day}}rd{{ else }}th{{ end }} of {{ $datetime.Format "January 2006" }} +@ {{ $nextmeetingtime }} UTC +
      + + + +
      +{{ end }} +{{ end }} +
    • + {{ end }} +
    +
  • Workgroup Resources :
      {{ if .Param "discussion" }} @@ -101,10 +151,10 @@
    • Kanban
    • {{ end }}
    - {{ if $datafile.members }} + {{ if $groupdatafile.members }}
  • Active Voting Work Group Members :
      • - {{ range $member := $datafile.members }} + {{ range $member := $groupdatafile.members }} {{ $memberfile := printf "%s/%s" "members" $member }} {{ with $.Site.GetPage $memberfile }}