-
Notifications
You must be signed in to change notification settings - Fork 0
/
showmovie.html
121 lines (107 loc) · 2.95 KB
/
showmovie.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
<!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>Watch movies here</title>
<link rel="stylesheet" href="./components/footer.css" />
<link rel="stylesheet" href="./components/navbar.css" />
<style>
* {
background-color: #0f0617;
}
#ss_container {
border: 1px solid;
width: 20%;
height: 400px;
margin: auto;
border-radius: 10px;
}
#ss_container > img {
width: 100%;
height: 100%;
border-radius: 10px;
/* margin-top: 100px; */
}
button {
width: 18%;
height: 40px;
background-color: #8230c6;
border-radius: 5px;
margin-left: -10px;
}
button:hover {
background-color: #460f73;
}
button > a {
width: 100%;
text-decoration: none;
color: white;
font-weight: bold;
}
#sh_navbar > #sh_navbar > #sh_container1 > div > a {
font-size: 17px;
font-weight: bold;
}
/* #sh_navbar > #sh_navbar {
padding-bottom: 15px;
} */
</style>
</head>
<body>
<div id="sh_navbar"></div>
<div id="sh_result"></div>
<div id="sh_main">
<div id="ss_container"></div>
<div id="sh_footer"></div>
</div>
</body>
</html>
<script type="module">
let pic = JSON.parse(localStorage.getItem("movie"));
console.log(pic);
let cont = document.getElementById("ss_container");
function getPic() {
let img = document.createElement("img");
img.src = pic;
cont.append(img);
}
getPic();
import {
navbar,
getData,
appendData,
main,
debouncing,
id,
naam,
loggeduser,
logout,
} from "./components/navcom.js";
// console.log(navbar());
// document.getElementById("sh_navbar").innerHTML = navbar();
let navContainer = document.getElementById("sh_navbar");
navContainer.innerHTML = navbar();
document.getElementById("search").addEventListener("input", debouncing);
document.getElementById("search").addEventListener("focus", () => {
document.getElementById("sh_main").setAttribute("class", "sh_blury");
});
document.getElementById("search").addEventListener("focusout", () => {
document.getElementById("sh_main").setAttribute("class", "");
window.location.reload();
});
//<--------Footer Importing and appending-------->
import footer from "./components/footer.js";
let footContainer = document.getElementById("sh_footer");
footContainer.innerHTML = footer();
//<----------Showing UserName and Logout Functionality------->
let login = localStorage.getItem("login") || "false";
if (login === "true") {
naam(login);
}
document.getElementById("login").addEventListener("click", (e) => {
e.preventDefault();
logout(login);
});
</script>