-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
83 lines (79 loc) · 2.85 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Bootstrap 5 Side Bar Navigation</title>
<!-- bootstrap 5 css -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl"
crossorigin="anonymous"
/>
<!-- BOX ICONS CSS-->
<link
href="https://cdn.jsdelivr.net/npm/boxicons@2.0.5/css/boxicons.min.css"
rel="stylesheet"
/>
<!-- custom css -->
<link rel="stylesheet" href="style.css" />
</head>
<body>
<!-- Side-Nav -->
<div
class="side-navbar active-nav d-flex justify-content-between flex-wrap flex-column"
id="sidebar"
>
<ul class="nav flex-column text-white w-100">
<a href="#" class="nav-link h3 text-white my-2">
Responsive </br>SideBar Nav
</a>
<li href="#" class="nav-link">
<i class="bx bxs-dashboard"></i>
<span class="mx-2">Home</span>
</li>
<li href="#" class="nav-link">
<i class="bx bx-user-check"></i>
<span class="mx-2">Profile</span>
</li>
<li href="#" class="nav-link">
<i class="bx bx-conversation"></i>
<span class="mx-2">Contact</span>
</li>
</ul>
<span href="#" class="nav-link h4 w-100 mb-5">
<a href=""><i class="bx bxl-instagram-alt text-white"></i></a>
<a href=""><i class="bx bxl-twitter px-2 text-white"></i></a>
<a href=""><i class="bx bxl-facebook text-white"></i></a>
</span>
</div>
<!-- Main Wrapper -->
<div class="p-1 my-container active-cont">
<!-- Top Nav -->
<nav class="navbar top-navbar navbar-light bg-light px-5">
<a class="btn border-0" id="menu-btn"><i class="bx bx-menu"></i></a>
</nav>
<!--End Top Nav -->
<h3 class="text-dark p-3">RESPONSIVE SIDEBAR NAV 💻 📱
</h3>
<p class="px-3">Responsive navigation sidebar built using <a class="text-dark" href="https://getbootstrap.com/">Bootstrap 5</a>.</p>
</div>
<!-- bootstrap js -->
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0"
crossorigin="anonymous"
></script>
<!-- custom js -->
<script>
var menu_btn = document.querySelector("#menu-btn");
var sidebar = document.querySelector("#sidebar");
var container = document.querySelector(".my-container");
menu_btn.addEventListener("click", () => {
sidebar.classList.toggle("active-nav");
container.classList.toggle("active-cont");
});
</script>
</body>
</html>