feat(SW-186): implement cms data into new header

This commit is contained in:
Erik Tiekstra
2024-09-03 15:41:49 +02:00
parent bf7d22c728
commit 52fdc1daac
25 changed files with 123 additions and 154 deletions
+8 -6
View File
@@ -8,17 +8,19 @@ import styles from "./topMenu.module.css"
import type { TopMenuProps } from "@/types/components/header/topMenu"
export default async function TopMenu({ languageUrls }: TopMenuProps) {
export default async function TopMenu({ languageUrls, topLink }: TopMenuProps) {
const intl = await getIntl()
return (
<div className={styles.topMenu}>
<div className={styles.content}>
<HeaderLink href="#">
<GiftIcon width={20} height={20} color="burgundy" />
{intl.formatMessage({ id: "Join Scandic Friends" })}
</HeaderLink>
<div className={styles.right}>
{topLink ? (
<HeaderLink className={styles.topLink} href={topLink.href}>
<GiftIcon width={20} height={20} color="burgundy" />
{topLink.title}
</HeaderLink>
) : null}
<div className={styles.options}>
<LanguageSwitcher type="desktopHeader" urls={languageUrls} />
<HeaderLink href="#">
<SearchIcon width={20} height={20} color="burgundy" />
+13 -2
View File
@@ -8,12 +8,12 @@
.content {
max-width: var(--max-width-navigation);
margin: 0 auto;
display: flex;
display: grid;
justify-content: space-between;
gap: var(--Spacing-x3);
}
.right {
.options {
display: flex;
gap: var(--Spacing-x2);
align-items: center;
@@ -23,4 +23,15 @@
.topMenu {
display: block;
}
.content {
grid-template-areas: "topLink options";
}
.topLink {
grid-area: topLink;
}
.options {
grid-area: options;
}
}