From e035a991794048e49c45e4cc81e0d0396fab94c5 Mon Sep 17 00:00:00 2001 From: nessi Date: Sat, 7 Feb 2026 11:31:55 +0100 Subject: [PATCH] Refactor layout for improved responsiveness and scroll control Updated the app layout to separate fixed and scrollable sections, enabling only the notes panel to scroll. Introduced a new CSS file for a cleaner structure and responsive behavior, ensuring a more consistent user experience across different screen sizes. --- frontend/src/App.jsx | 91 ++++++++----------- frontend/src/AppLayout.css | 89 ++++++++++++++++++ .../src/styles/hooks/useHpGlobalStyles.js | 7 +- 3 files changed, 130 insertions(+), 57 deletions(-) create mode 100644 frontend/src/AppLayout.css diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 58c06dd..e6bd7c0 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -13,6 +13,8 @@ import LoginPage from "./components/LoginPage"; import SheetSection from "./components/SheetSection"; import ChipModal from "./components/ChipModal"; +import "./AppLayout.css"; + export default function App() { useHpGlobalStyles(); @@ -263,36 +265,26 @@ export default function App() {
- {/* Layout: Links Game/Board, Rechts Notizen */} -
- {/* LEFT: Game Area (Placeholders) */} -
+ {/* Layout: Links Game/Board (fix), Rechts Notizen (scroll) */} +
+ {/* LEFT: Game Area */} +
{/* Top bar placeholders (User + Settings) */} -
+
{/* Center Board */}
-
+
3D Board / Game View
@@ -315,72 +307,67 @@ export default function App() {
- {/* Bottom row placeholders */} -
+ {/* Bottom HUD */} +
{/* Extra: Hilfskarten / Deck */} -
+
-
+
{/* RIGHT: Notes Panel */} -
-
- Notizen -
-
- Nur die 3 Tabellen (Verdächtige / Gegenstände / Orte). +
+
+ Notizen +
+
+ Nur die 3 Tabellen (Verdächtige / Gegenstände / Orte). +
-
- {sections.map((sec) => ( - - ))} +
+
+ {sections.map((sec) => ( + + ))} +
-
+
{ @@ -76,8 +74,7 @@ export function useHpGlobalStyles() { color: ${stylesTokens.textMain}; } body { - overflow-x: hidden; - -webkit-overflow-scrolling: touch; + overflow: hidden; } #root { background: transparent; } * { -webkit-tap-highlight-color: transparent; } @@ -89,4 +86,4 @@ export function useHpGlobalStyles() { useEffect(() => { applyTheme("default"); }, []); -} \ No newline at end of file +}