-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
112 lines (93 loc) · 3.73 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Responsive Navigation Bar</title>
</head>
<link rel="stylesheet" href="style.css">
<body>
<div class="first">
<header>
<nav class="navbar">
<ul class="nav-menu">
<li><a href="#" class="nav-link">Home</a></li>
<li><a href="#" class="nav-link">Order</a></li>
<li><a href="#" class="nav-link">Food</a></li>
<li><a href="#" class="nav-link">Restaurant</a></li>
<li><a href="#" class="nav-link">Testimonial</a></li>
<li><a href="#" class="nav-link grow">Contact Us</a></li>
<li></li><a href="#" class="nav-link logos"><img src="cart1.png" alt="img" class="img1"></a></li>
<li><a href="#" class="nav-link logos"><img src="cart2.png" alt="img" class="img2"></a></li>
</ul>
<div class="hamberger">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</div>
</nav>
</header>
<div class="first-page">
<div class="info">
<h1>Lorem Ipsum</h1>
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Dolorem,
Lorem ipsum dolor sit, amet consectetur 100% adipisicing elit. Odit
Lorem ipsum dolor sit.</p>
</div>
</div>
</div>
<div class="item-collection">
<br><br>
<h1>Order Now</h1> <br><br>
<br>
<div class="menu">
<div class="burger menu-card">
<div class="menu-img">
<img src="img4.jpg" />
</div>
<div class="menu-text">
<p class="menu-text-heading">BURGER</p>
<p class="menu-para">Lorem Ipsum has been the
industry's standard dummy</p>
</div>
</div>
<div class="pizza menu-card">
<div class="menu-img">
<img src="img2.jpg" />
</div>
<div class="menu-text">
<p class="menu-text-heading">PIZZA</p>
<p class="menu-para">Lorem Ipsum has been the
industry's standard dummy</p>
</div>
</div>
<div class="pasta menu-card">
<div class="menu-img">
<img src="img3.jpg" />
</div>
<div class="menu-text">
<p class="menu-text-heading">PASTA</p>
<p class="menu-para">Lorem Ipsum has been the
industry's standard dummy</p>
</div>
</div>
</div>
<br><br><br>
<h1>
<button class="button"> <h4>Order</h4> </button></h1><br><br><br><br>
</div>
</body>
<script>
const hamberger = document.querySelector(".hamberger");
const navMenu = document.querySelector(".nav-menu");
hamberger.addEventListener("click", () => {
hamberger.classList.toggle("active");
navMenu.classList.toggle("active");
})
document.querySelectorAll(".nav-link").forEach(n => n.addEventListener("click", () => {
hamberger.classList.remove("active");
navMenu.classList.remove("active");
}))
</script>
</html>