diff --git a/packages/components/organisms/f-header/CHANGELOG.md b/packages/components/organisms/f-header/CHANGELOG.md
index efe7cd818d..0bf9d1fd03 100644
--- a/packages/components/organisms/f-header/CHANGELOG.md
+++ b/packages/components/organisms/f-header/CHANGELOG.md
@@ -4,6 +4,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
+v9.13.0
+------------------------------
+*April 12, 2022*
+
+### Changed
+- added font size and color to nav buttons
+- refactored `UserNavigationPanel` to take in `NavLink` component
+
+
v9.12.0
------------------------------
*April 11, 2022*
diff --git a/packages/components/organisms/f-header/package.json b/packages/components/organisms/f-header/package.json
index eda31ecf9b..bc3eb9505b 100644
--- a/packages/components/organisms/f-header/package.json
+++ b/packages/components/organisms/f-header/package.json
@@ -1,7 +1,7 @@
{
"name": "@justeat/f-header",
"description": "Fozzie Header - Globalised Header Component",
- "version": "9.12.0",
+ "version": "9.13.0",
"main": "dist/f-header.umd.min.js",
"maxBundleSize": "40kB",
"files": [
diff --git a/packages/components/organisms/f-header/src/assets/scss/navigation.scss b/packages/components/organisms/f-header/src/assets/scss/navigation.scss
index ecc37bf19d..ce33b068f9 100644
--- a/packages/components/organisms/f-header/src/assets/scss/navigation.scss
+++ b/packages/components/organisms/f-header/src/assets/scss/navigation.scss
@@ -166,6 +166,10 @@ $nav-link-focus-color : $color-focus;
text-decoration: underline;
}
}
+
+ @include media('<=mid') {
+ color: $nav-text-color;
+ }
}
.has-sublist {
@@ -178,7 +182,7 @@ $nav-link-focus-color : $color-focus;
.c-nav-popover {
@include media('>mid') {
- min-width: 300px;
+ min-width: $nav-popover-width;
position: absolute;
top: 100%;
right: 99999px; // offscreen, so can’t ever be hovered over by default
diff --git a/packages/components/organisms/f-header/src/components/CountrySelector.vue b/packages/components/organisms/f-header/src/components/CountrySelector.vue
index 81c9f0a7c1..f909dcb314 100644
--- a/packages/components/organisms/f-header/src/components/CountrySelector.vue
+++ b/packages/components/organisms/f-header/src/components/CountrySelector.vue
@@ -107,15 +107,17 @@ export default {
@import '../assets/scss/navigation.scss';
.c-countrySelector-text {
+ color: $nav-text-color;
+ @include font-size($nav-text-size);
@include media('>mid') {
display: none;
}
}
.c-countrySelector-btn {
+ text-decoration: none;
background: transparent;
border: 0;
- font-size: 1rem;
display: block;
padding: spacing(c) spacing(c);
margin-top: spacing(d);
diff --git a/packages/components/organisms/f-header/src/components/CountrySelectorPanel.vue b/packages/components/organisms/f-header/src/components/CountrySelectorPanel.vue
index 31ad578eee..43e669248d 100644
--- a/packages/components/organisms/f-header/src/components/CountrySelectorPanel.vue
+++ b/packages/components/organisms/f-header/src/components/CountrySelectorPanel.vue
@@ -47,7 +47,7 @@
:tabindex="isOpen ? 0 : -1"
:text="country.localisedName"
:has-border-bottom="false"
- :is-country-link="true"
+ :is-popover-link="true"
:href="country.siteUrl"
:lang="country.lang">
diff --git a/packages/components/organisms/f-header/src/components/NavLink.vue b/packages/components/organisms/f-header/src/components/NavLink.vue
index 55a7f1b79e..416256456a 100644
--- a/packages/components/organisms/f-header/src/components/NavLink.vue
+++ b/packages/components/organisms/f-header/src/components/NavLink.vue
@@ -4,8 +4,8 @@
:data-trak="JSON.stringify(dataTrak)"
:href="href"
:class="[{
- [$style['c-navLink']]: !isCountryLink,
- [$style['c-navLink--countryLink']]: isCountryLink,
+ [$style['c-navLink']]: !isPopoverLink,
+ [$style['c-navLink--popoverLink']]: isPopoverLink,
[$style['c-nav-list-link--alt']]: isAltColour,
[$style['c-navLink--hoverWithWhiteBackground']]: backgroundTheme === 'white',
[$style['c-nav-list-link--transparent']]: backgroundTheme === 'transparent'
@@ -13,7 +13,7 @@
@@ -678,10 +676,9 @@ export default {
.c-nav-list-btn {
background: transparent;
+ text-decoration: none;
border: 0;
- font-size: 1rem;
padding: spacing(c) spacing(c);
- color: $nav-text-color;
display: flex;
&:focus {
@@ -698,8 +695,10 @@ export default {
width: 100%;
text-align: left;
display: block;
+ padding: spacing(c) 0;
&:focus {
+ outline-color: $nav-link-focus-color;
border-radius: 0;
}
@@ -711,8 +710,11 @@ export default {
}
.c-nav-list-btn-text {
+ @include font-size($nav-text-size);
+ color: $nav-text-color;
+ font-weight: $font-weight-regular;
@include media('>mid') {
- margin-top: 2px;
+ font-weight: $nav-text-weight;
}
}
@@ -728,6 +730,9 @@ export default {
.c-nav-list-text-sub {
display: block;
overflow: hidden;
+ @include font-size($nav-text-size);
+ margin-left: spacing(h);
+ color: $nav-text-color;
&.u-showBelowMid {
@include media('>mid') {
display: none !important;
@@ -763,21 +768,12 @@ export default {
}
}
-.c-nav-list-text {
- font-weight: $nav-text-weight;
- @include media('<=mid') {
- padding: spacing(c) spacing(a);
- font-weight: $font-weight-regular;
- }
-}
-
// Icons, such as the profile icon
.c-nav-icon {
width: $nav-icon-size;
height: $nav-icon-size;
- margin-right: spacing(a);
-
@include media('>mid') {
+ margin-right: spacing(a);
& path {
fill: $nav-icon-color;
}
@@ -785,25 +781,14 @@ export default {
@include media('<=mid') {
float: left;
- margin-right: spacing();
+ margin: spacing(c) spacing(d);
}
}
+.c-nav-icon--profile,
.c-nav-icon--delivery,
.c-nav-icon--offers {
@include media('<=mid') {
- margin-left: spacing(d);
- margin-top: spacing(c);
- & path {
- fill: $nav-icon-color--mobileWhiteBg;
- }
- }
-}
-
-.c-nav-icon--profile {
- @include media('<=mid') {
- margin-left: spacing(c);
- margin-right: spacing(d);
& path {
fill: $nav-icon-color--mobileWhiteBg;
}
diff --git a/packages/components/organisms/f-header/src/components/UserNavigationPanel.vue b/packages/components/organisms/f-header/src/components/UserNavigationPanel.vue
index fbd2de5684..17ff6da542 100644
--- a/packages/components/organisms/f-header/src/components/UserNavigationPanel.vue
+++ b/packages/components/organisms/f-header/src/components/UserNavigationPanel.vue
@@ -6,22 +6,22 @@
-
+
- {{ link.text }}
-
+ @focus="$emit('activateNav')" />
{{ copy.accountLogout.text }}
@@ -47,7 +47,12 @@