diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 7925ec8..b0ab987 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -541,6 +541,261 @@ export default function App() { ); }; + // App.jsx (füge diese Komponente irgendwo unter deinen anderen Komponenten ein) +// ✅ 3 Würfel: 2x d6 + 1x Spezial (Häuser + Hilfkarte + Dunkles Deck) + +const DicePanel = () => { + return ( +
+
+
+ Würfel +
+
+ 2× d6 + 1× Spezial +
+ +
+ + + +
+
+
+ ); +}; + +const DieShell = ({ children, ringColor = "rgba(255,255,255,0.10)" }) => { + return ( +
{ + e.currentTarget.style.transform = "translateY(-3px) rotate(-1deg)"; + e.currentTarget.style.boxShadow = + "0 26px 70px rgba(0,0,0,0.65), inset 0 0 0 1px rgba(255,255,255,0.08)"; + }} + onMouseLeave={(e) => { + e.currentTarget.style.transform = "translateY(0px) rotate(0deg)"; + e.currentTarget.style.boxShadow = + "0 18px 50px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.06)"; + }} + title="Würfel (placeholder)" + > + {/* subtle inner ring */} +
+ + {/* gloss */} +
+ + {children} +
+ ); +}; + +const DieD6 = ({ value = 1 }) => { + // pip layout positions on 3x3 grid + const P = ({ x, y }) => ( +
+ ); + + const faces = { + 1: [{ x: 1, y: 1 }], + 2: [ + { x: 0, y: 0 }, + { x: 2, y: 2 }, + ], + 3: [ + { x: 0, y: 0 }, + { x: 1, y: 1 }, + { x: 2, y: 2 }, + ], + 4: [ + { x: 0, y: 0 }, + { x: 2, y: 0 }, + { x: 0, y: 2 }, + { x: 2, y: 2 }, + ], + 5: [ + { x: 0, y: 0 }, + { x: 2, y: 0 }, + { x: 1, y: 1 }, + { x: 0, y: 2 }, + { x: 2, y: 2 }, + ], + 6: [ + { x: 0, y: 0 }, + { x: 0, y: 1 }, + { x: 0, y: 2 }, + { x: 2, y: 0 }, + { x: 2, y: 1 }, + { x: 2, y: 2 }, + ], + }; + + return ( + +
+ {(faces[value] || faces[1]).map((p, idx) => ( +

+ ))} +

+ + {/* tiny label */} +
+ d6 +
+
+ ); +}; + +const HouseDie = ({ face = "gryffindor" }) => { + // 4 Häuser + Hilfkarte + Dunkles Deck + const faces = { + gryffindor: { label: "G", color: "#ef4444", sub: "Gryff." }, + slytherin: { label: "S", color: "#22c55e", sub: "Slyth." }, + ravenclaw: { label: "R", color: "#3b82f6", sub: "Raven." }, + hufflepuff: { label: "H", color: "#facc15", sub: "Huff." }, + help: { label: "?", color: "#f2d27a", sub: "Hilf" }, + dark: { label: "☾", color: "rgba(255,255,255,0.70)", sub: "Dark" }, + }; + + const f = faces[face] || faces.gryffindor; + + return ( + +
+
+ {f.label} +
+
+ +
+ Spezial +
+
+ ); +}; + + const PlayerIdentityCard = ({ name = "Harry Potter", houseLabel = "Gryffindor", @@ -761,7 +1016,7 @@ export default function App() {
- +
diff --git a/frontend/src/AppLayout.css b/frontend/src/AppLayout.css index efbf971..b2efc87 100644 --- a/frontend/src/AppLayout.css +++ b/frontend/src/AppLayout.css @@ -167,6 +167,15 @@ body { padding-right: 4px; } +.diceOverlay { + position: absolute; + bottom: 14px; + right: 18px; + width: 220px; + pointer-events: auto; /* ✅ damit Hover/Clicks für Würfel gehen */ + opacity: 0.98; +} + /* --- Responsive: shrink gracefully (no scroll outside notes) --- */ @media (max-height: 860px) { .leftPane {