From b70e4624cb1a1306806645b911c61387468a2672 Mon Sep 17 00:00:00 2001 From: Kobe Date: Wed, 28 May 2025 21:36:03 +0200 Subject: [PATCH] mobile settings for base template --- routes/__pycache__/room_files.cpython-313.pyc | Bin 38323 -> 38323 bytes static/css/base.css | 44 ++++++ templates/common/base.html | 140 +++++++++++++----- 3 files changed, 144 insertions(+), 40 deletions(-) diff --git a/routes/__pycache__/room_files.cpython-313.pyc b/routes/__pycache__/room_files.cpython-313.pyc index 0562f902aab259a6483bd5a544e52563e6dda441..e79742c6852fe7fb29aef3b82803ca7fca53ea6e 100644 GIT binary patch delta 22 ccmdnInrZWDChpI?yj%=G;Lc>ek$c5d08h3CTmS$7 delta 22 ccmdnInrZWDChpI?yj%=G@TJ>yBln7_09Ty{kN^Mx diff --git a/static/css/base.css b/static/css/base.css index 46365d3..603a1e5 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -18,6 +18,50 @@ body { top: 56px; /* Height of the navbar */ height: calc(100vh - 56px); overflow-y: auto; + transition: transform 0.3s ease-in-out; +} + +/* Mobile sidebar styles */ +@media (max-width: 767.98px) { + .sidebar { + position: fixed; + left: 0; + top: 56px; + width: 280px; + transform: translateX(-100%); + z-index: 1040; + } + + .sidebar.show { + transform: translateX(0); + } + + .sidebar-overlay { + position: fixed; + top: 56px; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.5); + z-index: 1035; + opacity: 0; + visibility: hidden; + transition: opacity 0.3s ease-in-out; + } + + .sidebar-overlay.show { + opacity: 1; + visibility: visible; + } + + body.sidebar-open { + overflow: hidden; + } + + .main-content { + width: 100%; + margin-left: 0; + } } .sidebar .nav-link { diff --git a/templates/common/base.html b/templates/common/base.html index dfe3862..131f4c0 100644 --- a/templates/common/base.html +++ b/templates/common/base.html @@ -20,53 +20,50 @@ @@ -74,7 +71,7 @@
-
+ + + + {% block extra_js %}{% endblock %} \ No newline at end of file