strzikjs
This commit is contained in:
parent
5414d0d70d
commit
8c6151214e
119
public/css/bazaar.css
Normal file
119
public/css/bazaar.css
Normal file
@ -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;
|
||||||
|
}
|
||||||
@ -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");
|
const body = document.getElementById("qm-body-basar");
|
||||||
if (!body) return;
|
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 = `
|
body.innerHTML = `
|
||||||
<p>Inhalt folgt...</p>
|
<div class="mp-wrap">
|
||||||
|
|
||||||
|
<!-- Linke Tab-Leiste -->
|
||||||
|
<aside class="mp-tabs" id="mp-tabs">
|
||||||
|
<button class="mp-tab mp-tab-active" data-tab="mp-content-1">
|
||||||
|
<span class="mp-tab-dot"></span>
|
||||||
|
<span>Händler</span>
|
||||||
|
</button>
|
||||||
|
<button class="mp-tab" data-tab="mp-content-2">
|
||||||
|
<span class="mp-tab-dot"></span>
|
||||||
|
<span>Auktionen</span>
|
||||||
|
</button>
|
||||||
|
<button class="mp-tab" data-tab="mp-content-3">
|
||||||
|
<span class="mp-tab-dot"></span>
|
||||||
|
<span>Tauschbörse</span>
|
||||||
|
</button>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<!-- Inhalts-Bereich -->
|
||||||
|
<div class="mp-content">
|
||||||
|
|
||||||
|
<div class="mp-panel active" id="mp-content-1">
|
||||||
|
<div class="mp-col-header">Händler</div>
|
||||||
|
<div class="mp-body">
|
||||||
|
<span class="mp-coming-soon">Demnächst verfügbar…</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mp-panel" id="mp-content-2">
|
||||||
|
<div class="mp-col-header">Auktionen</div>
|
||||||
|
<div class="mp-body">
|
||||||
|
<span class="mp-coming-soon">Demnächst verfügbar…</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mp-panel" id="mp-content-3">
|
||||||
|
<div class="mp-col-header">Tauschbörse</div>
|
||||||
|
<div class="mp-body">
|
||||||
|
<span class="mp-coming-soon">Demnächst verfügbar…</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
/* 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");
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user