diff --git a/src/components/header/Header.js b/src/components/header/Header.js index 3b0313a3..94b93006 100644 --- a/src/components/header/Header.js +++ b/src/components/header/Header.js @@ -1,12 +1,12 @@ -import { html, LitElement, nothing } from "lit" -import { unsafeHTML } from "lit/directives/unsafe-html.js" +import { html, LitElement } from "lit" import { styleMap } from "lit/directives/style-map.js" +/** @ts-ignore */ import headerStyles from "./header.css" +/** @ts-ignore */ import gridStyles from "../../styles/grid.css" +/** @ts-ignore */ import headingsStyles from "../../styles/headings.css" -import "../chip/leu-chip-link.js" -import "../breadcrumb/leu-breadcrumb.js" // links: // top topics chip: https://www.zh.ch/de/gesundheit.html @@ -34,47 +34,13 @@ export class LeuHeader extends LitElement { static styles = [gridStyles, headingsStyles, headerStyles] static properties = { - pageTitle: { type: String }, - subtitle: { type: String }, - breadcrumb: { type: Array }, - topTopics: { type: Array }, - color: { type: String }, + backgroundColor: { type: String }, } constructor() { super() - /** @type {Array} */ - this.breadcrumb = null - /** @type {string} */ - this.subtitle = null - /** @type {Array} */ - this.topTopics = null - /** @type {string} */ - this.color = "white" - } - - renderTopTopics() { - return html` -
${this.subtitle}
` + /** @type {"blue" | "darkblue" | "turquoise" | "green" | "bordeaux" | "magenta" | "violet" | "gray" | "white"} */ + this.backgroundColor = "white" } renderLogo() { @@ -82,7 +48,8 @@ export class LeuHeader extends LitElement { +${lead}
` +} + +function Template({ pageTitle, color, breadcrumbs, lead, chips }) { + const inverted = color !== "white" return html` -