From cc1f9da9f39ad4e51b4da984ca9b211abe1fd0e8 Mon Sep 17 00:00:00 2001 From: Ray Estrada Date: Thu, 14 Mar 2024 09:28:41 -0700 Subject: [PATCH] VOTE-943 configure and style the sitemap --- .../sync/block.block.votegov_htmlsitemap.yml | 4 ++-- config/sync/views.view.sitemap.yml | 10 +++++++-- .../votegov/src/sass/components/_index.scss | 3 ++- .../votegov/src/sass/components/sitemap.scss | 22 +++++++++++++++++++ .../ec-placeholder--sitemap-menu.html.twig | 6 ++--- .../menu--main--votegov-htmlsitemap.html.twig | 22 +++++++++++++++++++ .../views/views-view--sitemap.html.twig | 13 +++++++++++ 7 files changed, 72 insertions(+), 8 deletions(-) create mode 100644 web/themes/custom/votegov/src/sass/components/sitemap.scss create mode 100644 web/themes/custom/votegov/templates/navigation/menu--main--votegov-htmlsitemap.html.twig create mode 100644 web/themes/custom/votegov/templates/views/views-view--sitemap.html.twig diff --git a/config/sync/block.block.votegov_htmlsitemap.yml b/config/sync/block.block.votegov_htmlsitemap.yml index 3968f19e8..8ed7e97c0 100644 --- a/config/sync/block.block.votegov_htmlsitemap.yml +++ b/config/sync/block.block.votegov_htmlsitemap.yml @@ -20,8 +20,8 @@ settings: label_display: '0' provider: system level: 1 - depth: 1 - expand_all_items: false + depth: 3 + expand_all_items: true only_translated_labels: 0 only_translated_content: 0 visibility: { } diff --git a/config/sync/views.view.sitemap.yml b/config/sync/views.view.sitemap.yml index 6bd093d1c..4bc159d29 100644 --- a/config/sync/views.view.sitemap.yml +++ b/config/sync/views.view.sitemap.yml @@ -4,7 +4,6 @@ status: true dependencies: config: - node.type.state_territory - - system.menu.footer module: - node - user @@ -241,7 +240,14 @@ display: groups: 1: AND style: - type: default + type: html_list + options: + grouping: { } + row_class: '' + default_row_class: false + type: ul + wrapper_class: '' + class: 'usa-list usa-list--unstyled' row: type: fields query: diff --git a/web/themes/custom/votegov/src/sass/components/_index.scss b/web/themes/custom/votegov/src/sass/components/_index.scss index f52a9e6f9..36b610207 100644 --- a/web/themes/custom/votegov/src/sass/components/_index.scss +++ b/web/themes/custom/votegov/src/sass/components/_index.scss @@ -16,5 +16,6 @@ @forward "feature-cards"; @forward "quick-links"; @forward "basic"; -@forward "registration-tool" +@forward "registration-tool"; +@forward "sitemap"; diff --git a/web/themes/custom/votegov/src/sass/components/sitemap.scss b/web/themes/custom/votegov/src/sass/components/sitemap.scss new file mode 100644 index 000000000..d744cadac --- /dev/null +++ b/web/themes/custom/votegov/src/sass/components/sitemap.scss @@ -0,0 +1,22 @@ +@use "uswds-core" as *; + +.vote-sitemap { + @include u-margin-y(4); + + li > ul { + @include u-margin-y(2); + } +} + +.vote-sitemap--register { + ul { + @include at-media('mobile-lg') { + column-count: 2; + column-gap: 2rem; + } + + @include at-media('tablet-lg') { + column-count: 3; + } + } +} diff --git a/web/themes/custom/votegov/templates/embedded-content/ec-placeholder--sitemap-menu.html.twig b/web/themes/custom/votegov/templates/embedded-content/ec-placeholder--sitemap-menu.html.twig index 2f61c8b37..dc0e43f7c 100644 --- a/web/themes/custom/votegov/templates/embedded-content/ec-placeholder--sitemap-menu.html.twig +++ b/web/themes/custom/votegov/templates/embedded-content/ec-placeholder--sitemap-menu.html.twig @@ -1,3 +1,3 @@ -
- {{ drupal_entity('block', 'htmlsitemap') }} -
+ diff --git a/web/themes/custom/votegov/templates/navigation/menu--main--votegov-htmlsitemap.html.twig b/web/themes/custom/votegov/templates/navigation/menu--main--votegov-htmlsitemap.html.twig new file mode 100644 index 000000000..c6b85e764 --- /dev/null +++ b/web/themes/custom/votegov/templates/navigation/menu--main--votegov-htmlsitemap.html.twig @@ -0,0 +1,22 @@ +{% import _self as menus %} + +{{ menus.menu_links(items, 0) }} + +{% macro menu_links(items, menu_level) %} + {% import _self as menus %} + {% if items %} + {% if menu_level == 0 %} +