From 37ca2c636dd40b9dd52c622fa2dc195e7a2671c6 Mon Sep 17 00:00:00 2001 From: Mstiekema Date: Mon, 27 May 2024 19:53:36 +0200 Subject: [PATCH] Added CSS for mobile compatibility --- .../static/AdminBoardView/styles.css | 50 ++++++++++++++-- admin_board_view/templates/base.html | 57 ++++++++++++------- admin_board_view/templates/home.html | 2 +- admin_board_view/templates/products.html | 2 +- admin_board_view/templates/settings.html | 2 +- admin_board_view/templates/transactions.html | 2 +- admin_board_view/templates/user.html | 6 +- admin_board_view/templates/user_home.html | 2 +- 8 files changed, 91 insertions(+), 32 deletions(-) diff --git a/admin_board_view/static/AdminBoardView/styles.css b/admin_board_view/static/AdminBoardView/styles.css index 59e0eae..3d16992 100644 --- a/admin_board_view/static/AdminBoardView/styles.css +++ b/admin_board_view/static/AdminBoardView/styles.css @@ -1,8 +1,34 @@ -.container { - max-height: calc(100vh - 65px); - overflow-y: scroll; - margin-top: 0 !important; - padding-top: 10px; +/* Mobile specific CSS */ +@media (max-width: 768px) { + /* General settings */ + .container { + max-height: calc(100vh - 65px); + overflow-y: scroll; + margin: 0; + margin-top: 0 !important; + padding-top: 10px; + width: 100%; + } + + .undead-cols { + display: block; + } + + .undead-cols > .col { + width: 100%; + margin-bottom: 10px; + } +} + +/* Container settings for desktop */ +@media (min-width: 768px) { + .container { + max-height: calc(100vh - 65px); + overflow-y: scroll; + margin-top: 0 !important; + padding-top: 10px; + width: calc(100% - 300px); + } } .board-color { @@ -25,3 +51,17 @@ a { .pagination { width: fit-content; } + +#sidebar { + width: 50px; +} + +#dropdownUser { + width: 50px; + height: 50px; +} + +#dropdownUser > svg { + /* Margin to make sure it's properly aligned: (50-16)/2 */ + margin: 17px; +} diff --git a/admin_board_view/templates/base.html b/admin_board_view/templates/base.html index d0f8073..180fccd 100644 --- a/admin_board_view/templates/base.html +++ b/admin_board_view/templates/base.html @@ -8,17 +8,13 @@ - + - - {% endcomment %} @@ -35,34 +31,56 @@ -
-
-