diff --git a/public/css/bazaar.css b/public/css/bazaar.css new file mode 100644 index 0000000..57bfe00 --- /dev/null +++ b/public/css/bazaar.css @@ -0,0 +1,119 @@ +/* ============================================================ + public/css/bazaar.css +============================================================ */ + +/* ── Haupt-Layout ────────────────────────── */ +.mp-wrap { + display: flex; + width: 100%; + max-width: 100%; + height: 100%; + font-family: "Cinzel", serif; + overflow: hidden; + box-sizing: border-box; +} + +/* ── Linke Tab-Leiste ────────────────────── */ +.mp-tabs { + display: flex; + flex-direction: column; + gap: 6px; + padding: 16px 10px; + background: rgba(0,0,0,0.3); + border-right: 2px solid #6b4b2a; + min-width: 150px; + flex-shrink: 0; + overflow-y: auto; +} + +.mp-tab { + display: flex; + align-items: center; + gap: 8px; + padding: 10px 12px; + background: linear-gradient(135deg, #2a1a08, #1a0f04); + border: 2px solid #6b4b2a; + border-radius: 8px; + color: #c8a86a; + font-family: "Cinzel", serif; + font-size: 12px; + font-weight: 600; + cursor: pointer; + transition: all 0.2s; + text-align: left; + white-space: nowrap; +} +.mp-tab:hover { + color: #f0d9a6; + filter: brightness(1.2); +} +.mp-tab.mp-tab-active { + color: #fff !important; + border-color: #f0d060 !important; + background: linear-gradient(135deg, #4a3010, #2a1a08) !important; + box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 0 14px rgba(200,160,60,0.3); +} + +.mp-tab-dot { + width: 10px; + height: 10px; + border-radius: 50%; + flex-shrink: 0; + border: 1px solid rgba(255,255,255,0.3); + background: #8b6a3c; +} +.mp-tab-active .mp-tab-dot { + background: #f0d060; + border-color: #f0d060; +} + +/* ── Inhalts-Bereich ─────────────────────── */ +.mp-content { + flex: 1; + min-width: 0; + overflow: hidden; + display: flex; + flex-direction: column; +} + +.mp-panel { + display: none; + flex: 1; + flex-direction: column; + overflow: hidden; +} +.mp-panel.active { + display: flex; +} + +/* ── Panel-Header ────────────────────────── */ +.mp-col-header { + font-family: "Cinzel", serif; + font-size: 15px; + font-weight: 700; + color: #f0d9a6; + letter-spacing: 1px; + text-transform: uppercase; + padding: 10px 20px; + background: linear-gradient(#3a2810cc, #1a0f04cc); + border-bottom: 2px solid #6b4b2a; + flex-shrink: 0; +} + +/* ── Panel-Body ──────────────────────────── */ +.mp-body { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + overflow-y: auto; + padding: 20px; +} + +.mp-coming-soon { + font-family: "Cinzel", serif; + font-size: 16px; + color: #8b6a3c; + letter-spacing: 2px; + opacity: 0.7; +} diff --git a/public/js/quickmenu/bazaar.js b/public/js/quickmenu/bazaar.js index 2e9651d..3d95850 100644 --- a/public/js/quickmenu/bazaar.js +++ b/public/js/quickmenu/bazaar.js @@ -1,8 +1,79 @@ -export async function loadBazaar() { +/* ============================================================ + public/js/quickmenu/bazaar.js + Marktplatz – Tab-Layout (wie Gaststätte) +============================================================ */ + +let baz_initialized = false; + +export async function loadBazaar() { const body = document.getElementById("qm-body-basar"); if (!body) return; + if (baz_initialized) return; + baz_initialized = true; + + /* CSS einmalig laden */ + if (!document.querySelector('link[href="/css/bazaar.css"]')) { + const link = document.createElement("link"); + link.rel = "stylesheet"; + link.href = "/css/bazaar.css"; + document.head.appendChild(link); + } + body.innerHTML = ` -

Inhalt folgt...

+
+ + + + + +
+ +
+
Händler
+
+ Demnächst verfügbar… +
+
+ +
+
Auktionen
+
+ Demnächst verfügbar… +
+
+ +
+
Tauschbörse
+
+ Demnächst verfügbar… +
+
+ +
+
`; + + /* Tab-Klick */ + body.querySelectorAll(".mp-tab").forEach((btn) => { + btn.addEventListener("click", () => { + body.querySelectorAll(".mp-tab").forEach((t) => t.classList.remove("mp-tab-active")); + body.querySelectorAll(".mp-panel").forEach((p) => p.classList.remove("active")); + btn.classList.add("mp-tab-active"); + document.getElementById(btn.dataset.tab)?.classList.add("active"); + }); + }); }