Skip to content

Commit b449def

Browse files
authored
Merge pull request #3500 from ArmDeveloperEcosystem/header-footer-nav-update
Header footer nav update
2 parents 820638d + 4c666f8 commit b449def

6 files changed

Lines changed: 40 additions & 25 deletions

File tree

assets/css/cross-page.css

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,7 @@ table tbody td {
175175
/* CLS fix: reserve space for nav before hydration */
176176
arm-top-navigation:not(:defined) {
177177
display: block;
178-
min-height: 80px;
179-
}
180-
@media (max-width: 1024px) {
181-
arm-top-navigation:not(:defined) {
182-
min-height: 60px;
183-
}
178+
min-height: 60px;
184179
}
185180

186181
/* Fix global nav height */
@@ -189,23 +184,15 @@ arm-top-navigation:not(:defined) {
189184
/*************************************/
190185
#global-nav-height-fixer {
191186
max-width: 100vw;
192-
height: 80px;
187+
height: 60px;
193188
overflow: hidden;
194189
position: relative;
195190
top: 0;
196191
}
197-
@media (max-width: 1024px) { /* smaller screens than LG */
198-
#global-nav-height-fixer {
199-
height: 60px;
200-
}
201-
}
202-
.nav-transparent {
203-
background: transparent;
204-
background-color: transparent;
205-
}
192+
.nav-transparent,
206193
.nav-black {
207-
background: #010101;
208-
background-color: #010101;
194+
background: var(--ads-ui-ink-100);
195+
background-color: var(--ads-ui-ink-100);
209196
}
210197

211198
/* Fix Masthead Height */

config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ github_project_repo = "https://github.com/ArmDeveloperEcosystem/arm-learning-pat
7373
# location of assets
7474
assetsDir = "assets"
7575

76+
# Optionally override the global web components bundle for a specific deployment.
77+
# global_web_components_url = "https://www.arm.com/arm-global-web-components/devhub/app.js"
78+
7679
# Specify a value here if your content directory is not in your repo's root directory
7780
# github_subdir = ""
7881

themes/arm-design-system-hugo-theme/layouts/partials/footer/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
*/}}
1010

1111
<div id="arm-footer">
12-
<arm-footer-navigation></arm-footer-navigation>
12+
<arm-footer-navigation lang="en" theme="dark"></arm-footer-navigation>
1313
</div>

themes/arm-design-system-hugo-theme/layouts/partials/head/head.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,17 @@
5555
integrity="sha384-caAG7P/HrHxcdQa2gTEfvZYGPLQk7yRwVdvtRn6sa3TRKzcAyY1LMvObXKGhwFNb"
5656
crossorigin="anonymous">
5757
</script>
58-
<!-- Arm Header & Footer loading -->
59-
<script type="text/javascript" src="https://www.arm.com/arm-global-web-components/devhub/app.js" ></script>
58+
<!-- Arm Header & Footer loading. Local development uses the test bundle;
59+
production defaults to stable app.js unless a deployment explicitly overrides it. -->
60+
{{ $globalWebComponentsURL := .Site.Params.global_web_components_url | default "https://www.arm.com/arm-global-web-components/devhub/app.js" }}
61+
{{ if and hugo.IsServer (not .Site.Params.global_web_components_url) }}
62+
{{ $globalWebComponentsURL = "https://www.arm.com/arm-global-web-components/devhub/test.js" }}
63+
{{ end }}
64+
<script
65+
type="text/javascript"
66+
src="{{ $globalWebComponentsURL }}"
67+
defer>
68+
</script>
6069

6170

6271

themes/arm-design-system-hugo-theme/layouts/partials/header/nav-masthead.html

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,16 @@
77

88
<!-- No masthead on homepage, as that has a special gradient look/feel -->
99
{{ if .IsHome }}
10-
<div id="global-nav-height-fixer" class="nav-black">
11-
<arm-top-navigation observe="#breadcrumb-element"></arm-top-navigation> <!-- to set to all black all the time: observe="head" -->
10+
<div id="global-nav-height-fixer" class="nav-black">
11+
<arm-top-navigation
12+
observe="#breadcrumb-element"
13+
desktopbreakpoint="1200"
14+
theme="dark"
15+
hostname="learn.arm.com"
16+
enable-ui-route="true"
17+
lang="en"
18+
disabled-subnav-animation>
19+
</arm-top-navigation> <!-- to set to all black all the time: observe="head" -->
1220
</div>
1321
<div id="only-breadcrumb-masthead">
1422
<div class="is-responsive-width">
@@ -20,7 +28,15 @@
2028
<div id="nav-masthead-breadcrumbs">
2129
<!-- Global Nav -->
2230
<div id="global-nav-height-fixer" class="nav-transparent">
23-
<arm-top-navigation observe="#breadcrumb-element"></arm-top-navigation>
31+
<arm-top-navigation
32+
observe="#breadcrumb-element"
33+
desktopbreakpoint="1200"
34+
theme="dark"
35+
hostname="learn.arm.com"
36+
enable-ui-route="true"
37+
lang="en"
38+
disabled-subnav-animation>
39+
</arm-top-navigation>
2440
</div>
2541
<!-- Masthead -->
2642
<div id="expanded-masthead" class="u-bg-color-ads-ui-violet-90">

themes/arm-design-system-hugo-theme/static/js/authentication.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ document.addEventListener('arm-account-signin', (event) => {
277277

278278
const signInButton = shadowRoot.querySelector('.c-utility-navigation-login__sign-in-button');
279279
if (signInButton) {
280-
signInButton.innerHTML = "Redirecting to login...";
280+
signInButton.textContent = "Redirecting...";
281281
}
282282
else {
283283
console.log("Sign-in button not found in DOM.");

0 commit comments

Comments
 (0)