Skip to content
Snippets Groups Projects
Commit e641aaf2 authored by Tuukka Turu's avatar Tuukka Turu
Browse files

Merge branch 'NXSTAGE-1493-header' of...

Merge branch 'NXSTAGE-1493-header' of version.helsinki.fi:julkiset-sivut/design-system-lib into NXSTAGE-1493-header
parents 5b0c2054 770f7795
No related branches found
No related tags found
No related merge requests found
...@@ -633,6 +633,7 @@ export namespace Components { ...@@ -633,6 +633,7 @@ export namespace Components {
isMobile: boolean; isMobile: boolean;
logoLabel?: string; logoLabel?: string;
logoUrl?: string; logoUrl?: string;
menuLabel: string;
siteLabel?: string; siteLabel?: string;
siteUrl?: string; siteUrl?: string;
} }
...@@ -2019,6 +2020,7 @@ declare namespace LocalJSX { ...@@ -2019,6 +2020,7 @@ declare namespace LocalJSX {
isMobile?: boolean; isMobile?: boolean;
logoLabel?: string; logoLabel?: string;
logoUrl?: string; logoUrl?: string;
menuLabel?: string;
onMobileMenuTopToggle?: (event: CustomEvent<any>) => void; onMobileMenuTopToggle?: (event: CustomEvent<any>) => void;
onUniversityMainMenuToggled?: (event: CustomEvent<any>) => void; onUniversityMainMenuToggled?: (event: CustomEvent<any>) => void;
siteLabel?: string; siteLabel?: string;
......
...@@ -23,6 +23,7 @@ let keys = { ...@@ -23,6 +23,7 @@ let keys = {
}) })
export class HyMenuMainGroup { export class HyMenuMainGroup {
@Element() el: HTMLElement; @Element() el: HTMLElement;
@Prop() menuLabel: string = 'University main menu';
@Prop() dataMainMenu: MainMenu[] | string; @Prop() dataMainMenu: MainMenu[] | string;
@Prop() isMobile: boolean = false; @Prop() isMobile: boolean = false;
@Prop() logoUrl?: string; @Prop() logoUrl?: string;
...@@ -218,7 +219,7 @@ export class HyMenuMainGroup { ...@@ -218,7 +219,7 @@ export class HyMenuMainGroup {
) : ( ) : (
<hy-icon class={'toggle__caret'} icon={'hy-icon-slim-hamburger-menu'} size={8} fill={white} /> <hy-icon class={'toggle__caret'} icon={'hy-icon-slim-hamburger-menu'} size={8} fill={white} />
)} )}
<span>University main menu</span> <span>{this.menuLabel}</span>
</button> </button>
<div <div
class={{ class={{
......
...@@ -4,15 +4,16 @@ ...@@ -4,15 +4,16 @@
## Properties ## Properties
| Property | Attribute | Description | Type | Default | | Property | Attribute | Description | Type | Default |
| -------------- | ---------------- | ----------- | ---------------------- | ----------- | | -------------- | ---------------- | ----------- | ---------------------- | ------------------------ |
| `dataMainMenu` | `data-main-menu` | | `MainMenu[] \| string` | `undefined` | | `dataMainMenu` | `data-main-menu` | | `MainMenu[] \| string` | `undefined` |
| `donate` | -- | | `DonateLink[]` | `undefined` | | `donate` | -- | | `DonateLink[]` | `undefined` |
| `isMobile` | `is-mobile` | | `boolean` | `false` | | `isMobile` | `is-mobile` | | `boolean` | `false` |
| `logoLabel` | `logo-label` | | `string` | `undefined` | | `logoLabel` | `logo-label` | | `string` | `undefined` |
| `logoUrl` | `logo-url` | | `string` | `undefined` | | `logoUrl` | `logo-url` | | `string` | `undefined` |
| `siteLabel` | `site-label` | | `string` | `undefined` | | `menuLabel` | `menu-label` | | `string` | `'University main menu'` |
| `siteUrl` | `site-url` | | `string` | `undefined` | | `siteLabel` | `site-label` | | `string` | `undefined` |
| `siteUrl` | `site-url` | | `string` | `undefined` |
## Events ## Events
......
...@@ -59,6 +59,7 @@ export class SiteHeader { ...@@ -59,6 +59,7 @@ export class SiteHeader {
private donateLink: DonateLink[]; private donateLink: DonateLink[];
private menuLabels: ComponentLabels[]; private menuLabels: ComponentLabels[];
private searchLabels: ComponentLabels[]; private searchLabels: ComponentLabels[];
private groupPages: ComponentLabels[];
private languageLabels: ComponentLabels[]; private languageLabels: ComponentLabels[];
@State() lastScrollTop = 0; @State() lastScrollTop = 0;
...@@ -109,6 +110,7 @@ export class SiteHeader { ...@@ -109,6 +110,7 @@ export class SiteHeader {
this.menuLabels = labels.menu_labels; this.menuLabels = labels.menu_labels;
this.languageLabels = labels.language_labels; this.languageLabels = labels.language_labels;
this.searchLabels = labels.search_labels; this.searchLabels = labels.search_labels;
this.groupPages = labels.group_pages;
this.el.children[0].setAttribute('menu-button-breadcrumb-home', this.menuLabels['home']); this.el.children[0].setAttribute('menu-button-breadcrumb-home', this.menuLabels['home']);
this.el.children[0].setAttribute('menu-button-breadcrumb-main', this.menuLabels['main']); this.el.children[0].setAttribute('menu-button-breadcrumb-main', this.menuLabels['main']);
...@@ -246,7 +248,12 @@ export class SiteHeader { ...@@ -246,7 +248,12 @@ export class SiteHeader {
url={this.siteUrl} url={this.siteUrl}
label={this.siteLabel} label={this.siteLabel}
/> />
<hy-menu-main-group tabindex="0" is-mobile={false} data-main-menu={this.dataMainMenuLinks} /> <hy-menu-main-group
tabindex="0"
is-mobile={false}
menu-label={this.groupPages['university_main_menu'] ?? null}
data-main-menu={this.dataMainMenuLinks}
/>
</div> </div>
<div class={'menu--secondary menu--secondary--group'}> <div class={'menu--secondary menu--secondary--group'}>
...@@ -336,7 +343,11 @@ export class SiteHeader { ...@@ -336,7 +343,11 @@ export class SiteHeader {
url={this.siteUrl} url={this.siteUrl}
label={this.siteLabel} label={this.siteLabel}
/> />
<hy-menu-main-group is-mobile={false} data-main-menu={this.dataMainMenuLinks} /> <hy-menu-main-group
is-mobile={false}
menu-label={this.groupPages['university_main_menu'] ?? ''}
data-main-menu={this.dataMainMenuLinks}
/>
</div> </div>
<div class={'menu--secondary menu--secondary--group'}> <div class={'menu--secondary menu--secondary--group'}>
......
...@@ -143,16 +143,17 @@ ...@@ -143,16 +143,17 @@
.hy-site-header__logo-container { .hy-site-header__logo-container {
a.group { a.group {
@include font-size(14px, 16px); @include font-size(14px, 16px);
@include font-weight($semibold); @include font-weight($bold);
color: var(--grayscale-black); color: var(--grayscale-black);
font-family: var(--main-font-family); font-family: var(--main-font-family);
letter-spacing: -0.8px; letter-spacing: -0.5px;
text-decoration: none; text-decoration: none;
text-transform: uppercase; text-transform: uppercase;
@include breakpoint($narrow) { @include breakpoint($narrow) {
@include font-size(24px, 28px); @include font-size(24px, 28px);
letter-spacing: -0.8px;
} }
@include breakpoint($xlarge) { @include breakpoint($xlarge) {
......
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