From 9f76da4aa48705c59ad3bd36df1f4c9304850e8c Mon Sep 17 00:00:00 2001 From: Corban-Lee Date: Wed, 9 Oct 2024 12:35:51 +0100 Subject: [PATCH] remake sidebar (non functional) --- apps/home/static/home/css/index.css | 115 +++++++++++++++++-- apps/home/templates/home/index.html | 167 +++++++++++++++++++++++++++- templates/includes/navbar.html | 4 +- 3 files changed, 271 insertions(+), 15 deletions(-) diff --git a/apps/home/static/home/css/index.css b/apps/home/static/home/css/index.css index fb10104..abdfe2c 100644 --- a/apps/home/static/home/css/index.css +++ b/apps/home/static/home/css/index.css @@ -15,9 +15,9 @@ } .server-sidebar { - width: 16rem; + width: 16rem !important; } - +/* @media (max-width: 992px) { .server-sidebar { width: 4.5rem; @@ -45,7 +45,7 @@ height: 45px !important; padding: 0 !important; } -} +} */ .server-item { max-width: calc(16rem - 1rem); @@ -69,7 +69,7 @@ .server-item-selector:focus, .server-item-selector:active, .active > .server-item-selector { - background-color: var(--bs-tertiary-bg) !important; + background-color: var(--bs-body-bg) !important; } @@ -133,12 +133,113 @@ height: 100%; padding: 0.5rem 0; border-radius: var(--bs-border-radius-sm); - transition: 0.3s; color: var(--bs-body-color); - background-color: var(--bs-secondary-bg); + background-color: var(--bs-tertiary-bg); } .sidebar-btn:hover { + background-color: var(--bs-body-bg); +} + + +/* New Sidebar */ + +.sidebar { + display: flex; + flex-direction: column; + flex-shrink: 0; + padding: 1rem; + width: 280px; + + color: var(--bs-body-color); + background-color: var(--bs-tertiary-bg) +} + +.sidebar .sidebar-header { + display: flex; + align-items: center; + text-decoration: none; + color: inherit; +} + +.sidebar .sidebar-header .sidebar-logo { + width: 45px; + margin-right: 0.5rem; +} + +.sidebar .sidebar-header .sidebar-title { + font-size: 2rem; + font-weight: bold; +} + +.sidebar .sidebar-content { + margin-bottom: auto; + padding-left: 0; + list-style: none; +} + +.sidebar .sidebar-content .sidebar-item { + display: flex; + align-items: center; + width: 100%; + padding: 0.5rem; + border: none; + border-radius: var(--bs-border-radius-sm); background-color: var(--bs-tertiary-bg); -} \ No newline at end of file +} + +.sidebar .sidebar-content .sidebar-item:hover { + background-color: var(--bs-body-bg); +} + +.sidebar .sidebar-content .sidebar-item .sidebar-item-image { + width: 50px; + height: 50px; + border-radius: var(--bs-border-radius-sm); + margin-right: 0.75rem; +} + +.sidebar .sidebar-content .sidebar-item .sidebar-item-data { + display: flex; + flex-direction: column; + width: 100%; + overflow: hidden; +} + +.sidebar .sidebar-content .sidebar-item .sidebar-item-data > span { + text-align: start; + display: block; + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.sidebar .sidebar-footer .sidebar-menu-btn { + display: flex; + align-items: center; + width: 100%; + padding: 0.5rem; + border: none; + border-radius: var(--bs-border-radius-sm); + color: var(--bs-body-color); + background-color: var(--bs-tertiary-bg); +} + +.sidebar .sidebar-footer .sidebar-menu-btn:hover { + background-color: var(--bs-body-bg); +} + +.sidebar .sidebar-avatar { + border-radius: 50%; + margin-right: 0.5rem; + width: 32px; + height: 32px; +} + +.sidebar .sidebar-menu { + border: none; + border-radius: var(--bs-border-radius-sm); + box-shadow: var(--bs-box-shadow); +} diff --git a/apps/home/templates/home/index.html b/apps/home/templates/home/index.html index 2d8ab8d..6bc3f40 100644 --- a/apps/home/templates/home/index.html +++ b/apps/home/templates/home/index.html @@ -11,9 +11,165 @@ {% endblock stylesheets %} {% block content %} -
+
-
+ + {% endcomment %}
{% csrf_token %}
- + -
-
+
PYRSS Logo diff --git a/templates/includes/navbar.html b/templates/includes/navbar.html index 8e23b92..1e5f4a9 100644 --- a/templates/includes/navbar.html +++ b/templates/includes/navbar.html @@ -16,12 +16,12 @@