Browse code

Update

Benjamin Roth authored on05/02/2026 17:13:25
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,19 @@
1
+import { LitElement, html, css } from 'lit';
2
+
3
+export class WinzerHeader extends LitElement {
4
+    static properties = { mainTitle: { type: String, attribute: 'main-title' }, subTitle: { type: String, attribute: 'sub-title' } };
5
+    static styles = css`
6
+        :host { display: block; background: var(--bg-white); padding: 10px 20px; border-bottom: 1px solid var(--border-color); }
7
+        .top-bar { display: flex; align-items: center; justify-content: space-between; height: 60px; }
8
+        .logo-placeholder { border: 1px solid var(--primary-color); width: 40px; height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 8px; color: var(--primary-color); font-weight: bold; line-height: 1; }
9
+        .title-group { text-align: center; }
10
+        .main-title { color: var(--primary-color); font-weight: bold; font-size: 1rem; text-transform: uppercase; }
11
+        .sub-title { font-size: 0.9rem; color: var(--primary-color); }
12
+        .user-icon { width: 32px; height: 32px; color: var(--text-main); cursor: pointer; }
13
+    `;
14
+    _handleUserClick() { this.dispatchEvent(new CustomEvent('user-click', { bubbles: true, composed: true })); }
15
+    render() {
16
+        return html`<div class="top-bar"><div class="logo-placeholder"><span>luumi</span><span>CORE</span></div><div class="title-group"><div class="main-title">${this.mainTitle || ''}</div><div class="sub-title">${this.subTitle || ''}</div></div><svg class="user-icon" @click="${this._handleUserClick}" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="2" d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4" fill="none" stroke="currentColor" stroke-width="2"/></svg></div>`;
17
+    }
18
+}
19
+customElements.define('winzer-header', WinzerHeader);