From a878b681310f8a9c481f85ed50392d1a17dfe1d0 Mon Sep 17 00:00:00 2001 From: lcummings3424 Date: Mon, 22 Jul 2024 15:26:39 -0500 Subject: [PATCH] Refactor in-page nav --- themes/digital.gov/layouts/_default/list.html | 20 +------ .../digital.gov/layouts/_default/single.html | 18 +----- .../layouts/communities/single.html | 58 ++++++------------- .../partials/core/usa-in-page-nav.html | 18 ++++++ .../digital.gov/layouts/resources/single.html | 15 ++--- .../digital.gov/layouts/services/single.html | 14 +---- 6 files changed, 47 insertions(+), 96 deletions(-) create mode 100644 themes/digital.gov/layouts/partials/core/usa-in-page-nav.html diff --git a/themes/digital.gov/layouts/_default/list.html b/themes/digital.gov/layouts/_default/list.html index cadd235057..7acd417f6f 100644 --- a/themes/digital.gov/layouts/_default/list.html +++ b/themes/digital.gov/layouts/_default/list.html @@ -14,7 +14,7 @@

{{- .Params.kicker -}}

{{- end -}} - {{/* Page Title */}} + {{/* Page Title */}}

{{- .Title | markdownify -}}

{{/* Deck */}} @@ -27,23 +27,7 @@

{{- .Title | markdownify -}}

-
- - -
- {{/* Content */}} -
- {{- .Content -}} -
-
-
+ {{- partial "partials/core/usa-in-page-nav.html" . -}}
diff --git a/themes/digital.gov/layouts/_default/single.html b/themes/digital.gov/layouts/_default/single.html index cadd235057..f778cd2d3e 100644 --- a/themes/digital.gov/layouts/_default/single.html +++ b/themes/digital.gov/layouts/_default/single.html @@ -27,23 +27,7 @@

{{- .Title | markdownify -}}

-
- - -
- {{/* Content */}} -
- {{- .Content -}} -
-
-
+ {{- partial "partials/core/usa-in-page-nav.html" . -}}
diff --git a/themes/digital.gov/layouts/communities/single.html b/themes/digital.gov/layouts/communities/single.html index 52d8028105..4f6b158846 100644 --- a/themes/digital.gov/layouts/communities/single.html +++ b/themes/digital.gov/layouts/communities/single.html @@ -15,18 +15,13 @@

{{ .Title | markdownify }} Community

- - {{/* Summary */}} - {{- if .Params.summary -}} -
+
+ {{- if .Params.summary -}}

{{- .Params.summary | markdownify -}}

{{- if .Params.community_list -}} @@ -47,11 +42,7 @@

{{- range $i, $e := .Params.community_list -}}
- {{/* Checks to see if the community is public or govt only and sets the "terms" of the community, with an option to override the terms for each community by setting it in the front matter */}} - - {{/* PUBLIC */}} {{- if eq $e.type "public" -}} - {{/* Checking to see if community terms are defined */}} {{- if $e.terms -}}

{{- $e.terms | markdownify -}}

{{- else -}} @@ -59,7 +50,6 @@

{{- end -}} {{- end -}} - {{/* GOVT */}} {{- if eq $e.type "government" -}} {{- if $e.terms -}}

{{- $e.terms | markdownify -}}

@@ -70,7 +60,6 @@

{{- end -}} {{- end -}} - {{/* GOVT_ONLY */}} {{- if eq $e.type "government_only" -}} {{- if $e.terms -}}

{{- $e.terms | markdownify -}}

@@ -81,51 +70,42 @@

- {{/* Community JOIN types --- - - Listerv via an email (most common) - - Listerv via a form - - Google Group - - Slack - */}} - {{/* Listserv Platforms without form sign-up option */}} {{- if and (eq $e.platform "listserv") (not $e.subscribe_form ) -}} {{- partial "core/community-join-without-form.html" (dict "context" . "e" $e) -}} {{- end -}} - {{/* Google Group platforms */}} {{- if and (eq $e.platform "google-group") ( $e.subscribe_form ) -}} {{- partial "core/community-join-google-group.html" (dict "context" . "e" $e) -}} {{- end -}} - {{/* Slack platforms */}} {{- if and (eq $e.platform "slack") ( $e.subscribe_form ) -}} {{- partial "core/community-join-slack.html" (dict "context" . "e" $e) -}} {{- end -}} -
{{- end -}} - {{- end -}} -
- {{- .Content -}} -
+ {{- end -}} + -
- {{- partial "core/get-upcomingevents.html" . -}} -
+
+ {{- .Content -}} +
+ +
+ {{- partial "core/get-upcomingevents.html" . -}} +
-
-

Community Conduct

- {{- partial "core/community_pagefooter.html" . -}} -
-
-
-
-
+
+

Community Conduct

+ {{- partial "core/community_pagefooter.html" . -}} +
- {{- end -}} +
+
+
+

diff --git a/themes/digital.gov/layouts/partials/core/usa-in-page-nav.html b/themes/digital.gov/layouts/partials/core/usa-in-page-nav.html new file mode 100644 index 0000000000..2cfc259731 --- /dev/null +++ b/themes/digital.gov/layouts/partials/core/usa-in-page-nav.html @@ -0,0 +1,18 @@ + +
+ + +
+ {{/* Content */}} +
+ {{- .Content -}} +
+
+
diff --git a/themes/digital.gov/layouts/resources/single.html b/themes/digital.gov/layouts/resources/single.html index e704112f95..3b2a7092bf 100644 --- a/themes/digital.gov/layouts/resources/single.html +++ b/themes/digital.gov/layouts/resources/single.html @@ -18,15 +18,13 @@

{{- .Title | markdownify -}}

-
- {{/* Content */}} -
- {{- .Content -}} -
- - {{/* Touchpoints Form */}} - {{- partial "core/touchpoints-form.html" . -}} +
+ {{- .Content -}}
+ + {{- partial "core/touchpoints-form.html" . -}} + + diff --git a/themes/digital.gov/layouts/services/single.html b/themes/digital.gov/layouts/services/single.html index 74563d8fb3..9fb1a06ce9 100644 --- a/themes/digital.gov/layouts/services/single.html +++ b/themes/digital.gov/layouts/services/single.html @@ -30,19 +30,7 @@

{{- .Title | markdownify -}}

-
- -
- {{/* Content */}} -
- {{- .Content -}} -
-
-
+ {{- partial "partials/core/usa-in-page-nav.html" . -}} {{- end -}}