Skip to content

Commit

Permalink
Merge branch 'main' into Update-Community-Links-Events
Browse files Browse the repository at this point in the history
  • Loading branch information
RileySeaburg authored Jul 16, 2024
2 parents 4f0ca82 + 6439f46 commit 20493c5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion themes/digital.gov/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{{- "<!-- Google Tag Manager (noscript) -->" | safeHTML -}}
<noscript
><iframe
src="https://www.googletagmanager.com/ns.html?id=G-HBYXWFP794"
src="https://www.googletagmanager.com/ns.html?id=GTM-MZCKZPQ"
height="0"
width="0"
style="display:none;visibility:hidden"
Expand Down
2 changes: 1 addition & 1 deletion themes/digital.gov/layouts/partials/core/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
j.async = true;
j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, "script", "dataLayer", "G-HBYXWFP794");
})(window, document, "script", "dataLayer", "GTM-MZCKZPQ");
</script>

{{ "<!-- End Google Tag Manager -->" | safeHTML }}
Expand Down
14 changes: 14 additions & 0 deletions themes/digital.gov/src/js/in-page-navigation.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Only show the in-page navigation when 3 or more nav items are present on the page
// Only display h2's as the primary nav items and set h3 and h4 sub-items to display: none

document.addEventListener("DOMContentLoaded", () => {
const relatedItems = document.querySelector("[data-related-items]");
const inPageNav = document.querySelector(".usa-in-page-nav__nav");
Expand All @@ -17,4 +20,15 @@ document.addEventListener("DOMContentLoaded", () => {

inPageNavHeader.removeAttribute("tabindex");
relatedItems.before(inPageNav);

// Hide nav links when they are a child of a ring component
navItems.forEach((item) => {
const targetId = item.querySelector("a").getAttribute("href").slice(1);
const targetElement = document.getElementById(targetId);

if (targetElement && targetElement.closest(".dg-ring")) {
const newItem = item;
newItem.style.display = "none";
}
});
});
3 changes: 2 additions & 1 deletion themes/digital.gov/src/scss/new/shortcodes/_ring.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
position: relative;

&__title {
$font-size: units(3);
$font-size: units(4);

background: color("white");
font-size: $font-size;
Expand All @@ -23,6 +23,7 @@

h2 {
@include u-font("sans", "lg");
font-size: size("sans", 11);
font-weight: font-weight("semibold");
}
}

0 comments on commit 20493c5

Please sign in to comment.