Add custom scroll on sidebar

This commit is contained in:
Dita Aji Pratama 2024-09-28 14:25:10 +07:00
parent d23f3357e3
commit e3337cd502
2 changed files with 22 additions and 1 deletions

View File

@ -1,7 +1,7 @@
<!-- Sidebar --> <!-- Sidebar -->
<div class="sidebar" id="sidebar"> <div class="sidebar" id="sidebar">
<!-- <h5>Sidebar</h5> --> <!-- <h5>Sidebar</h5> -->
<ul class="navbar-nav flex-column pb-5"> <ul class="navbar-nav flex-column">
% for item in menu: % for item in menu:
% if any(role in item['roles'] for role in user_roles): % if any(role in item['roles'] for role in user_roles):
<li class="nav-item"> <li class="nav-item">

View File

@ -20,6 +20,27 @@ body {
overflow-y: auto; /* Make sidebar scrollable */ overflow-y: auto; /* Make sidebar scrollable */
} }
.sidebar::-webkit-scrollbar {
width: 6px;
}
.sidebar::-webkit-scrollbar-track {
background: #bbb;
border-radius: 3px;
margin-top: 5px;
margin-bottom: 30px;
}
.sidebar::-webkit-scrollbar-thumb {
background: #ddd;
border-radius: 3px;
margin: 12px 0;
}
.sidebar .navbar-nav {
padding-bottom: 80px;
}
.sidebar .navbar-nav .nav-item .active { .sidebar .navbar-nav .nav-item .active {
font-weight: bold; font-weight: bold;
} }