Fixes sidebar sliding

main
Yasen Pramatarov 2024-08-04 16:33:41 +03:00
parent 22e502c90c
commit ca95f3c27e
3 changed files with 10 additions and 3 deletions

View File

@ -8,6 +8,12 @@
</div> </div>
<script>
document.getElementById('toggleSidebarButton').addEventListener('click', function () {
document.getElementById('sidebar').classList.toggle('collapsed');
});
</script>
</body> </body>
</html> </html>

View File

@ -2,7 +2,7 @@
<!-- Menu --> <!-- Menu -->
<div class="menu-container"> <div class="menu-container">
<ul class="menu-left"> <ul class="menu-left">
<button class="btn btn-primary mb-3" type="button" data-toggle="collapse" data-target="#sidebar" aria-expanded="false" aria-controls="sidebar"> <button class="btn btn-primary mb-3" type="button" id="toggleSidebarButton">
sidebar sidebar
</button> </button>

View File

@ -1,8 +1,8 @@
<div class="row"> <div class="row">
<!-- Sidebar --> <!-- Sidebar -->
<div class="col-md-3 sidebar-wrapper collapse show" id="sidebar"> <div class="col-md-3 sidebar-wrapper bg-light" id="sidebar">
<div class="card card-body bg-light"> <div class="sidebar-content card card-body">
<ul class="list-group"> <ul class="list-group">
<li class="list-group-item"><a href="#">stats</a></li> <li class="list-group-item"><a href="#">stats</a></li>
<li class="list-group-item"><a href="#">config</a></li> <li class="list-group-item"><a href="#">config</a></li>
@ -10,6 +10,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<!-- /Sidebar --> <!-- /Sidebar -->
<div class="col-md-9"> <div class="col-md-9">