diff --git a/public/css/events.css b/public/css/events.css index 693f2d2..4396e27 100644 --- a/public/css/events.css +++ b/public/css/events.css @@ -1,23 +1,7 @@ -/* ================================================ - events.css – Tägliche Events Quickmenü-Popup - Die Popup-Basisgrösse kommt von .qm-popup in - quickmenu.css – hier wird sie per ID überschrieben. -================================================ */ +/* ================================ + Events Grid +================================ */ -/* Popup-Grösse für Events (ID schlägt Klasse) */ -#qm-popup-events { - width: 900px; - height: 600px; -} - -/* Body-Padding anpassen (war auf 1800px ausgelegt) */ -#qm-popup-events .qm-popup-body { - padding: 20px 30px; - align-items: flex-start; - justify-content: flex-start; -} - -/* ── Event Grid ─────────────────────────────────── */ .events-grid { display: flex; gap: 10px; @@ -98,14 +82,8 @@ } @keyframes eventDetailIn { - from { - opacity: 0; - transform: translateY(6px); - } - to { - opacity: 1; - transform: translateY(0); - } + from { opacity: 0; transform: translateY(6px); } + to { opacity: 1; transform: translateY(0); } } #event-detail-popup .edp-close { @@ -121,9 +99,7 @@ transition: color 0.1s; } -#event-detail-popup .edp-close:hover { - color: #fff; -} +#event-detail-popup .edp-close:hover { color: #fff; } #event-detail-popup .edp-img { display: block; @@ -148,3 +124,156 @@ line-height: 1.6; text-align: center; } + +/* ================================ + Booster UI +================================ */ + +.booster-ui { + flex-direction: column; + gap: 16px; + padding: 10px 0; + width: 100%; +} + +.booster-back-btn { + align-self: flex-start; + background: none; + border: 1px solid rgba(255, 200, 80, 0.3); + color: #c8960c; + font-size: 12px; + padding: 4px 12px; + border-radius: 4px; + cursor: pointer; + font-family: "Cinzel", serif; + transition: background 0.15s, color 0.15s; +} + +.booster-back-btn:hover { + background: rgba(200, 150, 12, 0.15); + color: #f0d060; +} + +.booster-stage { + display: flex; + align-items: center; + gap: 24px; + width: 100%; +} + +/* ── Stapel links ── */ + +.booster-left { + display: flex; + flex-direction: column; + align-items: center; + gap: 8px; + flex-shrink: 0; +} + +.booster-stapel-img { + width: 110px; + height: auto; + cursor: pointer; + image-rendering: pixelated; + filter: drop-shadow(0 4px 12px rgba(200, 150, 12, 0.4)); + transition: transform 0.15s ease, filter 0.15s ease; +} + +.booster-stapel-img:hover:not(.used) { + transform: scale(1.06) translateY(-3px); + filter: drop-shadow(0 6px 18px rgba(240, 200, 60, 0.65)); +} + +.booster-stapel-img.used { + cursor: default; + filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); +} + +.booster-stapel-hint { + font-size: 11px; + color: #a08040; + font-family: "Cinzel", serif; + letter-spacing: 1px; + text-align: center; +} + +/* ── Karten-Slots rechts ── */ + +.booster-slots { + display: flex; + gap: 10px; + flex: 1; + justify-content: center; +} + +.booster-slot { + display: flex; + flex-direction: column; + align-items: center; + gap: 6px; + flex: 1; + min-width: 0; +} + +.booster-slot-inner { + width: 100%; + aspect-ratio: 2 / 3; + border: 2px solid rgba(255, 255, 255, 0.1); + border-radius: 6px; + overflow: hidden; + background: #0d0a06; + display: flex; + align-items: center; + justify-content: center; + position: relative; +} + +/* Dreh-Animation */ +.booster-slot.spinning .booster-slot-inner { + border-color: rgba(200, 150, 12, 0.5); + box-shadow: 0 0 12px rgba(200, 150, 12, 0.25); +} + +.booster-slot.spinning .booster-slot-img { + animation: slotFlicker 0.08s steps(1) infinite; +} + +@keyframes slotFlicker { + 0% { opacity: 1; } + 50% { opacity: 0.75; } + 100% { opacity: 1; } +} + +/* Enthüllt */ +.booster-slot.revealed .booster-slot-inner { + border-color: #c8960c; + box-shadow: + 0 0 16px rgba(200, 150, 12, 0.45), + inset 0 0 8px rgba(200, 150, 12, 0.1); + animation: revealPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; +} + +@keyframes revealPop { + 0% { transform: scale(0.85); opacity: 0.5; } + 60% { transform: scale(1.06); opacity: 1; } + 100% { transform: scale(1); opacity: 1; } +} + +.booster-slot-img { + width: 100%; + height: 100%; + object-fit: cover; + image-rendering: pixelated; + display: block; +} + +.booster-slot-name { + font-size: 10px; + color: #c8960c; + text-align: center; + font-family: "Cinzel", serif; + letter-spacing: 0.5px; + min-height: 14px; + word-break: break-word; +} diff --git a/public/images/items/rueckseite.png b/public/images/items/rueckseite.png new file mode 100644 index 0000000..a7c8036 Binary files /dev/null and b/public/images/items/rueckseite.png differ diff --git a/public/js/quickmenu/events.js b/public/js/quickmenu/events.js index 626a982..23e95dd 100644 --- a/public/js/quickmenu/events.js +++ b/public/js/quickmenu/events.js @@ -3,56 +3,61 @@ export async function loadEvents() { if (!body) return; /* ================================ - Event-Daten (hier später befüllen) + CSS einmalig laden + ================================ */ + if (!document.querySelector('link[href="/css/events.css"]')) { + const link = document.createElement("link"); + link.rel = "stylesheet"; + link.href = "/css/events.css"; + document.head.appendChild(link); + } + + /* ================================ + Event-Daten ================================ */ const events = [ - { - id: 1, - img: "/images/items/runenhaufen.png", - label: "Werfe heute deine Runen", - }, - { - id: 2, - img: "/images/items/runenhaufen.png", - label: "Spiele heute ein 1v1", - }, - { - id: 3, - img: "/images/items/runenhaufen.png", - label: "Spiele heute ein 2v2", - }, - { - id: 4, - img: "/images/items/runenhaufen.png", - label: "Spende ein wenig Holz.", - }, - { - id: 5, - img: "/images/items/runenhaufen.png", - label: "Spende ein wenig Gold.", - }, + { id: 1, img: "/images/items/runenhaufen.png", label: "Booster Öffnen", type: "booster" }, + { id: 2, img: "/images/items/runenhaufen.png", label: "Textzeile 2" }, + { id: 3, img: "/images/items/runenhaufen.png", label: "Textzeile 3" }, + { id: 4, img: "/images/items/runenhaufen.png", label: "Textzeile 4" }, + { id: 5, img: "/images/items/runenhaufen.png", label: "Textzeile 5" }, ]; /* ================================ - Haupt-HTML injizieren + Haupt-HTML ================================ */ body.innerHTML = ` - -