-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproduct.html
241 lines (215 loc) · 8.84 KB
/
product.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!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">
<link rel="icon" type="image/png" sizes="32x32"
href="https://www.udemy.com/staticx/udemy/images/v8/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16"
href="https://www.udemy.com/staticx/udemy/images/v8/favicon-16x16.png" />
<meta name="title" content="Online Courses - Learn Anything, On Your Schedule | Udemy">
<link rel="stylesheet" href="style/global.css">
<link rel="stylesheet" href="style/navbar.css">
<link rel="stylesheet" href="style/product.css">
<link rel="stylesheet" href="style/course-list.css">
<title>Online Courses - Learn Anything, On Your Schedule | Udemy</title>
</head>
<body>
<nav>
</nav>
<div class="name-div">
<h1 class="course-name">JavaScript Courses</h1>
<p class="course-title">JavaScript relates to <a> DevelopmentIT & Software</a></p>
<span class="learners">12,197,710 learners</span>
</div>
<div class="course-list">
<div>
<div class="slide">
</div>
</div>
<button class="next-slide" id="slide1">
<img class="icon" src="assets/next.png" alt="" srcset="">
</button>
<button class="prev-slide" id="slideP1">
<img class="icon" src="assets/next.png" alt="" srcset="">
</button>
</div>
<div class="prod-head">
<h2>All Development courses</h2>
<div class="not-sure">
<button>i</button>
<p>information alert Not sure? All courses have a 30-day money-back guarantee</p>
</div>
</div>
<div class="sort-head">
<div class="sort-box">
<div class="filter-toggle">
<img class="icon" src="assets/filter.png" alt="" srcset="">
Filter
</div>
<div class="sort">
<p class="sort-by">Sort by</p>
<select value="">
<option value="most">Most Popular</option>
<option value="high">Highest Rated</option>
<option value="new">Newest</option>
</select>
</div>
</div>
<div class="resuts">
<h4>10,000 results</h5>
</div>
</div>
<div class="main-products">
<div class="left-filters">
<!-- ///////////// -->
<div class="topics">
<div style="border-top: 1px solid var(--faded-color);" class="fil-title fil-active">
<h2>Topic</h2>
<img class="icon" src="assets/up.png" alt="" srcset="">
</div>
<div class="fil-data topic-cat-fil"></div>
</div>
<!-- //////////////// -->
<div class="sub-cat">
<div class="fil-title fil-active">
<h2>Subcategory</h2>
<img class="icon" src="assets/up.png" alt="" srcset="">
</div>
<div class="fil-data sub-cat-fil"></div>
</div>
<div class="level">
<div class="fil-title fil-active">
<h2>Level</h2>
<img class="icon" src="assets/up.png" alt="" srcset="">
</div>
<div class="fil-data">
<p class="fil-p">
<input type="checkbox" value="all-levels,level">
All Levels
</p>
<p class="fil-p">
<input type="checkbox" value="beginner,level">
Beginner
</p>
<p class="fil-p">
<input type="checkbox" value="intermediate,level">
Intermediate
</p>
<p class="fil-p">
<input type="checkbox" value="expert,level">
Expert
</p>
</div>
</div>
<div class="price">
<div class="fil-title fil-active">
<h2>Price</h2>
<img class="icon" src="assets/up.png" alt="" srcset="">
</div>
<div class="fil-data">
<p class="fil-p">
<input type="checkbox" value="paid,price">
Paid (8,358)
</p>
<p class="fil-p">
<input type="checkbox" value="free,price">
Free (1,247)
</p>
</div>
</div>
</div>
<!-- ///////////////////////////////////////////////////// -->
<div class="right-products">
</div>
</div>
<footer style=" margin-top:100px; position:relative; background-color: black; color:white !important;">
</footer>
</body>
</html>
<script type="module">
import navbar from "./components/navbar.js"
import timer from "./scripts/timer.js"
import cousreList from "./components/courseList.js"
import footer from "./components/footer.js"
document.querySelector("nav").innerHTML = navbar()
document.querySelector("footer").innerHTML = footer()
timer(document.querySelector(".timer"))
document.querySelector(".remove-sale").addEventListener("click", () => {
document.querySelector(".sale-nav").style.display = "none"
})
if (JSON.parse(localStorage.getItem("theme")) == "dark") {
document.querySelector("body").classList.add("dark-theme")
document.querySelector("#logo-img").src = "https://www.udemy.com/staticx/udemy/images/v7/logo-udemy-inverted.svg"
} else {
document.querySelector("#logo-img").src = "https://www.udemy.com/staticx/udemy/images/v7/logo-udemy.svg"
document.querySelector("body").classList.remove("dark-theme")
}
document.querySelector(".mods").addEventListener("click", () => {
document.querySelector(".mods").classList.toggle("light-mode")
changeTheme()
})
function changeTheme() {
let mode = JSON.parse(localStorage.getItem("theme"))
if (mode == "dark") {
document.querySelector("#logo-img").src = "https://www.udemy.com/staticx/udemy/images/v7/logo-udemy.svg"
document.querySelector("body").classList.remove("dark-theme")
localStorage.setItem("theme", JSON.stringify("light"))
} else {
document.querySelector("body").classList.add("dark-theme")
document.querySelector("#logo-img").src = "https://www.udemy.com/staticx/udemy/images/v7/logo-udemy-inverted.svg"
localStorage.setItem("theme", JSON.stringify("dark"))
}
}
let d = JSON.parse(localStorage.getItem("pData"))
cousreList(d, document.querySelector(".slide"))
document.querySelector("#slide1").onclick = () => {
document.querySelector(".slide").style.marginLeft = "-1292px"
document.querySelector("#slideP1").style.display = "flex"
document.querySelector("#slide1").style.display = "none"
}
document.querySelector("#slideP1").onclick = () => {
document.querySelector(".slide").style.marginLeft = "0"
document.querySelector("#slideP1").style.display = "none"
document.querySelector("#slide1").style.display = "flex"
}
let t = document.querySelectorAll(".fil-title")
for (let i = 0; i < t.length; i++) {
t[i].addEventListener("click", () => {
t[i].classList.toggle("fil-active")
})
}
let login = JSON.parse(localStorage.getItem("log"))
if (login.log == true) {
document.querySelector(".sign-log").classList.add("loged")
document.querySelector(".user").textContent = login.user[0]
}
</script>
<script>
function fil(val, cat) {
let filter = { val: val, cat: cat }
localStorage.setItem("filter", JSON.stringify(filter))
}
let p = document.querySelectorAll(".fil-data>p");
for (let i = 0; i < p.length; i++) {
p[i].addEventListener("click", () => {
p[i].childNodes[1].setAttribute("checked", "true");
p[i].classList.toggle("p-ac-cat");
checkP(p[i]);
});
}
function checkP(p) {
if (!p.classList.contains("p-ac-cat")) {
p.childNodes[1].removeAttribute("checked");
}
8146666686
}
document.querySelector(".filter-toggle").addEventListener("click", () => {
document.querySelector(".left-filters").classList.toggle("filters-disabled")
})
</script>
<script type="module" src="scripts/search.js"></script>
<script type="module" src="scripts/cat-menu.js"></script>
<script type="module" src="scripts/product.js"></script>
<script type="module" src="scripts/fil-cat.js"></script>