-
+
{{- $topics := (where .Site.Pages "Section" "topics") -}}

Topics

-
-
-
- {{- $top_topics := $.Site.Taxonomies.topics -}} - {{- range $name, $taxonomy := $top_topics -}} - {{- with $.Site.GetPage (printf "/topics/%s" $name) -}} - {{- if eq .Params.weight 2 -}} - - {{- end -}} +
+
+ {{- $top_topics := $.Site.Taxonomies.topics -}} + {{- range $name, $taxonomy := $top_topics -}} + {{- with $.Site.GetPage (printf "/topics/%s" $name) -}} + {{- if eq .Params.weight 2 -}} +
+ {{ partial "core/topics-button" (dict "link" .Permalink "title" .Title) }} +
{{- end -}} {{- end -}} -
+ {{- end -}}
-
-
-
-
- {{- $topics_tax := $.Site.Taxonomies.topics -}} - {{- $topics_count := len $topics_tax -}} - {{- $topics_col := (div $topics_count 3) -}} -

All {{ $topics_count }} Topics

-
+
+
+
+ {{- $topics_tax := $.Site.Taxonomies.topics -}} + {{- $topics_count := len $topics_tax -}} +

All {{ $topics_count }} Topics

-
    - {{/* How we're dividing all the topics into 4 columns - Set the counter to 0. - */}} - {{- $.Scratch.Set "counter" 0 -}} +
