From 8325e02e69d9935c51c83dbe781b081bc7fdd118 Mon Sep 17 00:00:00 2001 From: "Justin W. Flory (he/him) [UNICEF Innovation]" Date: Wed, 29 Dec 2021 13:07:22 -0500 Subject: [PATCH] :new: :lipstick: layouts: Add dpg-report layout (see unicef/coach#1) This commit creates a new custom layout for DPG report cards in the UNICEF Inventory theme. DPG report cards are at-a-glance views of a Venture Fund company's progress in meeting the DPG Standard. More context about this change is in unicef/coach#1. This commit should be merged once the idea is validated and the early prototyping phase is complete. Signed-off-by: Justin W. Flory (he/him) [UNICEF Innovation] --- assets/css/style.css | 23 +++- data/dpg_standards.yaml | 37 ++++++ layouts/_default/dpg-report.html | 3 + layouts/partials/dpg-report.html | 206 +++++++++++++++++++++++++++++++ layouts/partials/head.html | 3 + 5 files changed, 270 insertions(+), 2 deletions(-) create mode 100644 data/dpg_standards.yaml create mode 100644 layouts/_default/dpg-report.html create mode 100644 layouts/partials/dpg-report.html diff --git a/assets/css/style.css b/assets/css/style.css index 56400d6..ddb68bd 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -14,7 +14,6 @@ P { /* Alert Box */ - .col-fixed { width: 75%; /* min-height: 9rem; @@ -38,9 +37,29 @@ P { display: grid !important; } } +/* End of alert box */ +/* ===[ start: DPG Report styling ]=== */ +#report-dpg #report-dpg-header { + background-color: #cccccc; + color: var(--white-color); + font-weight: bold; + text-align: center; +} +#report-dpg .report-dpg-status1 { + background-color: #66cc00; + color: var(--text-color); +} +#report-dpg .report-dpg-status2 { + background-color: #ffcc00; + color: var(--text-color); +} +#report-dpg .report-dpg-status3 { + background-color: #ff0033; + color: var(--white-color); +} +/* ===[ end: DPG Report styling ]=== */ -/* End of alert box */ h1, h2, diff --git a/data/dpg_standards.yaml b/data/dpg_standards.yaml new file mode 100644 index 0000000..c9ebdd6 --- /dev/null +++ b/data/dpg_standards.yaml @@ -0,0 +1,37 @@ +--- +req1: + sequence: "1" + description: Relevance to Sustainable Development Goals +req2: + sequence: "2" + description: Use of Approved Open Licenses +req3: + sequence: "3" + description: Clear Ownership +req4: + sequence: "4" + description: Platform Independence +req5: + sequence: "5" + description: Documentation +req6: + sequence: "6" + description: Mechanism for Extracting Data +req7: + sequence: "7" + description: Adherence to Privacy and Applicable Laws +req8: + sequence: "8" + description: Adherence to Standards & Best Practices +req9: + sequence: "9" + description: Do No Harm by Design +req9a: + sequence: "9a" + description: Data Privacy & Security +req9b: + sequence: "9b" + description: Inappropriate & Illegal Content +req9c: + sequence: "9c" + description: Protection from Harassment diff --git a/layouts/_default/dpg-report.html b/layouts/_default/dpg-report.html new file mode 100644 index 0000000..0087b82 --- /dev/null +++ b/layouts/_default/dpg-report.html @@ -0,0 +1,3 @@ +{{ define "main" }} +{{ partial "dpg-report.html" . }} +{{ end }} diff --git a/layouts/partials/dpg-report.html b/layouts/partials/dpg-report.html new file mode 100644 index 0000000..53946b8 --- /dev/null +++ b/layouts/partials/dpg-report.html @@ -0,0 +1,206 @@ +{{ "" | safeHTML }} + + +{{ "" | safeHTML }} +
+
+
+ +
+ +
+ +
+ {{ "" | safeHTML }} +
+ {{ partial "breadcrumb.html" . }} +
+ {{ "" | safeHTML }} + +
+

{{ .Title }}

+
+ {{ partial "header-link.html" .Content }} + + +
+
+
Req. #
+
Indicator
+
Status
+
Evidence
+
+ + +
+
{{ .Site.Data.dpg_standards.req1.sequence }}
+
{{ .Site.Data.dpg_standards.req1.description }}
+
+
{{ .Param "dpg_report.req1.evidence" | markdownify }}
+
+
+
{{ .Site.Data.dpg_standards.req2.sequence }}
+
{{ .Site.Data.dpg_standards.req2.description }}
+
+
{{ .Param "dpg_report.req2.evidence" | markdownify }}
+
+
+
{{ .Site.Data.dpg_standards.req3.sequence }}
+
{{ .Site.Data.dpg_standards.req3.description }}
+
+
{{ .Param "dpg_report.req3.evidence" | markdownify }}
+
+
+
{{ .Site.Data.dpg_standards.req4.sequence }}
+
{{ .Site.Data.dpg_standards.req4.description }}
+
+
{{ .Param "dpg_report.req4.evidence" | markdownify }}
+
+
+
{{ .Site.Data.dpg_standards.req5.sequence }}
+
{{ .Site.Data.dpg_standards.req5.description }}
+
+
{{ .Param "dpg_report.req5.evidence" | markdownify }}
+
+
+
{{ .Site.Data.dpg_standards.req6.sequence }}
+
{{ .Site.Data.dpg_standards.req6.description }}
+
+
{{ .Param "dpg_report.req6.evidence" | markdownify }}
+
+
+
{{ .Site.Data.dpg_standards.req7.sequence }}
+
{{ .Site.Data.dpg_standards.req7.description }}
+
+
{{ .Param "dpg_report.req7.evidence" | markdownify }}
+
+
+
{{ .Site.Data.dpg_standards.req8.sequence }}
+
{{ .Site.Data.dpg_standards.req8.description }}
+
+
{{ .Param "dpg_report.req8.evidence" | markdownify }}
+
+
+
{{ .Site.Data.dpg_standards.req9.sequence }}
+
{{ .Site.Data.dpg_standards.req9.description }}
+
+
{{ .Param "dpg_report.req9.evidence" | markdownify }}
+
+
+
{{ .Site.Data.dpg_standards.req9a.sequence }}
+
{{ .Site.Data.dpg_standards.req9a.description }}
+
+
{{ .Param "dpg_report.req9a.evidence" | markdownify }}
+
+
+
{{ .Site.Data.dpg_standards.req9b.sequence }}
+
{{ .Site.Data.dpg_standards.req9b.description }}
+
+
{{ .Param "dpg_report.req9b.evidence" | markdownify }}
+
+
+
{{ .Site.Data.dpg_standards.req9c.sequence }}
+
{{ .Site.Data.dpg_standards.req9c.description }}
+
+
{{ .Param "dpg_report.req9c.evidence" | markdownify }}
+
+
+
+ + + +
+
+
+
+
+{{ "" | safeHTML }} + + +{{ define "section-tree-nav" }} +{{ $showvisitedlinks := .showvisitedlinks }} +{{ $currentNode := .currentnode }} +{{with .sect}} +{{safeHTML .Params.head}} +{{ $fileUniqueID := "" }} +{{ with .File }}{{ $fileUniqueID = .UniqueID }}{{ end }} +{{ $currentNodeFileUniqueID := "" }} +{{ with $currentNode.File }}{{ $currentNodeFileUniqueID = .UniqueID }}{{ end }} +
  • + + {{safeHTML .Params.Pre}}{{or .Params.menuTitle .LinkTitle .Title}}{{safeHTML .Params.Post}} + + {{ $numberOfPages := (add (len .Pages) (len .Sections)) }} + {{ if ne $numberOfPages 0 }} +
      + {{ range .Pages.ByWeight }} + {{ if and .Params.hidden (not $.showhidden) }} + {{else}} + {{ template "section-tree-nav" dict "sect" . "currentnode" $currentNode }} + {{end}} + {{end}} +
    + {{ end }} +
  • +{{ end }} +{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a2f302f..b50d212 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -57,6 +57,9 @@ {{ "" | safeHTML }} +{{ "" | safeHTML }} + + {{ "" | safeHTML }}