From cd4fc1858524f48a2a077e237dbd5ab7d8164921 Mon Sep 17 00:00:00 2001 From: Swrup Date: Tue, 15 Apr 2025 07:54:35 +0200 Subject: [PATCH] css: fix home layout --- src/assets/css/style.css | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 0bf056f..933fffb 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -23,6 +23,8 @@ --bg-id-remote-loading: #FCE4EC; --bg-id-remote-not-found: black; --bg-id-remote-ready: blue; + + --nav-height: 3vh; } @@ -38,8 +40,6 @@ body { color: var(--light-text); background-color: var(--bg); font-size: 18px; - display: grid; - grid-template-rows: 3fr 97fr; height: 100vh; } @@ -51,6 +51,7 @@ nav { background-color: var(--bg-nav); display: flex; justify-content: space-between; + height: var(--nav-height); } nav div { @@ -82,23 +83,30 @@ nav a:hover, nav button:hover, background-color: var(--bg-nav-hover); } -/* todo: use sub-grid? */ .home-page { + position: relative; display: grid; - grid-template-columns: 60fr 40fr ; - width: 100%; - height: 100%; + grid-template-columns: 3fr 2fr; } .home-left, .home-right { - position: relative; - width: 100%; - height: 100%; + height: calc(100vh - var(--nav-height)); +} + +.home-left { + grid-row: 2; + grid-column: 1; + overflow-y: auto; +} + +.home-right { + grid-row: 2; + grid-column: 2; + top: var(--nav-height); } #map { - position: sticky !important; - height: 100vh; + height: 100%; width: 100%; top: 0; left: 0;