+
+ {{/* How we're dividing all the topics into 4 columns + Set the counter to 0. + */}} + {{- $.Scratch.Set "counter" 0 -}} - {{/* Loop through all the terms */}} - {{- range $name, $taxonomy := $topics_tax -}} - {{- with $.Site.GetPage (printf "/topics/%s" $name) -}} - {{/* Increment the counter for each topic */}} - {{- $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) -}} - {{- $count := $.Scratch.Get "counter" -}} + {{/* Loop through all the terms */}} + {{- range $name, $taxonomy := $topics_tax -}} + {{- with $.Site.GetPage (printf "/topics/%s" $name) -}} + {{/* Increment the counter for each topic */}} + {{- $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) -}} + {{- $count := $.Scratch.Get "counter" -}} - {{/* Output the topic HTML */}} -
  • -

    - - {{- .Title -}} - - {{- $taxonomy.Count -}} -

    -
  • - {{- end -}} + {{/* Output the topic HTML */}} + {{ partial "core/topics-button" (dict "link" .Permalink "title" .Title "tag_count" $taxonomy.Count) }} {{- end -}} - + {{- end -}}
    diff --git a/themes/digital.gov/src/scss/new/_card-event.scss b/themes/digital.gov/src/scss/new/_card-event.scss index f837da19a9..30f57bd06b 100644 --- a/themes/digital.gov/src/scss/new/_card-event.scss +++ b/themes/digital.gov/src/scss/new/_card-event.scss @@ -242,10 +242,6 @@ } } - .card-event__host { - @include u-display("none"); - } - .card-event__date { @include u-text("gray-cool-50"); @include u-text("normal"); diff --git a/themes/digital.gov/src/scss/new/_resources.scss b/themes/digital.gov/src/scss/new/_resources.scss index cfb247e0b5..bdd47c23f4 100644 --- a/themes/digital.gov/src/scss/new/_resources.scss +++ b/themes/digital.gov/src/scss/new/_resources.scss @@ -1,12 +1,5 @@ @use "uswds-core" as *; -// .paper sets the background-color for the page -.resources.section { - .paper { - @include u-bg("blue-warm-5"); - } -} - .main-resources { .in-page { @include u-bg("gray-warm-3"); diff --git a/themes/digital.gov/src/scss/new/_topic-buttons.scss b/themes/digital.gov/src/scss/new/_topic-buttons.scss deleted file mode 100644 index 6d9299e607..0000000000 --- a/themes/digital.gov/src/scss/new/_topic-buttons.scss +++ /dev/null @@ -1,106 +0,0 @@ -@use "uswds-core" as *; - -// List of Topic buttons -.topic-buttons { - @include u-bg("white"); - @include u-padding-bottom("105"); - - @include at-media("tablet") { - @include u-padding-bottom(2); - } - - h2 { - @include u-margin-bottom(2); - @include u-font("sans", "md"); - @include u-text("semibold"); - } - - // Topic button style - .topic { - @include u-margin-bottom("105"); - - h3 { - @include u-margin(0); - - a { - @include u-overflow("auto"); - - transition: background-color 0.5s, color 0.5s; - - white-space: nowrap; - - @include u-padding-y(1); - @include u-padding-x(1); - - @include at-media("tablet") { - @include u-padding-left(1); - } - - @include u-font("sans", "sm"); - @include u-text("medium"); - @include u-text("no-underline"); - @include u-bg("white"); - @include u-text("primary-vivid"); - @include u-border("1px", "primary-vivid", "solid"); - @include u-radius("sm"); - @include u-display("block"); - - span { - @include u-float("right"); - margin-right: 10px; - - transition: margin 0.4s; - - @include u-text("gray-1"); - @include u-display("none"); - - @include at-media("tablet-lg") { - @include u-display("block"); - } - } - - &:hover { - @include u-bg("primary-vivid"); - @include u-text("gray-1"); - @include u-border("1px", "primary-vivid", "solid"); - - span { - margin-right: 0; - } - } - } - } - - p { - @include u-font("sans", "md"); - - a { - @include u-text("no-underline"); - } - - .count { - @include u-padding-x("05"); - @include u-radius("pill"); - @include u-bg("primary-lightest"); - @include u-text("base-darker"); - @include u-font("sans", "2xs"); - } - } - } -} - -.topic-buttons__list { - list-style: none; - padding-left: 0; - - @include at-media("tablet-lg") { - column-count: 3; - } -} - -article { - .topics { - @include u-margin-top(7); - @include u-margin-bottom(2); - } -} diff --git a/themes/digital.gov/src/scss/new/_topics-button.scss b/themes/digital.gov/src/scss/new/_topics-button.scss new file mode 100644 index 0000000000..67dd84cd45 --- /dev/null +++ b/themes/digital.gov/src/scss/new/_topics-button.scss @@ -0,0 +1,105 @@ +@use "uswds-core" as *; + +.topics-button { + margin-bottom: units("105"); + + &__link { + @include u-radius("sm"); + background: white; + border: 1px color("primary-vivid") solid; + color: color("primary-vivid"); + display: block; + font-family: family("sans"); + font-size: font-size("sans", "sm"); + font-weight: font-weight("medium"); + overflow: auto; + text-decoration: none; + transition: background-color 0.5s, color 0.5s; + white-space: nowrap; + + @include at-media("tablet") { + overflow: auto; + padding-left: px-to-rem(6px); + padding-right: px-to-rem(6px); + } + } + + &__arrow { + @include u-float("right"); + color: color("gray-1"); + display: none; + margin-right: 10px; + transition: margin 0.4s; + + @include at-media("desktop") { + display: block; + } + } + + &__list { + list-style: none; + padding-left: 0; + + @include at-media("tablet-lg") { + column-count: 3; + } + } + + &__number { + @include u-radius("pill"); + background: color("primary-lightest"); + color: color("base-darker"); + font-size: font-size("sans", "2xs"); + height: fit-content; + margin: auto; + padding-left: units("05"); + padding-right: units("05"); + } +} + +.topics-button--primary .topics-button__link { + padding: units(1); + padding-left: units(0.5); + + &:visited { + color: color("primary-vivid"); + } + + &:hover { + background: color("primary-vivid"); + border: 1px color("primary-vivid") solid; + color: color("gray-1"); + + .topics-button__arrow { + margin-right: 0; + } + } +} + +.topics-button--count { + display: flex; + list-style: none; + margin-bottom: units(1.5); + transition: none; + width: fit-content; + + @include at-media("tablet") { + column-count: 3; + margin-bottom: 0; + } + + .topics-button__link { + border: none; + font-weight: font-weight(400); + + &:visited { + color: color("indigo-warm-60v"); + } + + @include at-media("tablet") { + margin-bottom: 0; + padding: units(1); + padding-left: 0; + } + } +} diff --git a/themes/digital.gov/src/scss/new/styles.scss b/themes/digital.gov/src/scss/new/styles.scss index b34870d54a..663d972f4d 100644 --- a/themes/digital.gov/src/scss/new/styles.scss +++ b/themes/digital.gov/src/scss/new/styles.scss @@ -152,7 +152,7 @@ @forward "service-contact"; // Topics styles -@forward "topic-buttons"; +@forward "topics-button"; @forward "list-topics"; @forward "topics"; @forward "buttons";