-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
147 lines (138 loc) · 5.14 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!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" />
<!-- Custom CSS -->
<link rel="stylesheet" href="./assets/css/style.css" />
<!-- Font Awesome icon CDN -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<title>Task 01</title>
</head>
<body>
<!-- Header Section -->
<header class="header__section">
<nav class="navbar">
<div class="logo">OnePage</div>
<ul class="navbar__links">
<li><a href="#" class="navbar__link active"> home </a></li>
<li><a href="#" class="navbar__link"> about </a></li>
<li><a href="#" class="navbar__link"> services </a></li>
<li><a href="#" class="navbar__link"> portfolio </a></li>
<li><a href="#" class="navbar__link"> team </a></li>
<li><a href="#" class="navbar__link"> pricing </a></li>
<div
href="#"
class="navbar__link dropdown__container"
id="dropdown__container"
>
drop down
<span class="icon" id="icon">
<i class="fa fa-angle-down" aria-hidden="true"></i>
</span>
<ul class="dropdown" id="dropdown">
<li class="dropdown__item">First Item</li>
<li class="dropdown__item">Second Item</li>
<li class="dropdown__item">Third Item</li>
</ul>
</div>
<li><a href="#" class="navbar__link"> contact </a></li>
</ul>
</nav>
<div class="header_button__container">
<a href="#" class="btn">get started</a>
</div>
</header>
<!-- Main Section -->
<main class="main__container">
<!-- Upper Main Seaction -->
<div class="upper__main__content">
<h1 class="main__heading">
one page bootstrap <br />
website template
</h1>
<p class="main__text">We are team of talanted designers</p>
<div class="main__button__container">
<a href="#" class="btn main__btn">get started</a>
</div>
</div>
<!-- Lower Main Section -->
<div class="lower__main__content">
<div class="box">
<div class="box__logo">
<i class="fa-solid fa-layer-group"></i>
</div>
<div class="box__heading">Heading</div>
<p class="box__text">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem
consequuntur, non provident error odit repellendus cum Lorem ipsum
dolor sit amet consectetur adipisicing elit. Magnam, corrupti?
</p>
</div>
<div class="box">
<div class="box__logo">
<i class="fa-solid fa-palette"></i>
</div>
<div class="box__heading">Heading</div>
<p class="box__text">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem
consequuntur, non provident error odit repellendus cum Lorem ipsum
dolor sit amet consectetur adipisicing elit. Magnam, corrupti?
</p>
</div>
<div class="box">
<div class="box__logo">
<i class="fa-solid fa-border-all"></i>
</div>
<div class="box__heading">Heading</div>
<p class="box__text">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem
consequuntur, non provident error odit repellendus cum Lorem ipsum
dolor sit amet consectetur adipisicing elit. Magnam, corrupti?
</p>
</div>
<div class="box">
<div class="box__logo">
<i class="fa-solid fa-fingerprint"></i>
</div>
<div class="box__heading">Heading</div>
<p class="box__text">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Autem
consequuntur, non provident error odit repellendus cum Lorem ipsum
dolor sit amet consectetur adipisicing elit. Magnam, corrupti?
</p>
</div>
</div>
</main>
<script>
let dropdownContainer = document.getElementById("dropdown__container");
let iconContainer = document.getElementById("icon");
dropdownContainer.addEventListener("click", () => {
console.log(dropdown.style.display);
if (
dropdown.style.display === "none" ||
dropdown.style.display === ""
) {
// console.log("hello")
dropdown.style.display = "block";
iconContainer.innerHTML = `
<i class="fa fa-angle-up" aria-hidden="true"></i>
`;
} else {
console.log("bye");
dropdown.style.display = "none";
iconContainer.innerHTML = `
<i class="fa fa-angle-down" aria-hidden="true"></i>
`;
}
});
</script>
</body>
</html>