Merged in chore/prettier-with-ignore (pull request #33)
Chore/prettier with ignore Approved-by: Michael Zetterberg
This commit is contained in:
6
.prettierignore
Normal file
6
.prettierignore
Normal file
@@ -0,0 +1,6 @@
|
||||
# Directories
|
||||
public/Static
|
||||
|
||||
# Files
|
||||
app/core.css
|
||||
app/scandic.css
|
||||
@@ -1,19 +1,19 @@
|
||||
import "../../core.css";
|
||||
import "../../scandic.css";
|
||||
import "../../core.css"
|
||||
import "../../scandic.css"
|
||||
|
||||
import Footer from "@/components/Current/Footer";
|
||||
import LangPopup from "@/components/Current/LangPopup";
|
||||
import Script from "next/script";
|
||||
import SkipToMainContent from "@/components/SkipToMainContent";
|
||||
import Footer from "@/components/Current/Footer"
|
||||
import LangPopup from "@/components/Current/LangPopup"
|
||||
import Script from "next/script"
|
||||
import SkipToMainContent from "@/components/SkipToMainContent"
|
||||
|
||||
import type { Metadata } from "next";
|
||||
import type { LangParams, LayoutArgs } from "@/types/params";
|
||||
import InitLivePreview from "@/components/Current/LivePreview";
|
||||
import type { Metadata } from "next"
|
||||
import type { LangParams, LayoutArgs } from "@/types/params"
|
||||
import InitLivePreview from "@/components/Current/LivePreview"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
description: "New web",
|
||||
title: "Scandic Hotels New Web",
|
||||
};
|
||||
}
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
.highlightBlock {
|
||||
padding: 10px 10px 15px;
|
||||
background: #fff;
|
||||
|
||||
@@ -43,13 +43,13 @@
|
||||
}
|
||||
|
||||
@media screen and (min-width: 740px) {
|
||||
.content {
|
||||
padding: 20px 0px;
|
||||
}
|
||||
.content {
|
||||
padding: 20px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 950px) {
|
||||
.heading {
|
||||
font-size: 1.375rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,12 @@ import type { RTENext, RTEDefaultNode } from "@/types/rte/node"
|
||||
import type { RenderOptions } from "@/types/rte/option"
|
||||
|
||||
export const renderOptions: RenderOptions = {
|
||||
[RTETypeEnum.p]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.p]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
return (
|
||||
<p key={node.uid} className={styles.p}>
|
||||
{next(node.children, embeds, fullRenderOptions)}
|
||||
|
||||
@@ -8,7 +8,7 @@ export default function Puffs({ puffs }: PuffsProps) {
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{puffs.map(puff => (
|
||||
{puffs.map((puff) => (
|
||||
<Puff key={puff.node.system.uid} {...puff.node} />
|
||||
))}
|
||||
</>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
.wrapper {
|
||||
padding: 20px 10px 5px;
|
||||
}
|
||||
padding: 20px 10px 5px;
|
||||
}
|
||||
|
||||
@@ -1,65 +1,67 @@
|
||||
.title {
|
||||
font-family: BrandonText-Bold,Arial,Helvetica,sans-serif;
|
||||
font-size: 1.375rem;
|
||||
line-height: 1.1em;
|
||||
text-transform: uppercase;
|
||||
font-weight: 400;
|
||||
color: #483729;
|
||||
margin-bottom: 1rem;
|
||||
font-family: BrandonText-Bold, Arial, Helvetica, sans-serif;
|
||||
font-size: 1.375rem;
|
||||
line-height: 1.1em;
|
||||
text-transform: uppercase;
|
||||
font-weight: 400;
|
||||
color: #483729;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.ul {
|
||||
margin-bottom: 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.listItem {
|
||||
margin-bottom: 8px;
|
||||
padding-left: 1.3em;
|
||||
margin-bottom: 8px;
|
||||
padding-left: 1.3em;
|
||||
}
|
||||
|
||||
.checkmark {
|
||||
padding-left: 1.6em;
|
||||
padding-left: 1.6em;
|
||||
}
|
||||
|
||||
.checkmark::before, .disc::before {
|
||||
position:relative;
|
||||
top: 4px;
|
||||
display: inline-block;
|
||||
height: 0px;
|
||||
width: 0px;
|
||||
.checkmark::before,
|
||||
.disc::before {
|
||||
position: relative;
|
||||
top: 4px;
|
||||
display: inline-block;
|
||||
height: 0px;
|
||||
width: 0px;
|
||||
}
|
||||
|
||||
.checkmark::before {
|
||||
content: url('/Static/img/bullet-list-tick-birch-v2.svg');
|
||||
transform: scale(.9);
|
||||
left: -1.2em;
|
||||
content: url("/Static/img/bullet-list-tick-birch-v2.svg");
|
||||
transform: scale(0.9);
|
||||
left: -1.2em;
|
||||
}
|
||||
|
||||
.disc::before {
|
||||
content: "•";
|
||||
color: rgb(157, 160, 161);
|
||||
font-size: 26px;
|
||||
left: -0.7em;
|
||||
content: "•";
|
||||
color: rgb(157, 160, 161);
|
||||
font-size: 26px;
|
||||
left: -0.7em;
|
||||
}
|
||||
|
||||
.link {
|
||||
border-bottom: 1px dotted #00838e;
|
||||
color: #00838e;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
border-bottom: 1px dotted #00838e;
|
||||
color: #00838e;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.link:active, .link:hover {
|
||||
text-decoration: underline;
|
||||
outline: 0;
|
||||
.link:active,
|
||||
.link:hover {
|
||||
text-decoration: underline;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.link:hover {
|
||||
border-bottom: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 950px) {
|
||||
.title {
|
||||
.title {
|
||||
font-size: 1.625rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
export default function Puffs() {
|
||||
return (
|
||||
<>
|
||||
|
||||
</>
|
||||
)
|
||||
return <></>
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import JsonToHtml from "@/components/JsonToHtml";
|
||||
import JsonToHtml from "@/components/JsonToHtml"
|
||||
|
||||
import type { TextProps } from "@/types/components/current/blocks/text"
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
.wrapper {
|
||||
background-color: #fff;
|
||||
padding: 20px 10px 5px;
|
||||
background-color: #fff;
|
||||
padding: 20px 10px 5px;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 740px) {
|
||||
.wrapper {
|
||||
padding:20px 0 0;
|
||||
}
|
||||
.wrapper {
|
||||
padding: 20px 0 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
padding-bottom: 50px;
|
||||
background: #f3f2f1;
|
||||
display: block;
|
||||
}
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
padding-bottom: 50px;
|
||||
background: #f3f2f1;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
/* eslint-disable @next/next/no-img-element */
|
||||
import { currentAboutLinks, currentSponsoringLinks, currentWifiLinks } from "@/constants/current/links"
|
||||
import {
|
||||
currentAboutLinks,
|
||||
currentSponsoringLinks,
|
||||
currentWifiLinks,
|
||||
} from "@/constants/current/links"
|
||||
|
||||
import Desktop from "./LanguageSwitcher/Desktop"
|
||||
import Mobile from "./LanguageSwitcher/Mobile"
|
||||
@@ -40,7 +44,9 @@ export default function DaHeader({ pathname }: HeaderProps) {
|
||||
|
||||
<ul className="nav-secondary navbar-login">
|
||||
<li className="nav-secondary__item hidden-xxsmall hidden-xsmall hidden-small">
|
||||
{links ? <Desktop currentLanguage={currentLanguage} links={links} /> : null}
|
||||
{links ? (
|
||||
<Desktop currentLanguage={currentLanguage} links={links} />
|
||||
) : null}
|
||||
</li>
|
||||
<li className=" hidden-xxsmall hidden-xsmall hidden-small nav-secondary__item">
|
||||
<a
|
||||
@@ -178,7 +184,9 @@ export default function DaHeader({ pathname }: HeaderProps) {
|
||||
</li>
|
||||
|
||||
<li className="nav-primary__item hidden-medium hidden-large">
|
||||
{links ? <Mobile currentLanguage={currentLanguage} links={links} /> : null}
|
||||
{links ? (
|
||||
<Mobile currentLanguage={currentLanguage} links={links} />
|
||||
) : null}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -186,5 +194,5 @@ export default function DaHeader({ pathname }: HeaderProps) {
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import { currentAboutLinks, currentSponsoringLinks, currentWifiLinks } from "@/constants/current/links"
|
||||
import {
|
||||
currentAboutLinks,
|
||||
currentSponsoringLinks,
|
||||
currentWifiLinks,
|
||||
} from "@/constants/current/links"
|
||||
|
||||
import Desktop from "./LanguageSwitcher/Desktop"
|
||||
import Mobile from "./LanguageSwitcher/Mobile"
|
||||
@@ -7,7 +11,8 @@ import type { HeaderProps } from "@/types/components/current/header"
|
||||
import type { LanguageSwitcherLink } from "@/types/components/current/languageSwitcher"
|
||||
|
||||
const paths: Record<string, LanguageSwitcherLink[]> = {
|
||||
"/kundenbetreuung/haufig-gestellte-fragen/nutzung-der-internetseite": currentAboutLinks,
|
||||
"/kundenbetreuung/haufig-gestellte-fragen/nutzung-der-internetseite":
|
||||
currentAboutLinks,
|
||||
"/scandic-entdecken/wlan": currentWifiLinks,
|
||||
"/sponsoring": currentSponsoringLinks,
|
||||
}
|
||||
@@ -21,80 +26,178 @@ export default function DeHeader({ pathname }: HeaderProps) {
|
||||
<header className="header" role="banner">
|
||||
<div className="offline-banner hidden">
|
||||
Sie sind offline. Manche Inhalte könnten nicht aktuell sein.
|
||||
<button type="button" className="reload">Neu laden</button>
|
||||
<button type="button" className="reload">
|
||||
Neu laden
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="l-section main-header navigation-bar" data-js="main-nav-bar">
|
||||
<div
|
||||
className="l-section main-header navigation-bar"
|
||||
data-js="main-nav-bar"
|
||||
>
|
||||
<div className="navigation-bar__top navigation-bar__top--ghostwhite-light">
|
||||
<div className="l-section__inner">
|
||||
<a href="https://www.scandichotels.de" className="scandic-main-page-link">Back to scandichotels.de</a>
|
||||
<a
|
||||
href="https://www.scandichotels.de"
|
||||
className="scandic-main-page-link"
|
||||
>
|
||||
Back to scandichotels.de
|
||||
</a>
|
||||
<ul className="nav-secondary navbar-login">
|
||||
<li className="nav-secondary__item hidden-xxsmall hidden-xsmall hidden-small">
|
||||
{links ? <Desktop currentLanguage={currentLanguage} links={links} /> : null}
|
||||
{links ? (
|
||||
<Desktop currentLanguage={currentLanguage} links={links} />
|
||||
) : null}
|
||||
</li>
|
||||
<li className=" hidden-xxsmall hidden-xsmall hidden-small nav-secondary__item">
|
||||
<a className="nav-secondary__item__link" href="https://www.scandichotels.de/hotelreservation/get-booking">Buchung ansehen/ändern</a>
|
||||
<a
|
||||
className="nav-secondary__item__link"
|
||||
href="https://www.scandichotels.de/hotelreservation/get-booking"
|
||||
>
|
||||
Buchung ansehen/ändern
|
||||
</a>
|
||||
</li>
|
||||
<li className=" hidden-xxsmall hidden-xsmall hidden-small nav-secondary__item">
|
||||
<a className="nav-secondary__item__link" href="https://www.scandichotels.de/karriere-bei-scandic-hotels">Karriere bei Scandic</a>
|
||||
<a
|
||||
className="nav-secondary__item__link"
|
||||
href="https://www.scandichotels.de/karriere-bei-scandic-hotels"
|
||||
>
|
||||
Karriere bei Scandic
|
||||
</a>
|
||||
</li>
|
||||
<li className=" hidden-xxsmall hidden-xsmall hidden-small nav-secondary__item">
|
||||
<a className="nav-secondary__item__link" href="https://www.scandichotels.de/geschaftsreisen">Firmenkunden</a>
|
||||
<a
|
||||
className="nav-secondary__item__link"
|
||||
href="https://www.scandichotels.de/geschaftsreisen"
|
||||
>
|
||||
Firmenkunden
|
||||
</a>
|
||||
</li>
|
||||
<li className=" hidden-xxsmall hidden-xsmall hidden-small nav-secondary__item">
|
||||
<a className="nav-secondary__item__link" href="https://www.scandichotels.de/scandic-friends">Über Scandic Friends</a>
|
||||
<a
|
||||
className="nav-secondary__item__link"
|
||||
href="https://www.scandichotels.de/scandic-friends"
|
||||
>
|
||||
Über Scandic Friends
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="navigation-bar__main">
|
||||
<div className="l-section__inner l-section__inner--small-no-padding" itemScope={undefined} itemType="http://schema.org/Organization">
|
||||
<div
|
||||
className="l-section__inner l-section__inner--small-no-padding"
|
||||
itemScope={undefined}
|
||||
itemType="http://schema.org/Organization"
|
||||
>
|
||||
<meta itemProp="name" content="Scandic" />
|
||||
<button type="button" className="navigation-bar__main__expander" data-js="main-nav-toggler" data-target="#main-menu" aria-pressed="false">
|
||||
<span className="icon-bars"></span><span className="hidden--accessible">Menu</span>
|
||||
<button
|
||||
type="button"
|
||||
className="navigation-bar__main__expander"
|
||||
data-js="main-nav-toggler"
|
||||
data-target="#main-menu"
|
||||
aria-pressed="false"
|
||||
>
|
||||
<span className="icon-bars"></span>
|
||||
<span className="hidden--accessible">Menu</span>
|
||||
</button>
|
||||
<a id="scandic-logo" className="navigation-bar__main__logo hidden-medium " href="https://www.scandichotels.de" itemProp="url">
|
||||
<span className="hidden--accessible">Back to scandichotels.de</span>
|
||||
<img src="/Static/img/scandic-logotype.svg" data-js="scandiclogoimg" alt="Scandic Hotels logo" height="22" data-nosvgsrc="/Static/img/scandic-logotype.png" itemProp="logo" />
|
||||
<a
|
||||
id="scandic-logo"
|
||||
className="navigation-bar__main__logo hidden-medium "
|
||||
href="https://www.scandichotels.de"
|
||||
itemProp="url"
|
||||
>
|
||||
<span className="hidden--accessible">
|
||||
Back to scandichotels.de
|
||||
</span>
|
||||
<img
|
||||
src="/Static/img/scandic-logotype.svg"
|
||||
data-js="scandiclogoimg"
|
||||
alt="Scandic Hotels logo"
|
||||
height="22"
|
||||
data-nosvgsrc="/Static/img/scandic-logotype.png"
|
||||
itemProp="logo"
|
||||
/>
|
||||
</a>
|
||||
<ul id="navbar-header-design" className="hidden hidden-medium hidden-large nav-primary__header">
|
||||
<ul
|
||||
id="navbar-header-design"
|
||||
className="hidden hidden-medium hidden-large nav-primary__header"
|
||||
>
|
||||
<li className="nav-primary__scandicfriendslogo">
|
||||
<img src="/Static/img/icons/scandic-friends/icon-scandic-friends.svg" width="35" height="35" />
|
||||
<img
|
||||
src="/Static/img/icons/scandic-friends/icon-scandic-friends.svg"
|
||||
width="35"
|
||||
height="35"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<nav>
|
||||
<ul id="main-menu" className="nav-primary is-collapsed" data-collapsable="main-menu">
|
||||
<li className="nav-primary__item nav-primary__item--primary hidden-large hidden-small hidden-xsmall hidden-xxsmall" aria-hidden="true">
|
||||
<a className="navigation-bar__main__logo" href="https://www.scandichotels.de">
|
||||
<img src="/Static/img/scandic-logotype.svg" data-js="scandiclogoimg" alt="Scandic Hotels logo" height="22" data-nosvgsrc="/Static/img/scandic-logotype.png" />
|
||||
<span className="hidden--accessible">Back to scandichotels.de</span>
|
||||
<ul
|
||||
id="main-menu"
|
||||
className="nav-primary is-collapsed"
|
||||
data-collapsable="main-menu"
|
||||
>
|
||||
<li
|
||||
className="nav-primary__item nav-primary__item--primary hidden-large hidden-small hidden-xsmall hidden-xxsmall"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<a
|
||||
className="navigation-bar__main__logo"
|
||||
href="https://www.scandichotels.de"
|
||||
>
|
||||
<img
|
||||
src="/Static/img/scandic-logotype.svg"
|
||||
data-js="scandiclogoimg"
|
||||
alt="Scandic Hotels logo"
|
||||
height="22"
|
||||
data-nosvgsrc="/Static/img/scandic-logotype.png"
|
||||
/>
|
||||
<span className="hidden--accessible">
|
||||
Back to scandichotels.de
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--primary ">
|
||||
<a href="https://www.scandichotels.de/hotelsuche">Hotels & Reiseziele</a>
|
||||
<a href="https://www.scandichotels.de/hotelsuche">
|
||||
Hotels & Reiseziele
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--primary ">
|
||||
<a href="https://www.scandichotels.de/reisemagazin">Reisemagazin</a>
|
||||
<a href="https://www.scandichotels.de/reisemagazin">
|
||||
Reisemagazin
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--primary ">
|
||||
<a href="https://www.scandichotels.de/tagungen-und-events">Tagungen & Events</a>
|
||||
<a href="https://www.scandichotels.de/tagungen-und-events">
|
||||
Tagungen & Events
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--primary ">
|
||||
<a href="https://www.scandichotels.de/scandic-entdecken">Scandic entdecken</a>
|
||||
<a href="https://www.scandichotels.de/scandic-entdecken">
|
||||
Scandic entdecken
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--primary ">
|
||||
<a href="https://www.scandichotels.de/angebote-arrangements">Angebote</a>
|
||||
<a href="https://www.scandichotels.de/angebote-arrangements">
|
||||
Angebote
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--secondary hidden-medium hidden-large ">
|
||||
<a href="https://www.scandichotels.de/scandic-friends">Über Scandic Friends</a>
|
||||
<a href="https://www.scandichotels.de/scandic-friends">
|
||||
Über Scandic Friends
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--secondary hidden-medium hidden-large ">
|
||||
<a href="https://www.scandichotels.de/geschaftsreisen">Geschäftsreisen</a>
|
||||
<a href="https://www.scandichotels.de/geschaftsreisen">
|
||||
Geschäftsreisen
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item hidden-medium hidden-large">
|
||||
{links ? <Mobile currentLanguage={currentLanguage} links={links} /> : null}
|
||||
{links ? (
|
||||
<Mobile currentLanguage={currentLanguage} links={links} />
|
||||
) : null}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
/* eslint-disable @next/next/no-img-element */
|
||||
import { currentAboutLinks, currentSponsoringLinks, currentWifiLinks } from "@/constants/current/links"
|
||||
import {
|
||||
currentAboutLinks,
|
||||
currentSponsoringLinks,
|
||||
currentWifiLinks,
|
||||
} from "@/constants/current/links"
|
||||
|
||||
import Desktop from "./LanguageSwitcher/Desktop"
|
||||
import Mobile from "./LanguageSwitcher/Mobile"
|
||||
@@ -8,7 +12,8 @@ import type { LanguageSwitcherLink } from "@/types/components/current/languageSw
|
||||
import type { HeaderProps } from "@/types/components/current/header"
|
||||
|
||||
const paths: Record<string, LanguageSwitcherLink[]> = {
|
||||
"/customer-service/frequently-asked-questions/using-the-website": currentAboutLinks,
|
||||
"/customer-service/frequently-asked-questions/using-the-website":
|
||||
currentAboutLinks,
|
||||
"/explore-scandic/wifi": currentWifiLinks,
|
||||
"/sponsoring": currentSponsoringLinks,
|
||||
}
|
||||
@@ -40,7 +45,9 @@ export default function EnHeader({ pathname }: HeaderProps) {
|
||||
|
||||
<ul className="nav-secondary navbar-login">
|
||||
<li className="nav-secondary__item hidden-xxsmall hidden-xsmall hidden-small">
|
||||
{links ? <Desktop currentLanguage={currentLanguage} links={links} /> : null}
|
||||
{links ? (
|
||||
<Desktop currentLanguage={currentLanguage} links={links} />
|
||||
) : null}
|
||||
</li>
|
||||
<li className=" hidden-xxsmall hidden-xsmall hidden-small nav-secondary__item">
|
||||
<a
|
||||
@@ -175,7 +182,9 @@ export default function EnHeader({ pathname }: HeaderProps) {
|
||||
</li>
|
||||
|
||||
<li className="nav-primary__item hidden-medium hidden-large">
|
||||
{links ? <Mobile currentLanguage={currentLanguage} links={links} /> : null}
|
||||
{links ? (
|
||||
<Mobile currentLanguage={currentLanguage} links={links} />
|
||||
) : null}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -183,5 +192,5 @@ export default function EnHeader({ pathname }: HeaderProps) {
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
/* eslint-disable @next/next/no-img-element */
|
||||
import { currentAboutLinks, currentSponsoringLinks, currentWifiLinks } from "@/constants/current/links"
|
||||
import {
|
||||
currentAboutLinks,
|
||||
currentSponsoringLinks,
|
||||
currentWifiLinks,
|
||||
} from "@/constants/current/links"
|
||||
|
||||
import Desktop from "./LanguageSwitcher/Desktop"
|
||||
import Mobile from "./LanguageSwitcher/Mobile"
|
||||
@@ -8,7 +12,8 @@ import type { LanguageSwitcherLink } from "@/types/components/current/languageSw
|
||||
import type { HeaderProps } from "@/types/components/current/header"
|
||||
|
||||
const paths: Record<string, LanguageSwitcherLink[]> = {
|
||||
"/asiakaspalvelu/usein-kysytyt-kysymykset/tietoja-internetsivuista": currentAboutLinks,
|
||||
"/asiakaspalvelu/usein-kysytyt-kysymykset/tietoja-internetsivuista":
|
||||
currentAboutLinks,
|
||||
"/koe-scandic/maksuton-internetyhteys": currentSponsoringLinks,
|
||||
"/scandic-entdecken/wlan": currentWifiLinks,
|
||||
}
|
||||
@@ -40,7 +45,9 @@ export default function FiHeader({ pathname }: HeaderProps) {
|
||||
|
||||
<ul className="nav-secondary navbar-login">
|
||||
<li className="nav-secondary__item hidden-xxsmall hidden-xsmall hidden-small">
|
||||
{links ? <Desktop currentLanguage={currentLanguage} links={links} /> : null}
|
||||
{links ? (
|
||||
<Desktop currentLanguage={currentLanguage} links={links} />
|
||||
) : null}
|
||||
</li>
|
||||
<li className=" hidden-xxsmall hidden-xsmall hidden-small nav-secondary__item">
|
||||
<a
|
||||
@@ -177,7 +184,9 @@ export default function FiHeader({ pathname }: HeaderProps) {
|
||||
</li>
|
||||
|
||||
<li className="nav-primary__item hidden-medium hidden-large">
|
||||
{links ? <Mobile currentLanguage={currentLanguage} links={links} /> : null}
|
||||
{links ? (
|
||||
<Mobile currentLanguage={currentLanguage} links={links} />
|
||||
) : null}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -185,5 +194,5 @@ export default function FiHeader({ pathname }: HeaderProps) {
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { LanguageSwitcherProps } from "@/types/components/current/languageSwitcher";
|
||||
import type { LanguageSwitcherProps } from "@/types/components/current/languageSwitcher"
|
||||
|
||||
export default function Desktop({
|
||||
currentLanguage,
|
||||
@@ -33,5 +33,5 @@ export default function Desktop({
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,15 +1,25 @@
|
||||
import type { LanguageSwitcherProps } from "@/types/components/current/languageSwitcher"
|
||||
|
||||
export default function Mobile({ currentLanguage, links }: LanguageSwitcherProps) {
|
||||
export default function Mobile({
|
||||
currentLanguage,
|
||||
links,
|
||||
}: LanguageSwitcherProps) {
|
||||
return (
|
||||
<div className="navbar-language-selector">
|
||||
<button className="navbar-language-selector__toggler " data-js="collapsible-toggler" data-target="language-menu" aria-pressed="false">
|
||||
{currentLanguage} <span className="navbar-language-selector__toggler__arrow"></span><span className="hidden--accessible">Choose language</span>
|
||||
<button
|
||||
className="navbar-language-selector__toggler "
|
||||
data-js="collapsible-toggler"
|
||||
data-target="language-menu"
|
||||
aria-pressed="false"
|
||||
>
|
||||
{currentLanguage}{" "}
|
||||
<span className="navbar-language-selector__toggler__arrow"></span>
|
||||
<span className="hidden--accessible">Choose language</span>
|
||||
</button>
|
||||
<ul className="is-collapsed" data-collapsable="language-menu">
|
||||
{links.map(link => (
|
||||
{links.map((link) => (
|
||||
<li
|
||||
className={`navbar-language-selector__item ${currentLanguage === link.title ? 'is-active' : ''}`}
|
||||
className={`navbar-language-selector__item ${currentLanguage === link.title ? "is-active" : ""}`}
|
||||
key={link.href}
|
||||
>
|
||||
<a href={link.href}>{link.title}</a>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import { currentAboutLinks, currentSponsoringLinks, currentWifiLinks } from "@/constants/current/links"
|
||||
import {
|
||||
currentAboutLinks,
|
||||
currentSponsoringLinks,
|
||||
currentWifiLinks,
|
||||
} from "@/constants/current/links"
|
||||
|
||||
import Desktop from "./LanguageSwitcher/Desktop"
|
||||
import Mobile from "./LanguageSwitcher/Mobile"
|
||||
@@ -21,77 +25,173 @@ export default function NoHeader({ pathname }: HeaderProps) {
|
||||
<header className="header" role="banner">
|
||||
<div className="offline-banner hidden">
|
||||
Du er offline. Noe innhold kan være utdatert.
|
||||
<button type="button" className="reload">Last inn på nytt</button>
|
||||
<button type="button" className="reload">
|
||||
Last inn på nytt
|
||||
</button>
|
||||
</div>
|
||||
<div className="l-section main-header navigation-bar" data-js="main-nav-bar">
|
||||
<div
|
||||
className="l-section main-header navigation-bar"
|
||||
data-js="main-nav-bar"
|
||||
>
|
||||
<div className="navigation-bar__top navigation-bar__top--ghostwhite-light">
|
||||
<div className="l-section__inner">
|
||||
<a href="https://www.scandichotels.no" className="scandic-main-page-link">Tilbake til scandichotels.no</a>
|
||||
<a
|
||||
href="https://www.scandichotels.no"
|
||||
className="scandic-main-page-link"
|
||||
>
|
||||
Tilbake til scandichotels.no
|
||||
</a>
|
||||
<ul className="nav-secondary navbar-login">
|
||||
<li className="nav-secondary__item hidden-xxsmall hidden-xsmall hidden-small">
|
||||
{links ? <Desktop currentLanguage={currentLanguage} links={links} /> : null}
|
||||
{links ? (
|
||||
<Desktop currentLanguage={currentLanguage} links={links} />
|
||||
) : null}
|
||||
</li>
|
||||
<li className=" hidden-xxsmall hidden-xsmall hidden-small nav-secondary__item">
|
||||
<a className="nav-secondary__item__link" href="https://www.scandichotels.no/hotelreservation/get-booking">Vis/Avbestill din booking</a>
|
||||
<a
|
||||
className="nav-secondary__item__link"
|
||||
href="https://www.scandichotels.no/hotelreservation/get-booking"
|
||||
>
|
||||
Vis/Avbestill din booking
|
||||
</a>
|
||||
</li>
|
||||
<li className=" hidden-xxsmall hidden-xsmall hidden-small nav-secondary__item">
|
||||
<a className="nav-secondary__item__link" href="https://www.scandichotels.no/jobb-hos-oss/ledige-stillinger">Jobb hos oss</a>
|
||||
<a
|
||||
className="nav-secondary__item__link"
|
||||
href="https://www.scandichotels.no/jobb-hos-oss/ledige-stillinger"
|
||||
>
|
||||
Jobb hos oss
|
||||
</a>
|
||||
</li>
|
||||
<li className=" hidden-xxsmall hidden-xsmall hidden-small nav-secondary__item">
|
||||
<a className="nav-secondary__item__link" href="https://www.scandichotels.no/for-bedrifter">For bedrifter</a>
|
||||
<a
|
||||
className="nav-secondary__item__link"
|
||||
href="https://www.scandichotels.no/for-bedrifter"
|
||||
>
|
||||
For bedrifter
|
||||
</a>
|
||||
</li>
|
||||
<li className=" hidden-xxsmall hidden-xsmall hidden-small nav-secondary__item">
|
||||
<a className="nav-secondary__item__link" href="https://www.scandichotels.no/scandic-friends">Om Scandic Friends</a>
|
||||
<a
|
||||
className="nav-secondary__item__link"
|
||||
href="https://www.scandichotels.no/scandic-friends"
|
||||
>
|
||||
Om Scandic Friends
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div className="navigation-bar__main">
|
||||
<div className="l-section__inner l-section__inner--small-no-padding" itemScope={undefined} itemType="http://schema.org/Organization">
|
||||
<div
|
||||
className="l-section__inner l-section__inner--small-no-padding"
|
||||
itemScope={undefined}
|
||||
itemType="http://schema.org/Organization"
|
||||
>
|
||||
<meta itemProp="name" content="Scandic" />
|
||||
<button type="button" className="navigation-bar__main__expander" data-js="main-nav-toggler" data-target="#main-menu" aria-pressed="false">
|
||||
<span className="icon-bars"></span><span className="hidden--accessible">Menu</span>
|
||||
<button
|
||||
type="button"
|
||||
className="navigation-bar__main__expander"
|
||||
data-js="main-nav-toggler"
|
||||
data-target="#main-menu"
|
||||
aria-pressed="false"
|
||||
>
|
||||
<span className="icon-bars"></span>
|
||||
<span className="hidden--accessible">Menu</span>
|
||||
</button>
|
||||
<a id="scandic-logo" className="navigation-bar__main__logo hidden-medium " href="https://www.scandichotels.no" itemProp="url">
|
||||
<span className="hidden--accessible">Tilbake til scandichotels.no</span>
|
||||
<img src="/Static/img/scandic-logotype.svg" data-js="scandiclogoimg" alt="Scandic Hotels logo" height="22" data-nosvgsrc="/Static/img/scandic-logotype.png" itemProp="logo" />
|
||||
<a
|
||||
id="scandic-logo"
|
||||
className="navigation-bar__main__logo hidden-medium "
|
||||
href="https://www.scandichotels.no"
|
||||
itemProp="url"
|
||||
>
|
||||
<span className="hidden--accessible">
|
||||
Tilbake til scandichotels.no
|
||||
</span>
|
||||
<img
|
||||
src="/Static/img/scandic-logotype.svg"
|
||||
data-js="scandiclogoimg"
|
||||
alt="Scandic Hotels logo"
|
||||
height="22"
|
||||
data-nosvgsrc="/Static/img/scandic-logotype.png"
|
||||
itemProp="logo"
|
||||
/>
|
||||
</a>
|
||||
<ul id="navbar-header-design" className="hidden hidden-medium hidden-large nav-primary__header">
|
||||
<ul
|
||||
id="navbar-header-design"
|
||||
className="hidden hidden-medium hidden-large nav-primary__header"
|
||||
>
|
||||
<li className="nav-primary__scandicfriendslogo">
|
||||
<img src="/Static/img/icons/scandic-friends/icon-scandic-friends.svg" width="35" height="35" />
|
||||
<img
|
||||
src="/Static/img/icons/scandic-friends/icon-scandic-friends.svg"
|
||||
width="35"
|
||||
height="35"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
<nav>
|
||||
<ul id="main-menu" className="nav-primary is-collapsed" data-collapsable="main-menu">
|
||||
<li className="nav-primary__item nav-primary__item--primary hidden-large hidden-small hidden-xsmall hidden-xxsmall" aria-hidden="true">
|
||||
<a className="navigation-bar__main__logo" href="https://www.scandichotels.no">
|
||||
<img src="/Static/img/scandic-logotype.svg" data-js="scandiclogoimg" alt="Scandic Hotels logo" height="22" data-nosvgsrc="/Static/img/scandic-logotype.png" />
|
||||
<span className="hidden--accessible">Tilbake til scandichotels.no</span>
|
||||
<ul
|
||||
id="main-menu"
|
||||
className="nav-primary is-collapsed"
|
||||
data-collapsable="main-menu"
|
||||
>
|
||||
<li
|
||||
className="nav-primary__item nav-primary__item--primary hidden-large hidden-small hidden-xsmall hidden-xxsmall"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<a
|
||||
className="navigation-bar__main__logo"
|
||||
href="https://www.scandichotels.no"
|
||||
>
|
||||
<img
|
||||
src="/Static/img/scandic-logotype.svg"
|
||||
data-js="scandiclogoimg"
|
||||
alt="Scandic Hotels logo"
|
||||
height="22"
|
||||
data-nosvgsrc="/Static/img/scandic-logotype.png"
|
||||
/>
|
||||
<span className="hidden--accessible">
|
||||
Tilbake til scandichotels.no
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--primary ">
|
||||
<a href="https://www.scandichotels.no/hotell">Hoteller og destinasjoner</a>
|
||||
<a href="https://www.scandichotels.no/hotell">
|
||||
Hoteller og destinasjoner
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--primary ">
|
||||
<a href="https://www.scandichotels.no/reiseguider">Reiseguider</a>
|
||||
<a href="https://www.scandichotels.no/reiseguider">
|
||||
Reiseguider
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--primary ">
|
||||
<a href="https://www.scandichotels.no/moter-og-konferanser">Møter og konferanser</a>
|
||||
<a href="https://www.scandichotels.no/moter-og-konferanser">
|
||||
Møter og konferanser
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--primary ">
|
||||
<a href="https://www.scandichotels.no/utforsk-scandic">Utforsk Scandic</a>
|
||||
<a href="https://www.scandichotels.no/utforsk-scandic">
|
||||
Utforsk Scandic
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--primary ">
|
||||
<a href="https://www.scandichotels.no/hotelltilbud">Tilbud</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--secondary hidden-medium hidden-large ">
|
||||
<a href="https://www.scandichotels.no/scandic-friends">Om Scandic Friends</a>
|
||||
<a href="https://www.scandichotels.no/scandic-friends">
|
||||
Om Scandic Friends
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item nav-primary__item--secondary hidden-medium hidden-large ">
|
||||
<a href="https://www.scandichotels.no/for-bedrifter">For bedrifter</a>
|
||||
<a href="https://www.scandichotels.no/for-bedrifter">
|
||||
For bedrifter
|
||||
</a>
|
||||
</li>
|
||||
<li className="nav-primary__item hidden-medium hidden-large">
|
||||
{links ? <Mobile currentLanguage={currentLanguage} links={links} /> : null}
|
||||
{links ? (
|
||||
<Mobile currentLanguage={currentLanguage} links={links} />
|
||||
) : null}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
/* eslint-disable @next/next/no-img-element */
|
||||
import { currentAboutLinks, currentSponsoringLinks, currentWifiLinks } from "@/constants/current/links"
|
||||
import {
|
||||
currentAboutLinks,
|
||||
currentSponsoringLinks,
|
||||
currentWifiLinks,
|
||||
} from "@/constants/current/links"
|
||||
|
||||
import Desktop from "./LanguageSwitcher/Desktop"
|
||||
import Mobile from "./LanguageSwitcher/Mobile"
|
||||
@@ -40,7 +44,9 @@ export default function SvHeader({ pathname }: HeaderProps) {
|
||||
|
||||
<ul className="nav-secondary navbar-login">
|
||||
<li className="nav-secondary__item hidden-xxsmall hidden-xsmall hidden-small">
|
||||
{links ? <Desktop currentLanguage={currentLanguage} links={links} /> : null}
|
||||
{links ? (
|
||||
<Desktop currentLanguage={currentLanguage} links={links} />
|
||||
) : null}
|
||||
</li>
|
||||
<li className="hidden-xxsmall hidden-xsmall hidden-small nav-secondary__item">
|
||||
<a
|
||||
@@ -178,7 +184,9 @@ export default function SvHeader({ pathname }: HeaderProps) {
|
||||
</li>
|
||||
|
||||
<li className="nav-primary__item hidden-medium hidden-large">
|
||||
{links ? <Mobile currentLanguage={currentLanguage} links={links} /> : null}
|
||||
{links ? (
|
||||
<Mobile currentLanguage={currentLanguage} links={links} />
|
||||
) : null}
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -186,5 +194,5 @@ export default function SvHeader({ pathname }: HeaderProps) {
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
import { langEnum } from "@/types/lang";
|
||||
import { langEnum } from "@/types/lang"
|
||||
|
||||
import Da from "./Da";
|
||||
import De from "./De";
|
||||
import En from "./En";
|
||||
import Fi from "./Fi";
|
||||
import No from "./No";
|
||||
import Sv from "./Sv";
|
||||
import Da from "./Da"
|
||||
import De from "./De"
|
||||
import En from "./En"
|
||||
import Fi from "./Fi"
|
||||
import No from "./No"
|
||||
import Sv from "./Sv"
|
||||
|
||||
import type { HeaderProps } from "@/types/components/current/header";
|
||||
import { LangParams } from "@/types/params";
|
||||
import type { HeaderProps } from "@/types/components/current/header"
|
||||
import { LangParams } from "@/types/params"
|
||||
|
||||
export default function Header({ lang, pathname }: LangParams & HeaderProps) {
|
||||
switch (lang) {
|
||||
case langEnum.sv:
|
||||
return <Sv pathname={pathname} />;
|
||||
return <Sv pathname={pathname} />
|
||||
case langEnum.fi:
|
||||
return <Fi pathname={pathname} />;
|
||||
return <Fi pathname={pathname} />
|
||||
case langEnum.en:
|
||||
return <En pathname={pathname} />;
|
||||
return <En pathname={pathname} />
|
||||
case langEnum.da:
|
||||
return <Da pathname={pathname} />;
|
||||
return <Da pathname={pathname} />
|
||||
case langEnum.de:
|
||||
return <De pathname={pathname} />;
|
||||
return <De pathname={pathname} />
|
||||
case langEnum.no:
|
||||
return <No pathname={pathname} />;
|
||||
return <No pathname={pathname} />
|
||||
default:
|
||||
return null;
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,48 +1,48 @@
|
||||
import { localeToLang } from "@/constants/locales";
|
||||
import { type Lang, langEnum } from "@/types/lang";
|
||||
import { headers } from "next/headers";
|
||||
import { localeToLang } from "@/constants/locales"
|
||||
import { type Lang, langEnum } from "@/types/lang"
|
||||
import { headers } from "next/headers"
|
||||
|
||||
export default function LangPopup({ lang }: { lang: Lang }) {
|
||||
const headersList = headers();
|
||||
const preferedLang = headersList.get("Accept-Language") ?? "";
|
||||
const headersList = headers()
|
||||
const preferedLang = headersList.get("Accept-Language") ?? ""
|
||||
|
||||
const possibleLocales = Object.keys(localeToLang);
|
||||
const possibleLocales = Object.keys(localeToLang)
|
||||
|
||||
if (!possibleLocales.includes(preferedLang)) {
|
||||
return null;
|
||||
return null
|
||||
}
|
||||
|
||||
//@ts-ignore
|
||||
const langOfChoice: Lang = localeToLang[preferedLang];
|
||||
const langOfChoice: Lang = localeToLang[preferedLang]
|
||||
|
||||
if (langOfChoice === lang) {
|
||||
return null;
|
||||
return null
|
||||
}
|
||||
|
||||
let language = "";
|
||||
let viewIn = "";
|
||||
let language = ""
|
||||
let viewIn = ""
|
||||
|
||||
switch (langOfChoice) {
|
||||
case langEnum.de:
|
||||
language = "Deutsch";
|
||||
viewIn = "Ansicht in";
|
||||
break;
|
||||
language = "Deutsch"
|
||||
viewIn = "Ansicht in"
|
||||
break
|
||||
case langEnum.da:
|
||||
language = "Dansk";
|
||||
viewIn = "Se in";
|
||||
break;
|
||||
language = "Dansk"
|
||||
viewIn = "Se in"
|
||||
break
|
||||
case langEnum.fi:
|
||||
language = "Suomi";
|
||||
viewIn = "Katso in";
|
||||
break;
|
||||
language = "Suomi"
|
||||
viewIn = "Katso in"
|
||||
break
|
||||
case langEnum.no:
|
||||
language = "Norsk";
|
||||
viewIn = "Se in";
|
||||
break;
|
||||
language = "Norsk"
|
||||
viewIn = "Se in"
|
||||
break
|
||||
case langEnum.sv:
|
||||
language = "Svenska";
|
||||
viewIn = "Visa in";
|
||||
break;
|
||||
language = "Svenska"
|
||||
viewIn = "Visa in"
|
||||
break
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -89,5 +89,5 @@ export default function LangPopup({ lang }: { lang: Lang }) {
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
"use client";
|
||||
"use client"
|
||||
|
||||
import { useEffect } from "react"
|
||||
import ContentstackLivePreview from "@contentstack/live-preview-utils"
|
||||
|
||||
export default function InitLivePreview() {
|
||||
useEffect(() => {
|
||||
if (!ContentstackLivePreview.livePreview) {
|
||||
ContentstackLivePreview.init()
|
||||
}
|
||||
}, []);
|
||||
if (!ContentstackLivePreview.livePreview) {
|
||||
ContentstackLivePreview.init()
|
||||
}
|
||||
}, [])
|
||||
|
||||
return null;
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 200px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.spinner div {
|
||||
transform-origin: 40px 40px;
|
||||
animation: spinnerAnimation 1.2s linear infinite;
|
||||
transform-origin: 40px 40px;
|
||||
animation: spinnerAnimation 1.2s linear infinite;
|
||||
}
|
||||
|
||||
.spinner div::after {
|
||||
content: " ";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
left: 37px;
|
||||
width: 6px;
|
||||
height: 18px;
|
||||
border-radius: 20%;
|
||||
top: 3px;
|
||||
left: 37px;
|
||||
width: 6px;
|
||||
height: 18px;
|
||||
border-radius: 20%;
|
||||
background: red;
|
||||
}
|
||||
|
||||
@@ -34,57 +34,56 @@
|
||||
animation-delay: -1.1s;
|
||||
}
|
||||
|
||||
.spinner div:nth-child(2) {
|
||||
transform: rotate(30deg);
|
||||
animation-delay: -1s;
|
||||
}
|
||||
.spinner div:nth-child(3) {
|
||||
transform: rotate(60deg);
|
||||
animation-delay: -0.9s;
|
||||
}
|
||||
.spinner div:nth-child(4) {
|
||||
transform: rotate(90deg);
|
||||
animation-delay: -0.8s;
|
||||
}
|
||||
.spinner div:nth-child(5) {
|
||||
transform: rotate(120deg);
|
||||
animation-delay: -0.7s;
|
||||
}
|
||||
.spinner div:nth-child(6) {
|
||||
transform: rotate(150deg);
|
||||
animation-delay: -0.6s;
|
||||
}
|
||||
.spinner div:nth-child(7) {
|
||||
transform: rotate(180deg);
|
||||
animation-delay: -0.5s;
|
||||
}
|
||||
.spinner div:nth-child(8) {
|
||||
transform: rotate(210deg);
|
||||
animation-delay: -0.4s;
|
||||
}
|
||||
.spinner div:nth-child(9) {
|
||||
transform: rotate(240deg);
|
||||
animation-delay: -0.3s;
|
||||
}
|
||||
.spinner div:nth-child(10) {
|
||||
transform: rotate(270deg);
|
||||
animation-delay: -0.2s;
|
||||
}
|
||||
.spinner div:nth-child(11) {
|
||||
transform: rotate(300deg);
|
||||
animation-delay: -0.1s;
|
||||
}
|
||||
.spinner div:nth-child(12) {
|
||||
transform: rotate(330deg);
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
.spinner div:nth-child(2) {
|
||||
transform: rotate(30deg);
|
||||
animation-delay: -1s;
|
||||
}
|
||||
.spinner div:nth-child(3) {
|
||||
transform: rotate(60deg);
|
||||
animation-delay: -0.9s;
|
||||
}
|
||||
.spinner div:nth-child(4) {
|
||||
transform: rotate(90deg);
|
||||
animation-delay: -0.8s;
|
||||
}
|
||||
.spinner div:nth-child(5) {
|
||||
transform: rotate(120deg);
|
||||
animation-delay: -0.7s;
|
||||
}
|
||||
.spinner div:nth-child(6) {
|
||||
transform: rotate(150deg);
|
||||
animation-delay: -0.6s;
|
||||
}
|
||||
.spinner div:nth-child(7) {
|
||||
transform: rotate(180deg);
|
||||
animation-delay: -0.5s;
|
||||
}
|
||||
.spinner div:nth-child(8) {
|
||||
transform: rotate(210deg);
|
||||
animation-delay: -0.4s;
|
||||
}
|
||||
.spinner div:nth-child(9) {
|
||||
transform: rotate(240deg);
|
||||
animation-delay: -0.3s;
|
||||
}
|
||||
.spinner div:nth-child(10) {
|
||||
transform: rotate(270deg);
|
||||
animation-delay: -0.2s;
|
||||
}
|
||||
.spinner div:nth-child(11) {
|
||||
transform: rotate(300deg);
|
||||
animation-delay: -0.1s;
|
||||
}
|
||||
.spinner div:nth-child(12) {
|
||||
transform: rotate(330deg);
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
@keyframes spinnerAnimation {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
.currentPage,
|
||||
.li {
|
||||
font-size: .875rem;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
@@ -36,9 +36,8 @@
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 740px){
|
||||
@media (min-width: 740px) {
|
||||
.nav {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,11 @@ import styles from "./breadcrumbs.module.css"
|
||||
|
||||
import type { BreadcrumbsProps } from "@/types/components/current/breadcrumbs"
|
||||
|
||||
export default function Breadcrumbs({ breadcrumbs, parent, title }: BreadcrumbsProps) {
|
||||
export default function Breadcrumbs({
|
||||
breadcrumbs,
|
||||
parent,
|
||||
title,
|
||||
}: BreadcrumbsProps) {
|
||||
return (
|
||||
<nav className={styles.nav}>
|
||||
<ul className={styles.list}>
|
||||
|
||||
@@ -7,11 +7,21 @@ import styles from "./preamble.module.css"
|
||||
|
||||
import type { PreambleProps } from "@/types/components/current/preamble"
|
||||
|
||||
export default function Preamble({ breadcrumbs, breadcrumbParent, breadcrumbTitle, preamble, title }: PreambleProps) {
|
||||
export default function Preamble({
|
||||
breadcrumbs,
|
||||
breadcrumbParent,
|
||||
breadcrumbTitle,
|
||||
preamble,
|
||||
title,
|
||||
}: PreambleProps) {
|
||||
return (
|
||||
<section className={styles.container}>
|
||||
<section>
|
||||
<Breadcrumbs breadcrumbs={breadcrumbs} parent={breadcrumbParent} title={breadcrumbTitle} />
|
||||
<Breadcrumbs
|
||||
breadcrumbs={breadcrumbs}
|
||||
parent={breadcrumbParent}
|
||||
title={breadcrumbTitle}
|
||||
/>
|
||||
<h1>{title}</h1>
|
||||
{preamble?.text ? (
|
||||
<JsonToHtml
|
||||
|
||||
@@ -9,7 +9,12 @@
|
||||
|
||||
.preamble {
|
||||
color: #333;
|
||||
font-family: Helvetica Neue, Roboto, Helvetica, Arial, sans-serif;
|
||||
font-family:
|
||||
Helvetica Neue,
|
||||
Roboto,
|
||||
Helvetica,
|
||||
Arial,
|
||||
sans-serif;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 300;
|
||||
line-height: normal;
|
||||
@@ -17,12 +22,12 @@
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 740px){
|
||||
@media (min-width: 740px) {
|
||||
.container {
|
||||
background: transparent;
|
||||
padding: 30px 30px 15px;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
max-width: 1200px;
|
||||
background: transparent;
|
||||
padding: 30px 30px 15px;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
max-width: 1200px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,12 @@ import type { RTENext, RTEDefaultNode } from "@/types/rte/node"
|
||||
import type { RenderOptions } from "@/types/rte/option"
|
||||
|
||||
export const renderOptions: RenderOptions = {
|
||||
[RTETypeEnum.p]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.p]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
return (
|
||||
<p key={node.uid} className={styles.preamble}>
|
||||
{next(node.children, embeds, fullRenderOptions)}
|
||||
|
||||
@@ -3,9 +3,7 @@ import styles from "./section.module.css"
|
||||
export default function Section({ children }: React.PropsWithChildren) {
|
||||
return (
|
||||
<div className={styles.wrapper}>
|
||||
<section className={styles.section}>
|
||||
{children}
|
||||
</section>
|
||||
<section className={styles.section}>{children}</section>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
.section {
|
||||
box-sizing: content-box;
|
||||
margin: 0 auto;
|
||||
@@ -22,4 +21,4 @@
|
||||
.section {
|
||||
padding: 50px 30px 35px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,11 @@ import Link from "next/link"
|
||||
|
||||
import type { SubnavMobileProps } from "@/types/components/current/subnavMobile"
|
||||
|
||||
export default async function SubnavMobile({ breadcrumbs, parent, title }: SubnavMobileProps) {
|
||||
export default async function SubnavMobile({
|
||||
breadcrumbs,
|
||||
parent,
|
||||
title,
|
||||
}: SubnavMobileProps) {
|
||||
return (
|
||||
<div className="subnav-mobile hidden-small hidden-medium hidden-large">
|
||||
<nav className="u-flex">
|
||||
@@ -14,7 +18,7 @@ export default async function SubnavMobile({ breadcrumbs, parent, title }: Subna
|
||||
</Link>
|
||||
</li>
|
||||
) : null}
|
||||
{breadcrumbs.edges.map(breadcrumb => (
|
||||
{breadcrumbs.edges.map((breadcrumb) => (
|
||||
<li className="breadcrumb-list__body" key={breadcrumb.node.url}>
|
||||
<Link href={breadcrumb.node.url}>
|
||||
{breadcrumb.node.breadcrumbs?.title ?? breadcrumb.node.title}
|
||||
|
||||
@@ -8,10 +8,5 @@ function imageLoader({ quality, src, width }: ImageLoaderProps) {
|
||||
|
||||
// Next/Image adds & instead of ? before the params
|
||||
export default function Image(props: ImageProps) {
|
||||
return (
|
||||
<NextImage
|
||||
{...props}
|
||||
loader={imageLoader}
|
||||
/>
|
||||
)
|
||||
return <NextImage {...props} loader={imageLoader} />
|
||||
}
|
||||
|
||||
@@ -2,7 +2,11 @@ import { nodesToHtml } from "./utils"
|
||||
|
||||
import type { JsonToHtmlProps } from "@/types/components/jsontohtml"
|
||||
|
||||
export default function JsonToHtml({ embeds, nodes, renderOptions = {} }: JsonToHtmlProps) {
|
||||
export default function JsonToHtml({
|
||||
embeds,
|
||||
nodes,
|
||||
renderOptions = {},
|
||||
}: JsonToHtmlProps) {
|
||||
if (!Array.isArray(nodes) || !nodes.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
margin-bottom: 16px;
|
||||
max-width: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,12 @@ import styles from "./jsontohtml.module.css"
|
||||
|
||||
import type { Attributes } from "@/types/rte/attrs"
|
||||
import type { EmbedByUid } from "@/types/components/jsontohtml"
|
||||
import type { RTENext, RTEDefaultNode, RTENode, RTERegularNode } from "@/types/rte/node"
|
||||
import type {
|
||||
RTENext,
|
||||
RTEDefaultNode,
|
||||
RTENode,
|
||||
RTERegularNode,
|
||||
} from "@/types/rte/node"
|
||||
import type { RenderOptions } from "@/types/rte/option"
|
||||
|
||||
function extractPossibleAttributes(attrs: Attributes) {
|
||||
@@ -30,7 +35,12 @@ function extractPossibleAttributes(attrs: Attributes) {
|
||||
}
|
||||
|
||||
export const renderOptions: RenderOptions = {
|
||||
[RTETypeEnum.a]: (node: RTERegularNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.a]: (
|
||||
node: RTERegularNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
if (node.attrs.url) {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
@@ -47,7 +57,12 @@ export const renderOptions: RenderOptions = {
|
||||
return null
|
||||
},
|
||||
|
||||
[RTETypeEnum.blockquote]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.blockquote]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<blockquote key={node.uid} {...props}>
|
||||
@@ -56,7 +71,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.code]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.code]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<code key={node.uid} {...props}>
|
||||
@@ -65,7 +85,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.embed]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.embed]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
if (node.attrs.src) {
|
||||
props.src = node.attrs.src
|
||||
@@ -83,7 +108,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.h1]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.h1]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<h1 key={node.uid} {...props}>
|
||||
@@ -92,7 +122,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.h2]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.h2]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<h2 key={node.uid} {...props}>
|
||||
@@ -101,7 +136,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.h3]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.h3]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<h3 key={node.uid} {...props}>
|
||||
@@ -110,7 +150,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.h4]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.h4]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<h4 key={node.uid} {...props}>
|
||||
@@ -119,7 +164,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.h5]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.h5]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<h5 key={node.uid} {...props}>
|
||||
@@ -128,7 +178,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.h6]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.h6]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<h6 key={node.uid} {...props}>
|
||||
@@ -141,7 +196,12 @@ export const renderOptions: RenderOptions = {
|
||||
return <hr />
|
||||
},
|
||||
|
||||
[RTETypeEnum.li]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.li]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<li key={node.uid} {...props}>
|
||||
@@ -150,7 +210,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.ol]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.ol]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<ol key={node.uid} {...props}>
|
||||
@@ -159,7 +224,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.p]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.p]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<p {...props} key={node.uid}>
|
||||
@@ -168,7 +238,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.reference]: (node: RTENode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.reference]: (
|
||||
node: RTENode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
if ("attrs" in node) {
|
||||
const type = node.attrs.type
|
||||
if (type === RTEItemTypeEnum.asset) {
|
||||
@@ -199,7 +274,12 @@ export const renderOptions: RenderOptions = {
|
||||
return null
|
||||
},
|
||||
|
||||
[RTETypeEnum.table]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.table]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<table key={node.uid} {...props}>
|
||||
@@ -208,7 +288,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.thead]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.thead]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<thead key={node.uid} {...props}>
|
||||
@@ -217,7 +302,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.tbody]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.tbody]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<tbody key={node.uid} {...props}>
|
||||
@@ -226,7 +316,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.tfoot]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.tfoot]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<tfoot key={node.uid} {...props}>
|
||||
@@ -235,7 +330,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.tr]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.tr]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<tr key={node.uid} {...props}>
|
||||
@@ -244,7 +344,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.th]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.th]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<th key={node.uid} {...props}>
|
||||
@@ -253,7 +358,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.td]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.td]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<td key={node.uid} {...props}>
|
||||
@@ -262,7 +372,12 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTETypeEnum.ul]: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
[RTETypeEnum.ul]: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
return (
|
||||
<ul key={node.uid} {...props}>
|
||||
@@ -309,7 +424,11 @@ export const renderOptions: RenderOptions = {
|
||||
)
|
||||
},
|
||||
|
||||
[RTEMarkType.classnameOrId]: (children: React.ReactNode, className?: string, id?: string) => {
|
||||
[RTEMarkType.classnameOrId]: (
|
||||
children: React.ReactNode,
|
||||
className?: string,
|
||||
id?: string
|
||||
) => {
|
||||
let props = {
|
||||
className,
|
||||
id,
|
||||
@@ -331,7 +450,12 @@ export const renderOptions: RenderOptions = {
|
||||
* Contentstack can return something called `default` as seen here in their
|
||||
* own SDK (https://github.com/contentstack/contentstack-utils-javascript/blob/master/src/options/default-node-options.ts#L89)
|
||||
*/
|
||||
default: (node: RTEDefaultNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => {
|
||||
default: (
|
||||
node: RTEDefaultNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => {
|
||||
return next(node.children, embeds, fullRenderOptions)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -6,22 +6,24 @@ import { RTETypeEnum } from "@/types/rte/enums"
|
||||
import type { EmbedByUid } from "@/types/components/jsontohtml"
|
||||
import type { Node } from "@/types/requests/utils/edges"
|
||||
import type { RenderOptions } from "@/types/rte/option"
|
||||
import type { RTENode, RTETextNode, RTERenderOptionComponent } from "@/types/rte/node"
|
||||
import type {
|
||||
RTENode,
|
||||
RTETextNode,
|
||||
RTERenderOptionComponent,
|
||||
} from "@/types/rte/node"
|
||||
import type { Embeds } from "@/types/requests/embeds"
|
||||
|
||||
export function groupEmbedsByUid(embedsArray: Node<Embeds>[]) {
|
||||
const embedsByUid = embedsArray
|
||||
.reduce<EmbedByUid>((acc, embed) => {
|
||||
if (embed.node.system.uid) {
|
||||
acc[embed.node.system.uid] = embed
|
||||
}
|
||||
return acc
|
||||
}, {})
|
||||
const embedsByUid = embedsArray.reduce<EmbedByUid>((acc, embed) => {
|
||||
if (embed.node.system.uid) {
|
||||
acc[embed.node.system.uid] = embed
|
||||
}
|
||||
return acc
|
||||
}, {})
|
||||
|
||||
return embedsByUid
|
||||
}
|
||||
|
||||
|
||||
export function nodeChildrenToHtml(
|
||||
nodes: RTENode[],
|
||||
embeds: EmbedByUid,
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
import { Lang, langEnum } from "@/types/lang";
|
||||
import { Lang, langEnum } from "@/types/lang"
|
||||
|
||||
export default function SkipToMainContent({ lang }: { lang: Lang }) {
|
||||
let message = "Skip to main content";
|
||||
let message = "Skip to main content"
|
||||
|
||||
switch (lang) {
|
||||
case langEnum.de:
|
||||
message = "Direkt zum Inhalt";
|
||||
break;
|
||||
message = "Direkt zum Inhalt"
|
||||
break
|
||||
case langEnum.sv:
|
||||
message = "Fortsätt till huvudinnehåll";
|
||||
break;
|
||||
message = "Fortsätt till huvudinnehåll"
|
||||
break
|
||||
case langEnum.da:
|
||||
message = "Spring over og gå til hovedindhold";
|
||||
break;
|
||||
message = "Spring over og gå til hovedindhold"
|
||||
break
|
||||
case langEnum.no:
|
||||
message = "Gå videre til hovedsiden";
|
||||
break;
|
||||
message = "Gå videre til hovedsiden"
|
||||
break
|
||||
case langEnum.fi:
|
||||
message = "Siirry pääsisältöön";
|
||||
break;
|
||||
message = "Siirry pääsisältöön"
|
||||
break
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -27,5 +27,5 @@ export default function SkipToMainContent({ lang }: { lang: Lang }) {
|
||||
{message}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { langEnum } from "@/types/lang";
|
||||
import { langEnum } from "@/types/lang"
|
||||
|
||||
export const localeToLang = {
|
||||
en: langEnum.en,
|
||||
@@ -38,4 +38,4 @@ export const localeToLang = {
|
||||
"nb-NO": langEnum.no,
|
||||
"nn-NO": langEnum.no,
|
||||
"se-NO": langEnum.no,
|
||||
};
|
||||
}
|
||||
|
||||
2
env/client.ts
vendored
2
env/client.ts
vendored
@@ -5,4 +5,4 @@ export const env = createEnv({
|
||||
client: {},
|
||||
emptyStringAsUndefined: true,
|
||||
runtimeEnv: {},
|
||||
});
|
||||
})
|
||||
|
||||
4
env/server.ts
vendored
4
env/server.ts
vendored
@@ -1,5 +1,5 @@
|
||||
import { createEnv } from "@t3-oss/env-nextjs"
|
||||
import { z } from "zod";
|
||||
import { z } from "zod"
|
||||
|
||||
export const env = createEnv({
|
||||
server: {
|
||||
@@ -23,4 +23,4 @@ export const env = createEnv({
|
||||
NODE_ENV: process.env.NODE_ENV,
|
||||
PRINT_QUERY: process.env.PRINT_QUERY,
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
@@ -11,4 +11,4 @@ fragment ContactAside on CurrentBlocksPageAsideContact {
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,4 +11,4 @@ fragment PuffAside on CurrentBlocksPageAsidePuff {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,4 @@ fragment PuffBlock on CurrentBlocksPageBlocksPuffs {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,4 +21,4 @@ fragment Contact on ContactBlock {
|
||||
street
|
||||
zip
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,4 +38,4 @@ fragment Puff on Puff {
|
||||
}
|
||||
}
|
||||
title
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import "server-only";
|
||||
import { request as graphqlRequest } from "graphql-request";
|
||||
import "server-only"
|
||||
import { request as graphqlRequest } from "graphql-request"
|
||||
|
||||
import { env } from "@/env/server";
|
||||
import { env } from "@/env/server"
|
||||
|
||||
import type { Data } from "@/types/request";
|
||||
import type { DocumentNode } from "graphql";
|
||||
import ContentstackLivePreview from "@contentstack/live-preview-utils";
|
||||
import type { Data } from "@/types/request"
|
||||
import type { DocumentNode } from "graphql"
|
||||
import ContentstackLivePreview from "@contentstack/live-preview-utils"
|
||||
|
||||
export async function previewRequest<T>(
|
||||
query: string | DocumentNode,
|
||||
@@ -33,7 +33,7 @@ export async function previewRequest<T>(
|
||||
|
||||
return { data: response }
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
throw new Error("Something went wrong");
|
||||
console.error(error)
|
||||
throw new Error("Something went wrong")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,10 @@ import { env } from "@/env/server"
|
||||
import type { Data } from "@/types/request"
|
||||
import type { DocumentNode } from "graphql"
|
||||
|
||||
export async function request<T>(query: string | DocumentNode, variables?: {}): Promise<Data<T>> {
|
||||
export async function request<T>(
|
||||
query: string | DocumentNode,
|
||||
variables?: {}
|
||||
): Promise<Data<T>> {
|
||||
try {
|
||||
if (env.PRINT_QUERY) {
|
||||
const graphqlRawRequest = (await import("graphql-request")).rawRequest
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import ContentstackLivePreview from "@contentstack/live-preview-utils";
|
||||
import { NextResponse } from "next/server";
|
||||
import type { NextRequest } from "next/server";
|
||||
import ContentstackLivePreview from "@contentstack/live-preview-utils"
|
||||
import { NextResponse } from "next/server"
|
||||
import type { NextRequest } from "next/server"
|
||||
|
||||
// This function can be marked `async` if using `await` inside
|
||||
export async function middleware(request: NextRequest) {
|
||||
@@ -69,4 +69,4 @@ export const config = {
|
||||
*/
|
||||
"/((?!api|_next/static|_next/image|Static|imageVault|contentassets|favicon.ico).*)",
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"content": "<input id=\"lbl-personalized-areas\" name=\"lbl-personalized-areas\" type=\"hidden\" value=\"\"><div class=\"subnav-mobile hidden-small hidden-medium hidden-large\"><nav class=\"u-flex\"><ul class=\"breadcrumb-list hidden-small hidden-medium hidden-large\"><li class=\"breadcrumb-list__parent hidden-medium hidden-large\"><a href=\"https://www.scandichotels.de/scandic-entdecken\">Scandic entdecken</a></li><li class=\"breadcrumb-list__body\"><a href=\"https://www.scandichotels.de/scandic-entdecken\">Scandic entdecken</a></li><li class=\"breadcrumb-list__body\"><span>WLAN</span></li></ul></nav></div><div class=\"big-sidebar-wrapper\" data-js=\"big-sidebar\"><div class=\"l-section l-section--highlight-in-mobile l-section--has-sidebar big-sidebar-wrapper__main-secondary\" data-js=\"big-sidebar-main-first\"><div class=\"l-section__inner l-section__inner--content\"><div class=\"l-combo-main-sidebar-small\"><div class=\"l-combo-main-sidebar-small__main l-combo-main-sidebar-small__main--content\"><nav class=\"u-flex\"><ul class=\"breadcrumb-list hidden-xsmall hidden-xxsmall\" itemprop=\"breadcrumb\"><li class=\"breadcrumb-list__parent hidden-medium hidden-large\"><a href=\"https://www.scandichotels.de/scandic-entdecken\">Scandic entdecken</a></li><li class=\"breadcrumb-list__body\"><a href=\"https://www.scandichotels.de/scandic-entdecken\">Scandic entdecken</a></li><li class=\"breadcrumb-list__body\"><span>WLAN</span></li></ul></nav><h1>Gratis WLAN ist eine Selbstverständlichkeit</h1><p class=\"preamble\">Gratis WLAN ist selbstverständlich immer inklusive, wenn Sie bei uns übernachten. Dies gehört für uns genauso dazu, wie Kopfkissen auf den Betten. Sie können sich jederzeit kostenlos und stressfrei mit dem Internet verbinden. Dazu benötigen Sie weder eine Anleitung, noch einen Code. </p></div></div></div></div><div class=\"l-section l-section--content l-section--has-sidebar\"><div class=\"l-section__inner l-section__inner--content-spaced\"><div class=\"l-combo-main-sidebar-small big-sidebar-wrapper__main-primary\" data-js=\"big-sidebar-main-second\" style=\"min-height: 328.531px;\"><div class=\"l-combo-main-sidebar-small__main l-combo-main-sidebar-small__main--content editable-area\" id=\"mainbody_personalized\"><h2>Gehen Sie schnell und sicher online</h2><p>Klicken Sie im Broweser einfach nur auf \"Click to connect\" nachdem Sie sich mit unserem ScandicEasy WLAN verbunden haben. Dies gilt für alle unsere Gäste, egal ob Sie bei uns übernachten oder nur kurz in der Lobby vorbeischauen, um eine Weile zu arbeiten.</p></div></div><div id=\"mainarea_personalized\"></div></div></div><div class=\"big-sidebar-wrapper__sidebar-section\" data-js=\"big-sidebar-sidebar\"><div class=\"l-section l-section--has-sidebar l-section--transparent\"><div class=\"l-section__inner l-section__inner--collapse\"><div class=\"big-sidebar-wrapper__sidebar-section__sidebar\" id=\"sidebar_personalized\" style=\"margin-top:325px;\"><div><div><a href=\"https://www.scandichotels.de/scandic-entdecken/checken-sie-online-aus\" class=\"content-teaser--action\"><div class=\"content-teaser \"><div class=\"media-container media-container--3x2\"><img class=\"media-container__media lazyload\" title=\"Urheberrecht: Petra Bindel\" alt=\"ccc, spring 2014, Rubinen, lobby, reception, check out, mobile\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-srcset=\"\t\t /imageVault/publishedmedia/vvkwpbhjheng3oc488wz/PB_scandicrubinen_lobbyreception_1_0087.jpg 320w, \t\t /imageVault/publishedmedia/zmy924z3ww9orp03293d/PB_scandicrubinen_lobbyreception_1_0087.jpg 480w, \t\t /imageVault/publishedmedia/k6k0ponsxvdec41s8ecs/PB_scandicrubinen_lobbyreception_1_0087.jpg 640w\" sizes=\"(min-width: 1200px) 320px, (min-width: 950px) calc((100vw - (4 * 20px)) / 4), (min-width: 740px) calc((100vw - (3 * 20px)) / 3), 100vw\" srcset=\"\t\t /imageVault/publishedmedia/vvkwpbhjheng3oc488wz/PB_scandicrubinen_lobbyreception_1_0087.jpg 320w, \t\t /imageVault/publishedmedia/zmy924z3ww9orp03293d/PB_scandicrubinen_lobbyreception_1_0087.jpg 480w, \t\t /imageVault/publishedmedia/k6k0ponsxvdec41s8ecs/PB_scandicrubinen_lobbyreception_1_0087.jpg 640w\" /></div><div class=\"content-teaser__body\"><div class=\"content-teaser__body-wrapper\"><h3 class=\"content-teaser__heading content-teaser__heading--link\">Online Check-out bei Scandic</h3></div><div class=\"content-teaser__text\"><p>Wir machen Ihre Abreise einfach und schnell</p></div></div></div></a></div></div></div></div></div></div></div><div class=\"l-section\"><input id=\"lbl-pageurl\" name=\"lbl-pageurl\" type=\"hidden\" value=\"/scandic-entdecken/wlan/getpersonalizeddata/\"></div><div id=\"bottomarea_personalized\"><nav class=\"tag-section\"><ul class=\"tag-section__list\"></ul></nav></div><div class=\"l-section\"></div>",
|
||||
"hero": "<div class=\"hero-content-overlay__img-container\"><div class=\"hero-fixed hero-fixed--deemphasized\" style=\"margin-top: 0px;\"><div class=\"hero\" style=\"top: 113px;\"><div class=\"hero__img-container\"><picture onload=\"\"><source class=\"\" title=\"Urheberrecht: Linda Alfvengren\" media=\"(min-width: 1200px)\" srcset=\"/imageVault/publishedmedia/pxcfhclztnlvv99rzfum/Scandic-Woman-Mobile.jpg 1600w\" /><source class=\"\" title=\"Urheberrecht: Linda Alfvengren\" srcset=\"/imageVault/publishedmedia/bbj24rhvynyb41it4quh/Scandic-Woman-Mobile.jpg 1024w\" /></picture><div id=\"full-width-slider\" class=\"royalSlider royalSlider--hero rsDefault rsHor rsFade rsWithBullets\" data-js=\"hero-slider\" tabindex=\"0\" aria-label=\"Carousel. Change slides with keyboard left and right arrows.\" style=\"touch-action: pan-y;\"><div class=\"rsOverflow\" style=\"width: 1556px; height: 650px;\"><div class=\"rsContainer\"><div style=\"z-index:0;\" class=\"rsSlide \"><picture onload=\"\" style=\"visibility: visible; opacity: 1; transition: opacity 400ms ease-in-out 0s;\"><source class=\"\" title=\"Urheberrecht: Linda Alfvengren\" media=\"(min-width: 1200px)\" srcset=\"/imageVault/publishedmedia/pxcfhclztnlvv99rzfum/Scandic-Woman-Mobile.jpg 1600w\" /><source class=\"\" title=\"Urheberrecht: Linda Alfvengren\" srcset=\"/imageVault/publishedmedia/bbj24rhvynyb41it4quh/Scandic-Woman-Mobile.jpg 1024w\" /><img class=\"hero__image rsImg-x hero__image--full-width \" data-aspectratio=\"1.50\" title=\"Urheberrecht: Linda Alfvengren\" alt=\"woman in couch at scandic hotels\" srcset=\"/imageVault/publishedmedia/bbj24rhvynyb41it4quh/Scandic-Woman-Mobile.jpg 1024w, /imageVault/publishedmedia/pxcfhclztnlvv99rzfum/Scandic-Woman-Mobile.jpg 1600w\" src=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"></picture></div></div><div class=\"rsArrow rsArrowLeft\" style=\"display: none;\"><div class=\"rsArrowIcn\" tabindex=\"0\"></div></div><div class=\"rsArrow rsArrowRight\" style=\"display: none;\"><div class=\"rsArrowIcn\" tabindex=\"0\"></div></div></div><div class=\"rsNav rsBullets\"><div class=\"rsNavItem rsBullet rsNavSelected\"><span></span></div></div></div></div></div></div></div>"
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"content": "<input id=\"lbl-personalized-areas\" name=\"lbl-personalized-areas\" type=\"hidden\" value=\"\" /><div class=\"subnav-mobile hidden-small hidden-medium hidden-large\"><nav class=\"u-flex\"><ul class=\"breadcrumb-list hidden-small hidden-medium hidden-large\"><li class=\"breadcrumb-list__parent hidden-medium hidden-large\"><a href=\"https://www.scandichotels.dk/kundeservice/sporsmal-og-svar\">Vanlige spørsmål</a></li><li class=\"breadcrumb-list__body\"><a href=\"https://www.scandichotels.dk/kundeservice\">Kundeservice</a></li><li class=\"breadcrumb-list__body\"><a href=\"https://www.scandichotels.dk/kundeservice/sporsmal-og-svar\">Vanlige spørsmål</a></li><li class=\"breadcrumb-list__body\"><span>Om Scandic-nettstedet</span></li></ul></nav></div><div class=\"big-sidebar-wrapper\" data-js=\"big-sidebar\"><div class=\"l-section l-section--highlight-in-mobile l-section--has-sidebar big-sidebar-wrapper__main-secondary\" data-js=\"big-sidebar-main-first\"><div class=\"l-section__inner l-section__inner--content\"><div class=\"l-combo-main-sidebar-small\"><div class=\"l-combo-main-sidebar-small__main l-combo-main-sidebar-small__main--content\"><nav class=\"u-flex\"><ul class=\"breadcrumb-list hidden-xsmall hidden-xxsmall\" itemprop=\"breadcrumb\"><li class=\"breadcrumb-list__parent hidden-medium hidden-large\"><a href=\"https://www.scandichotels.dk/kundeservice/sporsmal-og-svar\">Vanlige spørsmål</a></li><li class=\"breadcrumb-list__body\"><a href=\"https://www.scandichotels.dk/kundeservice\">Kundeservice</a></li><li class=\"breadcrumb-list__body\"><a href=\"https://www.scandichotels.dk/kundeservice/sporsmal-og-svar\">Vanlige spørsmål</a></li><li class=\"breadcrumb-list__body\"><span>Om Scandic-nettstedet</span></li></ul></nav><h1>Scandic-nettstedet – spørsmål og svar</h1><p class=\"preamble\"></p></div></div></div></div><div class=\"l-section l-section--content l-section--has-sidebar\"><div class=\"l-section__inner l-section__inner--content-spaced\"><div class=\"l-combo-main-sidebar-small big-sidebar-wrapper__main-primary\" data-js=\"big-sidebar-main-second\" style=\"min-height: 0.406px;\"><div class=\"l-combo-main-sidebar-small__main l-combo-main-sidebar-small__main--content editable-area\" id=\"mainbody_personalized\"><h2>Om Scandic-nettstedet</h2><h3>Hvor oppdatert og aktuell er informasjonen på Scandic-nettstedet?</h3><p>Vi gjennomgår og oppdaterer informasjonen på scandichotels.com kontinuerlig, for å sikre at den er så nøyaktig og oppdatert som mulig.</p><h3>Er nettstedet sikkert?</h3><p>Hos Scandic gjør vi alt vi kan for å opprettholde våre kunders personvern og sikkerhet når de gjør en internettbestilling. Dette inkluderer å sikre at betalingskortdetaljer og annen personlig informasjon er kryptert og beskyttet.</p><p>Bruker Scandic-nettstedet informasjonskapsler?</p><p>Ja, nettstedet vårt bruker informasjonskapsler.</p></div></div><div id=\"mainarea_personalized\"></div></div></div><div class=\"big-sidebar-wrapper__sidebar-section\" data-js=\"big-sidebar-sidebar\"><div class=\"l-section l-section--has-sidebar l-section--transparent\"><div class=\"l-section__inner l-section__inner--collapse\"><div class=\"big-sidebar-wrapper__sidebar-section__sidebar\" id=\"sidebar_personalized\" style=\"margin-top:186px;\"></div></div></div></div></div><div class=\"l-section\"><input id=\"lbl-pageurl\" name=\"lbl-pageurl\" type=\"hidden\" value=\"/kundeservice/sporsmal-og-svar/bruk-av-nettsiden/getpersonalizeddata/\" /></div><div id=\"bottomarea_personalized\"><nav class=\"tag-section\"><ul class=\"tag-section__list\"></ul></nav></div><div class=\"l-section\"></div>",
|
||||
"hero": "<div class=\"hero-content-overlay__img-container\"></div>"
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"content": "<input id=\"lbl-personalized-areas\" name=\"lbl-personalized-areas\" type=\"hidden\" value=\"\" /><div class=\"subnav-mobile hidden-small hidden-medium hidden-large\"><nav class=\"u-flex\"><ul class=\"breadcrumb-list hidden-small hidden-medium hidden-large\"><li class=\"breadcrumb-list__parent hidden-medium hidden-large\"><a href=\"https://www.scandichotels.se/kundservice/fragor-och-svar\">Frågor och svar</a></li><li class=\"breadcrumb-list__body\"><a href=\"https://www.scandichotels.se/kundservice\">Kundservice</a></li><li class=\"breadcrumb-list__body\"><a href=\"https://www.scandichotels.se/kundservice/fragor-och-svar\">Frågor och svar</a></li><li class=\"breadcrumb-list__body\"><span>Om Scandics webbplats</span></li></ul></nav></div><div class=\"big-sidebar-wrapper\" data-js=\"big-sidebar\"><div class=\"l-section l-section--highlight-in-mobile l-section--has-sidebar big-sidebar-wrapper__main-secondary\" data-js=\"big-sidebar-main-first\"><div class=\"l-section__inner l-section__inner--content\"><div class=\"l-combo-main-sidebar-small\"><div class=\"l-combo-main-sidebar-small__main l-combo-main-sidebar-small__main--content\"><nav class=\"u-flex\"><ul class=\"breadcrumb-list hidden-xsmall hidden-xxsmall\" itemprop=\"breadcrumb\"><li class=\"breadcrumb-list__parent hidden-medium hidden-large\"><a href=\"https://www.scandichotels.se/kundservice/fragor-och-svar\">Frågor och svar</a></li><li class=\"breadcrumb-list__body\"><a href=\"https://www.scandichotels.se/kundservice\">Kundservice</a></li><li class=\"breadcrumb-list__body\"><a href=\"https://www.scandichotels.se/kundservice/fragor-och-svar\">Frågor och svar</a></li><li class=\"breadcrumb-list__body\"><span>Om Scandics webbplats</span></li></ul></nav><h1>Scandics webbplats - frågor och svar</h1><p class=\"preamble\"></p></div></div></div></div><div class=\"l-section l-section--content l-section--has-sidebar\"><div class=\"l-section__inner l-section__inner--content-spaced\"><div class=\"l-combo-main-sidebar-small big-sidebar-wrapper__main-primary\" data-js=\"big-sidebar-main-second\" style=\"min-height: 0.406px;\"><div class=\"l-combo-main-sidebar-small__main l-combo-main-sidebar-small__main--content editable-area\" id=\"mainbody_personalized\"><h2>Om Scandics webbplats</h2><h5>Hur uppdaterad och aktuell är informationen som finns på Scandics hemsida?</h5><p>Vi ser kontinuerligt över den information som finns på scandichotels.se för att säkerställa att den är så riktig och uppdaterad som möjligt.</p><h5>Är webbplatsen säker?</h5><p>Scandic gör allt för att upprätthålla sekretessen och tryggheten för våra kunder vid ett köp online. Detta inkluderar att säkerställa att dina kreditkortsuppgifter och annan personlig information är ordentligt krypterade och skyddade.</p><h5>Använder Scandics webbplats cookies?</h5><p>Ja, vår webbplats använder cookies.</p></div></div><div id=\"mainarea_personalized\"></div></div></div><div class=\"big-sidebar-wrapper__sidebar-section\" data-js=\"big-sidebar-sidebar\"><div class=\"l-section l-section--has-sidebar l-section--transparent\"><div class=\"l-section__inner l-section__inner--collapse\"><div class=\"big-sidebar-wrapper__sidebar-section__sidebar\" id=\"sidebar_personalized\" style=\"margin-top:186px;\"></div></div></div></div></div><div class=\"l-section\"><input id=\"lbl-pageurl\" name=\"lbl-pageurl\" type=\"hidden\" value=\"/kundservice/fragor-och-svar/om-scandics-webbplats/getpersonalizeddata/\" /></div><div id=\"bottomarea_personalized\"><nav class=\"tag-section\"><ul class=\"tag-section__list\"></ul></nav></div><div class=\"l-section\"></div>",
|
||||
"hero": "<div class=\"hero-content-overlay__img-container\"></div>"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import createJiti from "jiti"
|
||||
|
||||
const jiti = createJiti(new URL(import.meta.url).pathname);
|
||||
const jiti = createJiti(new URL(import.meta.url).pathname)
|
||||
|
||||
jiti("./env/server");
|
||||
jiti("./env/client");
|
||||
jiti("./env/server")
|
||||
jiti("./env/client")
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
@@ -22,11 +22,11 @@ const nextConfig = {
|
||||
config.module.rules.push({
|
||||
test: /\.(graphql|gql)/,
|
||||
exclude: /node_modules/,
|
||||
loader: "graphql-tag/loader"
|
||||
});
|
||||
loader: "graphql-tag/loader",
|
||||
})
|
||||
|
||||
return config;
|
||||
}
|
||||
};
|
||||
return config
|
||||
},
|
||||
}
|
||||
|
||||
export default nextConfig
|
||||
export default nextConfig
|
||||
|
||||
@@ -34,4 +34,4 @@
|
||||
"engines": {
|
||||
"node": "18"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2022",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"ES2022"
|
||||
],
|
||||
"lib": ["dom", "dom.iterable", "ES2022"],
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"skipLibCheck": true,
|
||||
@@ -25,18 +21,9 @@
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"./*"
|
||||
]
|
||||
"@/*": ["./*"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".next/types/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export type HeaderProps = {
|
||||
pathname: string;
|
||||
};
|
||||
pathname: string
|
||||
}
|
||||
|
||||
@@ -4,4 +4,4 @@ export type HeroProps = {
|
||||
images: {
|
||||
node: Image
|
||||
}[]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { RTENode } from "../rte/node"
|
||||
|
||||
import type { Node } from "@/types/requests/utils/edges";
|
||||
import type { RenderOptions } from "../rte/option";
|
||||
import type { Embeds } from "@/types/requests/embeds";
|
||||
import type { Node } from "@/types/requests/utils/edges"
|
||||
import type { RenderOptions } from "../rte/option"
|
||||
import type { Embeds } from "@/types/requests/embeds"
|
||||
|
||||
export type JsonToHtmlProps = {
|
||||
embeds: Node<Embeds>[]
|
||||
|
||||
2
types/graphql.d.ts
vendored
2
types/graphql.d.ts
vendored
@@ -1 +1 @@
|
||||
declare module '*.graphql'
|
||||
declare module "*.graphql"
|
||||
|
||||
@@ -5,6 +5,6 @@ export const langEnum = {
|
||||
fi: "fi",
|
||||
da: "da",
|
||||
de: "de",
|
||||
};
|
||||
}
|
||||
|
||||
export type Lang = keyof typeof langEnum;
|
||||
export type Lang = keyof typeof langEnum
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
import { Lang } from './lang';
|
||||
import { Lang } from "./lang"
|
||||
|
||||
export type SearchParams<S = {}> = {
|
||||
searchParams: S & { [key: string]: string };
|
||||
};
|
||||
searchParams: S & { [key: string]: string }
|
||||
}
|
||||
|
||||
export type Params<P = {}> = {
|
||||
params: P;
|
||||
};
|
||||
params: P
|
||||
}
|
||||
|
||||
export type LangParams = {
|
||||
lang: Lang;
|
||||
};
|
||||
lang: Lang
|
||||
}
|
||||
|
||||
export type UriParams = {
|
||||
uri?: string;
|
||||
};
|
||||
uri?: string
|
||||
}
|
||||
|
||||
export type PreviewParams = {
|
||||
uri?: string
|
||||
live_preview?: string
|
||||
}
|
||||
|
||||
export type LayoutArgs<P = undefined> = P extends undefined ? {} : Params<P>;
|
||||
export type LayoutArgs<P = undefined> = P extends undefined ? {} : Params<P>
|
||||
|
||||
export type PageArgs<P = undefined, S = undefined> = LayoutArgs<P> &
|
||||
(S extends undefined ? {} : SearchParams<S>);
|
||||
(S extends undefined ? {} : SearchParams<S>)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export type Data<T> = {
|
||||
data: T
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,5 +64,4 @@ export type List = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export type ListProps = List
|
||||
|
||||
@@ -20,4 +20,4 @@ export type Puff = {
|
||||
json: RTEDocument
|
||||
}
|
||||
title: string
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export type AllRequestResponse<T> = {
|
||||
items: T[]
|
||||
total: number
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ export interface Attributes {
|
||||
}
|
||||
|
||||
export interface RTEAssetAttrs extends Attributes {
|
||||
"alt": string
|
||||
alt: string
|
||||
"asset-alt": string
|
||||
"asset-link": string
|
||||
"asset-name": string
|
||||
@@ -17,8 +17,8 @@ export interface RTEAssetAttrs extends Attributes {
|
||||
"asset-uid": string
|
||||
"display-type": EmbedTypesEnum.display
|
||||
"content-type-uid": "sys_assets"
|
||||
"inline": false
|
||||
"type": RTEItemTypeEnum.asset
|
||||
inline: false
|
||||
type: RTEItemTypeEnum.asset
|
||||
}
|
||||
|
||||
export interface RTEAnchorAttrs extends Attributes {
|
||||
@@ -27,10 +27,10 @@ export interface RTEAnchorAttrs extends Attributes {
|
||||
}
|
||||
|
||||
export interface RTELinkAttrs extends Attributes {
|
||||
'display-type': EmbedTypesEnum.link
|
||||
'class-name': string
|
||||
'content-type-uid': string
|
||||
'entry-uid': string
|
||||
"display-type": EmbedTypesEnum.link
|
||||
"class-name": string
|
||||
"content-type-uid": string
|
||||
"entry-uid": string
|
||||
locale: Lang
|
||||
href: string
|
||||
target: HTMLAnchorElement["target"]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
export enum EmbedTypesEnum {
|
||||
block = 'block',
|
||||
display = 'display',
|
||||
download = 'download',
|
||||
inline = 'inline',
|
||||
link = 'link',
|
||||
block = "block",
|
||||
display = "display",
|
||||
download = "download",
|
||||
inline = "inline",
|
||||
link = "link",
|
||||
}
|
||||
|
||||
export type EmbedTypes = keyof typeof EmbedTypesEnum
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
import { RTETypeEnum } from "./enums"
|
||||
import type { Attributes, RTEAnchorAttrs, RTEAssetAttrs, RTELinkAttrs } from "./attrs"
|
||||
import type {
|
||||
Attributes,
|
||||
RTEAnchorAttrs,
|
||||
RTEAssetAttrs,
|
||||
RTELinkAttrs,
|
||||
} from "./attrs"
|
||||
import type { EmbedByUid } from "../components/jsontohtml"
|
||||
import type { RenderOptions } from "./option"
|
||||
|
||||
@@ -58,14 +63,26 @@ export type RTEReferenceNode = RTEDefaultNode | RTEAnchorNode
|
||||
|
||||
export type RTENode = RTERegularNode | RTEReferenceNode | RTETextNode
|
||||
|
||||
export type RTERenderMark = (children: React.ReactNode, classname?: string, id?: string) => JSX.Element
|
||||
export type RTERenderMark = (
|
||||
children: React.ReactNode,
|
||||
classname?: string,
|
||||
id?: string
|
||||
) => JSX.Element
|
||||
|
||||
export interface RTEDocument extends RTEDefaultNode {
|
||||
type: RTETypeEnum.doc
|
||||
_version: number
|
||||
}
|
||||
|
||||
export type RTERenderOptionComponent = (node: RTERegularNode, embeds: EmbedByUid, next: RTENext, fullRenderOptions: RenderOptions) => React.ReactNode
|
||||
|
||||
export type RTENext = (nodes: RTENode[], embeds: EmbedByUid, fullRenderOptions: RenderOptions) => string
|
||||
export type RTERenderOptionComponent = (
|
||||
node: RTERegularNode,
|
||||
embeds: EmbedByUid,
|
||||
next: RTENext,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => React.ReactNode
|
||||
|
||||
export type RTENext = (
|
||||
nodes: RTENode[],
|
||||
embeds: EmbedByUid,
|
||||
fullRenderOptions: RenderOptions
|
||||
) => string
|
||||
|
||||
Reference in New Issue
Block a user