Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions assets/icons/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions assets/images/logo-text.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions src/components/header/header.component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json

name: Header
group: Components
status: stable
props:
type: object
properties:
header__show_search:
type: boolean
title: Show Search
description: Control visibility of the search form in the header.
data: true
slots:
header__branding:
title: Branding
description: Branding content (logo, site name, etc).
header__menu:
title: Menu
description: Navigation menu content.
header__search:
title: Search
description: Search form content.
66 changes: 66 additions & 0 deletions src/components/header/header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
@use '../../foundation/utility/rem-calc' as *;
@use '../../foundation/breakpoints/breakpoints' as *;

.header {
display: flex;
width: 100%;
min-height: 5rem;
padding-inline: var(--spacing-xl) var(--spacing-lg);
justify-content: space-between;
align-items: center;
position: relative;
box-shadow: 0 4px 4px 0 rgba(197, 197, 197, 0.25);

@include breakpoint('medium') {
justify-content: flex-start;
align-items: stretch;
padding-inline: 0;
}
}

/* Branding */
.header__branding {
display: flex;
align-items: center;

.logo {
width: auto;
height: 2.5rem;

@include breakpoint('medium') {
margin-left: var(--spacing-xl);
height: 3.5rem;
}
}

.logo__link {
height: 100%;
display: flex;
}
}

/* Main navigation */
.header__menu {
@include breakpoint('medium') {
flex: 1;
display: flex;
justify-content: end;
margin-right: var(--spacing-xl);
}
}

.main-nav__menu-list-wrapper--level-0 {
.header & {
top: 100%;
padding-right: var(--spacing-lg);
}
}

/* Search form */
.header__search {
display: none;

@include breakpoint('medium') {
display: block;
}
}
Loading
Loading