From 60582d4520af165f486bd3ef7b41d3d6025c10b7 Mon Sep 17 00:00:00 2001 From: Kobe Date: Tue, 27 May 2025 13:30:44 +0200 Subject: [PATCH] Fix xolours and dashboard --- routes/__pycache__/main.cpython-313.pyc | Bin 33786 -> 33880 bytes routes/main.py | 4 +- static/css/colors.css | 52 ++++++++++-------------- static/css/home.css | 8 +--- templates/common/base.html | 1 - 5 files changed, 25 insertions(+), 40 deletions(-) diff --git a/routes/__pycache__/main.cpython-313.pyc b/routes/__pycache__/main.cpython-313.pyc index 18b710edc722cb36ed6f593701bc0fe09dd4165c..54be3984988ff2eba73898c9bf4c6f4a35f3e4d3 100644 GIT binary patch delta 206 zcmey>&UB-LiT5)vFBbz4*eo*5NZ-h-#K~l#zS)p-BO@zEA|C_8z(Ka5x}!MZxC-14BKdGt*>FCzH*;tbVc)qj)o?lQ9$TQ(jR= TKOvT{JmQXi;+s8PHrfLKG|xmp delta 174 zcmcc7!St)0iT5)vFBbz4?Cdnn(BH_b#L4tUZL=ZgMn+cl#J>y-lLPtXC-b>;ZszCa z=bpSx>)qrB+ESDENO5cq5Z}bi*fd#?TYhqayYOUfdG5^)(joktw`r~9W|Y{RU^azC zYyr=81@nsv=GPS*E-E-2kh-Gab0H~hv$(Y`J1)6&Cu1hwCpMyvz6LB`ti>IDO*b!h H*=P>{8sa)? diff --git a/routes/main.py b/routes/main.py index d43df50..5e46c84 100644 --- a/routes/main.py +++ b/routes/main.py @@ -110,7 +110,7 @@ def init_routes(main_bp): starred_count = RoomFile.query.filter(RoomFile.starred_by.contains(current_user)).count() # Get oldest trash date and total trash size oldest_trash = RoomFile.query.filter_by(deleted=True).order_by(RoomFile.deleted_at.asc()).first() - oldest_trash_date = oldest_trash.deleted_at.strftime('%Y-%m-%d') if oldest_trash else None + oldest_trash_date = oldest_trash.deleted_at.strftime('%Y-%m-%d') if oldest_trash and oldest_trash.deleted_at else None trash_size = db.session.query(db.func.sum(RoomFile.size)).filter(RoomFile.deleted==True).scalar() or 0 # Get files that will be deleted in next 7 days @@ -217,7 +217,7 @@ def init_routes(main_bp): ).count() # Get oldest trash date and total trash size for user's rooms oldest_trash = RoomFile.query.filter(RoomFile.room_id.in_(room_ids), RoomFile.deleted==True).order_by(RoomFile.deleted_at.asc()).first() - oldest_trash_date = oldest_trash.deleted_at.strftime('%Y-%m-%d') if oldest_trash else None + oldest_trash_date = oldest_trash.deleted_at.strftime('%Y-%m-%d') if oldest_trash and oldest_trash.deleted_at else None trash_size = db.session.query(db.func.sum(RoomFile.size)).filter(RoomFile.room_id.in_(room_ids), RoomFile.deleted==True).scalar() or 0 # Get files that will be deleted in next 7 days for user's rooms diff --git a/static/css/colors.css b/static/css/colors.css index 1de1d90..4d83497 100644 --- a/static/css/colors.css +++ b/static/css/colors.css @@ -1,51 +1,41 @@ :root { - /* Primary Colors */ + /* Default Colors - These will be overridden by dynamic colors */ --primary-color: #16767b; --primary-light: #1a8a90; + --primary-bg-light: #e6f3f4; + --primary-opacity-15: #16767b26; - /* Secondary Colors */ --secondary-color: #741b5f; --secondary-light: #8a2170; - - /* Background Colors */ - --bg-color: #f8f9fa; - --white: #ffffff; - --primary-bg-light: #e6f3f4; - - /* Text Colors */ - --text-dark: #333333; - --text-muted: #6c757d; - - /* Status Colors */ - --warning-color: #ffd700; - --danger-color: #dc3545; - - /* Shadow Colors */ - --shadow-color: rgba(0, 0, 0, 0.1); - --shadow-color-light: rgba(0, 0, 0, 0.25); - - /* Border Colors */ - --border-color: #dee2e6; - --border-light: #e9ecef; - - /* Opacity Colors */ - --primary-opacity-8: rgba(22, 118, 123, 0.08); - --primary-opacity-12: rgba(22, 118, 123, 0.12); - --primary-opacity-15: rgba(22, 118, 123, 0.15); - --primary-opacity-20: rgba(22, 118, 123, 0.2); - --warning-opacity-15: rgba(255, 215, 0, 0.15); - --danger-opacity-15: rgba(220, 53, 69, 0.15); + --secondary-bg-light: #f5e6f2; + --secondary-opacity-15: #741b5f26; /* Chart Colors */ --chart-primary: #16767b; --chart-secondary: #741b5f; --chart-warning: #ffd700; + + /* Primary Chart Colors */ --chart-primary-light: #2c9da9; --chart-primary-lighter: #43c4d3; --chart-primary-lightest: #5ad9e8; --chart-primary-pale: #71eefd; + + /* Secondary Chart Colors */ --chart-secondary-light: #8a2b73; --chart-secondary-lighter: #a03b87; --chart-secondary-lightest: #b64b9b; --chart-secondary-pale: #cc5baf; + + /* Other Colors */ + --bg-color: #f8f9fa; + --white: #ffffff; + --text-dark: #333333; + --text-muted: #6c757d; + --warning-color: #ffd700; + --danger-color: #dc3545; + --shadow-color: rgba(0, 0, 0, 0.1); + --shadow-color-light: rgba(0, 0, 0, 0.25); + --border-color: #dee2e6; + --border-light: #e9ecef; } \ No newline at end of file diff --git a/static/css/home.css b/static/css/home.css index 30bcdab..692c6a5 100644 --- a/static/css/home.css +++ b/static/css/home.css @@ -1,9 +1,5 @@ -:root { - --primary-color: #16767b; - --secondary-color: #741b5f; - --primary-light: #1a8a90; - --secondary-light: #8a2170; -} +/* Import color variables */ +@import 'colors.css'; .navbar { background-color: var(--primary-color) !important; diff --git a/templates/common/base.html b/templates/common/base.html index 7f1e917..837b77f 100644 --- a/templates/common/base.html +++ b/templates/common/base.html @@ -10,7 +10,6 @@ - {% block extra_css %}{% endblock %}