Skip to content
Snippets Groups Projects
Commit 8d46a43e authored by druid's avatar druid
Browse files

Merge branch 'development' into NXSTAGE-1338-top-nav

parents a0686053 9f85b016
No related branches found
No related tags found
No related merge requests found
...@@ -274,9 +274,8 @@ ...@@ -274,9 +274,8 @@
} }
} }
// menu item links // Second level menu item links
&__second-level-menu { &__second-level-menu {
//background-color: var(--grayscale-background-box);
background-color: var(--grayscale-white); background-color: var(--grayscale-white);
list-style: none; list-style: none;
margin: 0; margin: 0;
...@@ -316,12 +315,18 @@ ...@@ -316,12 +315,18 @@
&:hover, &:hover,
&:focus { &:focus {
color: var(--link-blue); color: var(--link-blue);
span.external-icon {
svg {
fill: var(--link-blue);
}
}
} }
.label { .label {
@include breakpoint($extrawide) { @include breakpoint($extrawide) {
border: none; border: none;
margin-left: 12px; margin: 0 5px 0 12px;
padding-top: 12px; padding-top: 12px;
padding-bottom: 12px; padding-bottom: 12px;
} }
...@@ -335,6 +340,18 @@ ...@@ -335,6 +340,18 @@
} }
} }
} }
span.external-icon {
svg {
fill: var(--brand-main-nearly-black);
transform: rotate(-45deg);
&:hover,
&:focus {
fill: var(--link-blue);
}
}
}
} }
} }
} }
......
...@@ -11,6 +11,7 @@ export interface DesktopLinks { ...@@ -11,6 +11,7 @@ export interface DesktopLinks {
url: string; url: string;
description: string; description: string;
menuLinkId: string; menuLinkId: string;
isExternal: string;
isActive: string; isActive: string;
shortcutsTitle: string; shortcutsTitle: string;
closeButtonTitle: string; closeButtonTitle: string;
...@@ -331,6 +332,7 @@ export class HyDesktopMenuLinks { ...@@ -331,6 +332,7 @@ export class HyDesktopMenuLinks {
description, description,
label, label,
labelExtra, labelExtra,
isExternal,
isActive, isActive,
shortcutsTitle, shortcutsTitle,
closeButtonTitle, closeButtonTitle,
...@@ -343,6 +345,7 @@ export class HyDesktopMenuLinks { ...@@ -343,6 +345,7 @@ export class HyDesktopMenuLinks {
'desktop-menu-link__label', 'desktop-menu-link__label',
isActive === 'true' ? 'desktop-menu-link__label--is-active-trail' : '', isActive === 'true' ? 'desktop-menu-link__label--is-active-trail' : '',
].join(' '); ].join(' ');
let target = isExternal ? '_blank' : '_self';
menuLinkItems.push( menuLinkItems.push(
<li> <li>
...@@ -365,6 +368,7 @@ export class HyDesktopMenuLinks { ...@@ -365,6 +368,7 @@ export class HyDesktopMenuLinks {
<a <a
aria-current={label} aria-current={label}
href={url} href={url}
target={target}
class="hy-desktop-menu-panel__desktop-menu__first-level-menu-item" class="hy-desktop-menu-panel__desktop-menu__first-level-menu-item"
menu-link-id={id} menu-link-id={id}
> >
...@@ -375,16 +379,24 @@ export class HyDesktopMenuLinks { ...@@ -375,16 +379,24 @@ export class HyDesktopMenuLinks {
{description && <span class="description">{description}</span>} {description && <span class="description">{description}</span>}
</a> </a>
<ul class={'hy-desktop-menu-panel__desktop-menu__second-level-menu'} menu-link-id={id}> <ul class={'hy-desktop-menu-panel__desktop-menu__second-level-menu'} menu-link-id={id}>
{items.map(({label, url}) => ( {items.map(({label, url, isExternal}) => {
<li> let subitemTarget = isExternal ? '_blank' : '_self';
<a href={url}> return (
<span class="heading-icon"> <li>
<hy-icon icon={'hy-icon-caret-right'} size={12} /> <a href={url} target={subitemTarget}>
</span> <span class="heading-icon">
<span class="label">{label}</span> <hy-icon icon={'hy-icon-caret-right'} size={12} />
</a> </span>
</li> <span class="label">{label}</span>
))} {isExternal && (
<span class="external-icon">
<hy-icon icon={'hy-icon-arrow-right'} size={12} />
</span>
)}
</a>
</li>
);
})}
</ul> </ul>
</div> </div>
{shortcuts.length > 0 && ( {shortcuts.length > 0 && (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment