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>
<script>
document.getElementById('toggleSidebarButton').addEventListener('click', function () {
document.getElementById('sidebar').classList.toggle('collapsed');
});
</script>
</body>
</html>

View File

@ -2,7 +2,7 @@
<!-- Menu -->
<div class="menu-container">
<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
</button>

View File

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