-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiscover.html
More file actions
226 lines (206 loc) · 7.61 KB
/
discover.html
File metadata and controls
226 lines (206 loc) · 7.61 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
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
<!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="discover.css" />
<link rel="shortcut icon" href="pngegg (1).png" type="image/x-icon" />
<!-- lINKS -->
<!-- GOOGLE FONTS -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Nunito:wght@300&display=swap"
rel="stylesheet"
/>
<!-- OWL CAROUSEL -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css"
integrity="sha512-tS3S5qG0BlhnQROyJXvNjeEM4UpMXHrQfTGmbQ1gKmelCxlSEBUaxhRBj/EFTzpbP4RVSrpEikbmdJobCvhE3g=="
crossorigin="anonymous"
/>
<!-- BOX ICONS -->
<link
href="https://unpkg.com/boxicons@2.0.7/css/boxicons.min.css"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.6.0/css/all.min.css"
integrity="sha512-q3eWabyZPc1XTCmF+8/LuE1ozpg5xxn7iO89yfSOd5/oKvyqLngoNGsx8jq92Y8eXJ/IRxQbEC+FGSYxtk2oiw=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<script
src="https://kit.fontawesome.com/d2994d5c9d.js"
crossorigin="anonymous"
></script>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"
integrity="sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<title>MvHub</title>
</head>
<body>
<!-- NAV -->
<div class="nav-wrapper">
<div class="container">
<div class="nav">
<a href="index.html" class="logo">
<i class="bx bxs-movie-play bx-tada" style="color: #e80909"></i
>Mv<span class="main-color">H</span>ub
</a>
<ul class="nav-menu" id="nav-menu">
<li><a href="index.html" class="home">Home</a></li>
<li><a href="discover.html">Discover</a></li>
<li><a href="movies.html">Movies</a></li>
<li><a href="series.html">Series</a></li>
<li><a href="about.html">About</a></li>
<li>
<a href="#" class="btn btn-hover">
<span>Sign in</span>
</a>
</li>
</ul>
<!-- MOBILE MENU TOGGLE -->
<div class="hamburger-menu" id="hamburger-menu">
<div class="hamburger"></div>
</div>
</div>
</div>
</div>
<!-- END NAV -->
<header>
<form id="form">
<input type="text" placeholder="Search" id="search" class="search" />
</form>
</header>
<div class="section">
<div class="container">
<div id="tags"></div>
<div id="myNav" class="overlay">
<!-- Button to close the overlay navigation -->
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()"
>×</a
>
<!-- Overlay content -->
<div class="overlay-content" id="overlay-content"></div>
<a href="javascript:void(0)" class="arrow left-arrow" id="left-arrow"
>⇐</a
>
<a
href="javascript:void(0)"
class="arrow right-arrow"
id="right-arrow"
>⇒</a
>
</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>
</div>
</div>
<!-- SCRIPT -->
<!-- JQUERY -->
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous"
></script>
<!-- OWL CAROUSEL -->
<script
src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"
integrity="sha512-bPs7Ae6pVvhOSiIcyUClR7/q2OAsRiovw4vAkX+zJbw3ShAeeqezq50RIIcIURq7Oa20rW2n2q+fyXBNcU9lrw=="
crossorigin="anonymous"
></script>
<!-- APP SCRIPT -->
<script src="app.js"></script>
<script src="discover.js"></script>
</body>
<script type="module" defer>
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.1.0/firebase-app.js";
import {
getAuth,
GoogleAuthProvider,
signInWithRedirect,
getRedirectResult,
signInWithPopup,
} from "https://www.gstatic.com/firebasejs/10.1.0/firebase-auth.js";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "AIzaSyANqDpvDf6nXKA2SydEz5CqjhLg7CU_Q4M",
authDomain: "mvhub-bbc88.firebaseapp.com",
projectId: "mvhub-bbc88",
storageBucket: "mvhub-bbc88.appspot.com",
messagingSenderId: "506272938140",
appId: "1:506272938140:web:88f716e22f17635bc85559",
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const auth = getAuth(app);
const provider = new GoogleAuthProvider(app);
login.addEventListener("click", (e) => {
// signInWithRedirect(auth, provider);
// getRedirectResult(auth)
// .then((result) => {
// // This gives you a Google Access Token. You can use it to access Google APIs.
// const credential = GoogleAuthProvider.credentialFromResult(result);
// const token = credential.accessToken;
// // The signed-in user info.
// const user = result.user;
// // IdP data available using getAdditionalUserInfo(result)
// // ...
// }).catch((error) => {
// // Handle Errors here.
// const errorCode = error.code;
// const errorMessage = error.message;
// // The email of the user's account used.
// const email = error.customData.email;
// // The AuthCredential type that was used.
// const credential = GoogleAuthProvider.credentialFromError(error);
// // ...
// });
signInWithPopup(auth, provider)
.then((result) => {
// This gives you a Google Access Token. You can use it to access the Google API.
const credential = GoogleAuthProvider.credentialFromResult(result);
const token = credential.accessToken;
// The signed-in user info.
const user = result.user;
// IdP data available using getAdditionalUserInfo(result)
// name=diplayName
// email=email
// photo = photoURL
alert(user.diplayName);
})
.catch((error) => {
// Handle Errors here.
const errorCode = error.code;
const errorMessage = error.message;
// The email of the user's account used.
const email = error.customData.email;
// The AuthCredential type that was used.
const credential = GoogleAuthProvider.credentialFromError(error);
// ...
alert(errorMessage);
});
});
</script>
</html>