-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
72 lines (66 loc) · 2.09 KB
/
index.php
File metadata and controls
72 lines (66 loc) · 2.09 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="index.css">
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<title>TMDB | Movie</title>
</head>
<body>
<nav class="navbar">
<div class="content">
<div class="logo">
<a href="#">TMDB</a>
</div>
<ul class="menu-list">
<div class="icon cancel-btn">
<i class="fas fa-times"></i>
</div>
<li><a href="#">Home</a></li>
<li><a href="login.php">Recommendation</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.php" >Contact</a></li>
<li><a href="sign-up.php" >sign up</a></li>
</ul>
<div class="icon menu-btn">
<i class="fas fa-bars"></i>
</div>
</div>
</nav>
<div class="banner"></div>
<header>
<form id="form">
<input type="text" placeholder="Search" id="search" class="search">
</form>
</header>
<div id="tags"></div>
<main id="main"></main>
<div class="pagination">
<div class="page" id="prev">Previous Page</div>
<div class="current" id="current">1</div>
<div class="page" id="next">Next Page</div>
</div>
<script src="index.js"></script>
<!-- navbar script -->
<script>
const body = document.querySelector("body");
const navbar = document.querySelector(".navbar");
const menuBtn = document.querySelector(".menu-btn");
const cancelBtn = document.querySelector(".cancel-btn");
menuBtn.onclick = ()=>{
navbar.classList.add("show");
menuBtn.classList.add("hide");
body.classList.add("disabled");
}
cancelBtn.onclick = ()=>{
body.classList.remove("disabled");
navbar.classList.remove("show");
menuBtn.classList.remove("hide");
}
window.onscroll = ()=>{
this.scrollY > 20 ? navbar.classList.add("sticky") : navbar.classList.remove("sticky");
}
</script>
</body>
</html>