{ const template = ` `; const css1 = ` :root { --backgroundColor: #f2f2f2; --headerFontColor: #0570B4; } body { background-color: var(--backgroundColor); } h1, h2, h3, h4 { color: var(--headerFontColor); } .posts-filter { display: flex; justify-content: flex-start; border-bottom: 1px solid #dee2e6; } .posts-filter-button { position: relative; padding: 0.65rem 1rem; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: transparent; color: #5c6770; font: inherit; font-weight: 600; cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease; } .posts-filter-button:hover { color: var(--headerFontColor); } .posts-filter-button.is-active { border-bottom-color: var(--headerFontColor); color: var(--headerFontColor); } .posts-filter-button:focus-visible { outline: 2px solid var(--headerFontColor); outline-offset: -2px; } .posts-filter-new { margin-right: 2.75rem; } .posts-filter-count { position: absolute; top: 25%; right: -25%; display: inline-flex; width: 1.65rem; height: 1.65rem; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(180deg, #0570B4 0%, #00A1FF 100%); color: #fff; font-size: 1rem; font-weight: 900; line-height: 1; transform: translateY(-50%); } .posts-filter-count[hidden] { display: none; } `; const css2 = ` footer { padding: 1em 0; background-color: var(--headerFontColor); color: var(--backgroundColor); } footer ul { max-width: 500px; display: flex; flex-wrap: wrap; justify-content: space-around; white-space: nowrap; padding: 0; margin: 0 auto; list-style: none; opacity: 0.7; } a { margin: 0 1em; text-decoration: none; color: var(--backgroundColor); } `; window.customElements.define( "footer-app", class extends HTMLElement { // static observedAttributes = ["attribut1", "attribut2", "attribut3"]; constructor() { super(); this.attachShadow({ mode: "open" }); this.shadowRoot.innerHTML = template; this.shadowRoot.adoptedStyleSheets = [css1, css2].map(css => ((sheet => (sheet.replaceSync(css), sheet))(new CSSStyleSheet()))); } // connectedCallback() {} // attributeChangedCallback(name, oldValue, newValue) {} } ); }