Skip to content

Commit a29ea0a

Browse files
committed
Header: Mainframe header redesign
Restyle coveo search box Restyle F5 Sites button Move search box to left side Move sidebar toggle to main header Move product selector to sidebar
1 parent 5fd74b7 commit a29ea0a

File tree

5 files changed

+224
-159
lines changed

5 files changed

+224
-159
lines changed

assets/css/v2/style.css

Lines changed: 133 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ textarea:not([rows]) {
135135
--atomic-primary: oklch(var(--color-brand)) !important; /* Adjust the primary color */
136136
--atomic-ring-primary: oklch(var(--color-brand) / 0.4) !important; /* Adjust the focus color */
137137
--atomic-primary-light: oklch(var(--color-brand)) !important;
138+
--atomic-background: oklch(0.9911 0 0) !important;
139+
--atomic-font-normal: 500 !important;
138140

139141
/* Remove round corners */
140142
--atomic-border-radius-lg: 0 !important;
@@ -169,6 +171,7 @@ textarea:not([rows]) {
169171
--color-footer-text: 0 0 0 / 65%;
170172
--color-product-title: 0.64 0 0;
171173
--color-tabs-inactive-border: 0 0 0 / 20%;
174+
--color-brand-bay-blue: 0.5307 0.128959 243.2508;
172175

173176
/* Typography */
174177
--margin-content-h1: 2.5rem 0 0 0;
@@ -434,10 +437,6 @@ ol li:last-child {
434437
padding: 0 var(--space-l) 2rem;
435438
}
436439

437-
.header__logo {
438-
display: none;
439-
}
440-
441440
.header__logo-small {
442441
display: none;
443442
}
@@ -481,52 +480,48 @@ ol li:last-child {
481480
display: flex;
482481
padding: 0 var(--space-s);
483482
border-bottom: 1px solid oklch(var(--color-divider));
484-
485-
background: rgba(255, 255, 255, 0.5);
486-
backdrop-filter: blur(20px);
487-
-webkit-backdrop-filter: blur(20px);
483+
background: oklch(var(--color-background));
488484
position: sticky;
489485
top: 0;
490486
z-index: 2;
491487

492488
.header-container {
493489
display: flex;
494490
flex-direction: row;
495-
justify-content: space-around;
491+
justify-content: space-between;
496492
flex-wrap: wrap;
497493
column-gap: 2rem;
498494
align-items: center;
499495
width: 100%;
496+
height: 64px;
500497

501498
.header__img {
502-
height: 2rem;
499+
height: 2.5rem;
503500
}
504501

505502
.header__search {
506503
display: block;
507504
width: auto;
508505
}
509506

510-
.header__product-selector {
511-
width: 10rem;
512-
background: rgba(0, 0, 0, 0);
513-
color: oklch(var(--color-foreground));
514-
text-decoration-color: oklch(var(--color-brand) / 0.3);
515-
& button:hover * {
516-
color: oklch(var(--color-brand));
517-
}
507+
.header__control {
508+
display: flex;
509+
align-items: center;
510+
gap: 1rem;
511+
/* Stop the centre nginx icon position flickering with coveo */
512+
width: 336px;
518513

519-
.product-selector__button {
520-
display: flex;
521-
align-items: center;
522-
background: rgba(0, 0, 0, 0);
523-
border: none;
524-
width: 16rem;
525-
font-weight: 500;
526-
cursor: pointer;
514+
.header__control--sidebar {
527515
color: oklch(var(--color-foreground));
528-
text-decoration-color: oklch(var(--color-brand) / 0.3);
529-
transition: color 0.15s ease-in-out;
516+
517+
.header__control--sidebar--open {
518+
display: none;
519+
}
520+
521+
.header__control--sidebar--close {
522+
display: unset;
523+
cursor: pointer;
524+
}
530525
}
531526
}
532527

@@ -538,11 +533,27 @@ ol li:last-child {
538533
}
539534

540535
.dropdown-button {
541-
padding: 0.5rem 0.5rem;
542-
border: none;
536+
display: flex;
537+
align-items: center;
538+
border-radius: 4px;
539+
border-top: 1px solid oklch(var(--color-brand-bay-blue));
540+
border-right: 1px solid oklch(var(--color-brand-bay-blue));
541+
border-bottom: 2px solid oklch(var(--color-brand-bay-blue));
542+
border-left: 1px solid oklch(var(--color-brand-bay-blue));
543+
height: 1.5rem;
543544
text-align: center;
544545
text-decoration: none;
545546
cursor: pointer;
547+
background-color: oklch(var(--color-background));
548+
font-size: var(--font-step--1);
549+
color: oklch(var(--color-brand-bay-blue));
550+
font-weight: 500;
551+
552+
.header__f5sites--icon > .lucide {
553+
height: 1rem;
554+
width: 1rem;
555+
margin-top: 4px;
556+
}
546557
}
547558

548559
.dropdown-content {
@@ -611,8 +622,12 @@ ol li:last-child {
611622
}
612623

613624
.header {
614-
.header__logo-small {
625+
.header__control--sidebar--close {
626+
display: none;
627+
}
628+
.header__control--sidebar--open {
615629
display: unset;
630+
cursor: pointer;
616631
}
617632
}
618633
}
@@ -658,7 +673,7 @@ ol li:last-child {
658673
.sidebar__header {
659674
display: flex;
660675
align-items: center;
661-
justify-content: space-between;
676+
justify-content: flex-start;
662677
position: sticky;
663678
top: 0;
664679
background: oklch(var(--color-background));
@@ -667,6 +682,30 @@ ol li:last-child {
667682

668683
.sidebar__img {
669684
height: 2rem;
685+
width: 2rem;
686+
}
687+
688+
.header__product-selector {
689+
width: 10rem;
690+
background: rgba(0, 0, 0, 0);
691+
color: oklch(var(--color-foreground));
692+
text-decoration-color: oklch(var(--color-brand) / 0.3);
693+
& button:hover * {
694+
color: oklch(var(--color-brand));
695+
}
696+
697+
.product-selector__button {
698+
display: flex;
699+
align-items: center;
700+
background: rgba(0, 0, 0, 0);
701+
border: none;
702+
width: 16rem;
703+
font-weight: 500;
704+
cursor: pointer;
705+
color: oklch(var(--color-foreground));
706+
text-decoration-color: oklch(var(--color-brand) / 0.3);
707+
transition: color 0.15s ease-in-out;
708+
}
670709
}
671710
}
672711

@@ -690,6 +729,16 @@ ol li:last-child {
690729
/* This is our "mobile" or no sidebar breakpoint */
691730
@media (max-width: 68rem) {
692731
#sidebar-panel:checked ~ .grid-container {
732+
.header {
733+
.header-container {
734+
justify-content: flex-end;
735+
736+
> :not(:first-child) {
737+
display: none;
738+
}
739+
}
740+
}
741+
693742
.sidebar {
694743
/* Above search */
695744
z-index: 11;
@@ -716,6 +765,14 @@ ol li:last-child {
716765
}
717766

718767
.header {
768+
.header__product-selector {
769+
display: none;
770+
}
771+
772+
.header-container div.header__control {
773+
width: fit-content;
774+
}
775+
719776
.header__logo-small {
720777
display: unset;
721778
img {
@@ -729,18 +786,6 @@ ol li:last-child {
729786
}
730787
}
731788

732-
.grid-container {
733-
&:has(.homepage) {
734-
.header-container .header__search {
735-
display: block;
736-
}
737-
}
738-
}
739-
740-
.header__product-selector {
741-
display: none;
742-
}
743-
744789
.header__sidebar__panel {
745790
display: flex;
746791
align-items: center;
@@ -1003,7 +1048,7 @@ main {
10031048

10041049
@media (min-width: 88em) {
10051050
.header__logo {
1006-
display: unset;
1051+
height: 2.5rem;
10071052
}
10081053

10091054
.navbar atomic-search-interface {
@@ -1132,6 +1177,48 @@ atomic-search-interface#search-v2 {
11321177
}
11331178

11341179
/* Search bar on header */
1180+
atomic-search-box {
1181+
height: 2.25rem;
1182+
width: 18.5rem;
1183+
display: flex;
1184+
align-items: center;
1185+
}
1186+
1187+
atomic-search-box::part(input) {
1188+
height: 2.25rem;
1189+
font-size: var(--font-step--1);
1190+
padding: 0.5rem 1rem;
1191+
box-sizing: border-box;
1192+
}
1193+
1194+
atomic-search-box::part(textarea-expander) {
1195+
white-space: nowrap;
1196+
overflow-x: auto;
1197+
overflow-y: hidden;
1198+
resize: none;
1199+
}
1200+
1201+
atomic-search-box::part(textarea) {
1202+
padding-left: 0;
1203+
padding-right: 0;
1204+
}
1205+
1206+
atomic-search-box::part(wrapper) {
1207+
height: 100%;
1208+
display: flex;
1209+
flex-direction: row-reverse;
1210+
align-items: center;
1211+
}
1212+
1213+
atomic-search-box::part(submit-button) {
1214+
order: -1;
1215+
padding-right: 0;
1216+
}
1217+
1218+
atomic-search-box::part(submit-button-wrapper) {
1219+
margin: 0;
1220+
}
1221+
11351222
atomic-search-interface#search-standalone-header {
11361223
height: fit-content;
11371224

@@ -1186,7 +1273,6 @@ body:not(:has(.main-layout)) header atomic-search-interface {
11861273
.product-selector {
11871274
/* should appear above search box on smaller displays */
11881275
z-index: 11;
1189-
display: none;
11901276
position: absolute;
11911277
top: 0;
11921278
margin-block-start: calc(var(--header-height) - 1rem);
@@ -1457,6 +1543,7 @@ p {
14571543

14581544
.breadcrumb li:after {
14591545
padding: 0 0.25rem;
1546+
/* biome-ignore lint: :shrug-emoji */
14601547
content: "\E1D7";
14611548
}
14621549

assets/js/product-selector.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ document.addEventListener('DOMContentLoaded', () => {
99
productSelectorButton.addEventListener('click', () => {
1010
const isVisible = productSelectorContent.style.display === 'block';
1111
productSelectorContent.style.display = isVisible ? 'none' : 'block';
12-
productSelectorButton.classList.toggle('remove-bottom-radius', !isVisible);
1312
});
1413

1514
window.addEventListener('click', (event) => {
@@ -18,7 +17,6 @@ document.addEventListener('DOMContentLoaded', () => {
1817
productSelectorContent.contains(event.target);
1918
if (!isClickInside) {
2019
productSelectorContent.style.display = 'none';
21-
productSelectorButton.classList.remove('remove-bottom-radius');
2220
}
2321
});
2422
});

assets/js/site-dropdown.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,18 @@
11
document.addEventListener('DOMContentLoaded', () => {
22
const dropdownContent = document.getElementById('dropdown-content');
33
const navbarButton = document.getElementById('navbar-sites-button');
4-
const chevronIcon = document.getElementById('navbar-sites-button-icon');
54

65
navbarButton.addEventListener('click', () => {
7-
chevronIcon.classList.toggle('rotate-chevron');
8-
96
if (dropdownContent.style.display === 'block') {
107
dropdownContent.style.display = 'none';
11-
navbarButton.classList.remove('remove-bottom-radius');
128
} else {
139
dropdownContent.style.display = 'block';
14-
navbarButton.classList.add('remove-bottom-radius');
1510
}
1611
});
1712

1813
window.addEventListener('click', (event) => {
19-
if (
20-
!event.target.matches('#navbar-sites-button') &&
21-
!event.target.matches('#navbar-sites-button-icon')
22-
) {
23-
if (
24-
dropdownContent.style.display !== 'none' &&
25-
dropdownContent.style.display !== ''
26-
) {
27-
chevronIcon.classList.toggle('rotate-chevron');
28-
}
14+
if (!event.target.closest('#navbar-sites-button')) {
2915
dropdownContent.style.display = 'none';
30-
navbarButton.classList.remove('remove-bottom-radius');
3116
}
3217
});
3318
});

0 commit comments

Comments
 (0)