-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
260 lines (212 loc) · 15.2 KB
/
index.html
File metadata and controls
260 lines (212 loc) · 15.2 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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<!DOCTYPE html>
<html lang="en" class="dark">
<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 Flix - Watch the latest streaming movies online!</title>
<link rel="icon" type="image/x-icon" href="./src/img/watchflix-logo.png">
<!-- Box Icons -->
<script src="https://unpkg.com/boxicons@2.1.2/dist/boxicons.js"></script>
<link href='https://unpkg.com/boxicons@2.1.2/css/boxicons.min.css' rel='stylesheet'>
<!-- CSS -->
<link rel="stylesheet" href="./src/css/styles.css">
<link href="./src/dist/output.css" rel="stylesheet">
<script>
//Checking for dark/light theme in local storage
if (
localStorage.getItem('color-theme') === 'dark' ||
(!('color-theme' in localStorage) &&
window.matchMedia('(prefers-color-scheme: dark)').matches)
) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
</script>
</head>
<body class="dark:bg-zinc-800 bg-slate-100">
<!-- HEADER -->
<header class="fixed flex flex-row justify-between items-center gap-3 p-5 max-h-[80px] top-0 left-1/2 translate-x-[-50%] mx-auto w-full bg-transparent backdrop-blur-lg z-[999]">
<a href="./index.html" class="logo-container max-w-[40px]">
<img src="./src/img/watchflix-logo.png" alt="" class="w-full">
</a>
<ul class="hidden sm:flex md:flex-row justify-center items-center gap-8 m-auto">
<li
class="dark:text-neutral-100 text-neutral-700 font-normal mb-[2px] cursor-pointer border-b-2 border-transparent hover:border-purple-400">
<a href="#"> Home </a></li>
<li
class="dark:text-neutral-100 text-neutral-700 font-normal mb-[2px] cursor-pointer border-b-2 border-transparent hover:border-purple-400">
<a href="#topMovies"> Popular Movies </a></li>
<li
class="dark:text-neutral-100 text-neutral-700 font-normal mb-[2px] cursor-pointer border-b-2 border-transparent hover:border-purple-400">
<a href="#topTVs"> Popular TVs </a></li>
</ul>
<div class="header-right flex flex-row justify-center items-center gap-3">
<div id="searchForm"
class="search-form ml-auto cursor-pointer py-2 px-3 w-full max-w-[300px] rounded-lg flex flex-row justify-center items-center dark:text-neutral-100 dark:hover:bg-neutral-600 text-neutral-700 hover:bg-slate-200">
<form class=" flex flex-row justify-center items-center">
<i class='bx bx-search-alt-2 text-[1.4rem] font-bold text-center m-auto'></i>
<input type="search" name="search" id="searchBar" placeholder="Search here..."
class="w-0 dark:text-neutral-100 dark:hover:bg-neutral-600 dark:active:bg-neutral-600 dark:focus:bg-neutral-600 text-neutral-700 hover:bg-slate-200 active:bg-slate-200 focus:bg-slate-200 bg-transparent">
</form>
</div>
<button id="theme-toggle" type="button"
class="text-neutral-500 dark:text-neutral-100 hover:bg-purple-300 dark:hover:bg-purple-400 rounded-lg text-sm p-2.5">
<svg id="theme-toggle-dark-icon" class="w-5 h-5 hidden" fill="currentColor" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg">
<path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"></path>
</svg>
<svg id="theme-toggle-light-icon" class="w-5 h-5 hidden" fill="currentColor" viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg">
<path
d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z"
fill-rule="evenodd" clip-rule="evenodd"></path>
</svg>
</button>
</div>
</header>
<!-- Main Website Content / Disappears when user searches for something -->
<div class="section hero-main mt-[60px]">
<!-- Recommended Movie -->
<section class="section flex flex-col md:flex-row justify-center md:justify-center items-center gap-0 min-h-[400px]" id="recommendedMovies">
<img src="./src/img/test-2.png" alt="" class="max-w-[500px] w-full sm:w-[80%]">
<div class="text flex flex-col gap-1 justify-center items-center md:items-start md:translate-x-[-25%]">
<h1 class="section-title flex flex-row justify-center items-center gap-1 text-center dark:text-neutral-100 text-neutral-700 font-bold text-[3rem] sm:text-[4rem] mt-4 tracking-tight">
Watch<span class="ml-1 gradient-bg">Flix</span></h1>
<p class="font-normal dark:text-neutral-100 text-neutral-700 text-center">Watch your favourite live streaming movies and tv series!</p>
</div>
</section>
<!-- Top Movies -->
<section class="section flex flex-col justify-center items-start gap-6" id="topMovies">
<h1
class="section-title flex flex-row justify-center items-center gap-0 md:gap-1 dark:text-neutral-100 text-neutral-700 font-bold text-[1.5rem] sm:text-[2.3rem] text-left mt-4 tracking-tight">
Top <span class="ml-2 gradient-bg">Movies</span> <i
class='bx bx-chevron-right text-[1.2em] font-bold mt-[2%]'></i></h1>
<ul class="top-movies-left grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 place-content-center place-items-center gap-4 w-full"
id="topMoviesContainer">
<li class="movie-card flex flex-col justify-center items-start relative w-full max-w-[300px] rounded-lg mx-auto shadow-movieCard"
id="topMoviesCard">
<img src="https://i.ibb.co/h7Q936c/no-image-available.jpg" class="block mx-auto w-full rounded-lg"
id="movieImg">
<div
class="movie-details flex flex-col justify-between items-start gap-2 absolute bottom-[0%] z-10 p-5 duration-100 ease-in-out h-full w-full">
<div class="top-details mb-auto w-full flex flex-row justify-between items-center gap-3">
<p class="movie-tag px-2 py-1 text-[14px] text-primary-teal bg-primary-bg50 rounded-lg capitalize"
id="movieGenre">
Movie
</p>
<div class="rank-details flex flex-row justify-center items-center gap-1 ml-auto">
<p
class="text-[16px] text-neutral-100 font-normal flex flex-row justify-center items-center gap-1">
<i class='text-yellow-200 text-[1.1em] font-bold bx bxs-medal'></i>1</p>
<p
class="text-[16px] text-neutral-100 font-normal flex flex-row justify-center items-center gap-1">
<i
class='text-primary-teal text-[1.1em] mr-[-10%] font-bold bx bx-chevron-up'></i>3+
</p>
</div>
</div>
<div class="movie-rating flex flex-row justify-center items-center gap-1">
<i class='bx bxs-star text-yellow-300'></i>
<p class="text-[16px] text-neutral-100 font-normal">3.3</p>
<p class="text-[16px] text-neutral-100 font-normal">(8298)</p>
</div>
<h2 class="movie-name text-[20px] text-neutral-100 font-semibold" id="movieTitle">The Ring’s
Lord
</h2>
<a href=""
class="watch-now-btn-2 hidden relative duration-100 ease-in-out gap-1 text-[14px] flex-row justify-center items-center text-left text-neutral-100">Watch
Now <i class='bx bx-chevron-right text-[18px] font-bold'></i></a>
</div>
</li>
</ul>
</section>
<!-- Top TVs -->
<section class="section flex flex-col justify-center items-start gap-6" id="topTVs">
<h1
class="section-title flex flex-row justify-center items-center gap-1 dark:text-neutral-100 text-neutral-700 font-bold text-[1.5rem] sm:text-[2.3rem] text-left mt-4 tracking-tight">
Top <span class="ml-1 gradient-bg">TV Shows</span> <i
class='bx bx-chevron-right text-[1.2em] font-bold mt-[2%]'></i></h1>
<ul class="top-tvs-left grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 place-content-center place-items-center gap-4 w-full"
id="topTVsContainer">
<li class="movie-card flex flex-col justify-center items-start relative w-full max-w-[300px] rounded-lg mx-auto shadow-movieCard"
id="topTVsCard">
<img src="https://i.ibb.co/h7Q936c/no-image-available.jpg" class="block mx-auto w-full rounded-lg"
id="tvImg">
<div
class="movie-details flex flex-col justify-between items-start gap-2 absolute bottom-[0%] z-10 p-5 duration-100 ease-in-out h-full w-full">
<div class="top-details mb-auto w-full flex flex-row justify-between items-center gap-3">
<p class="movie-tag px-2 py-1 text-[14px] text-primary-teal bg-primary-bg50 rounded-lg capitalize"
id="tvsGenre">
TV Series
</p>
<div class="rank-details flex flex-row justify-center items-center gap-1 ml-auto">
<p
class="text-[16px] text-neutral-100 font-normal flex flex-row justify-center items-center gap-1">
<i class='text-yellow-200 text-[1.1em] font-bold bx bxs-medal'></i>1</p>
<p
class="text-[16px] text-neutral-100 font-normal flex flex-row justify-center items-center gap-1">
<i
class='text-primary-teal text-[1.1em] mr-[-10%] font-bold bx bx-chevron-up'></i>3+
</p>
</div>
</div>
<div class="movie-rating flex flex-row justify-center items-center gap-1">
<i class='bx bxs-star text-yellow-300'></i>
<p class="text-[16px] text-neutral-100 font-normal">3.3</p>
<p class="text-[16px] text-neutral-100 font-normal">(8298)</p>
</div>
<h2 class="movie-name text-[20px] text-neutral-100 font-semibold" id="movieTitle">The Ring’s
Lord
</h2>
<a href=""
class="watch-now-btn-2 hidden relative duration-100 ease-in-out gap-1 text-[14px] flex-row justify-center items-center text-left text-neutral-100">Watch
Now <i class='bx bx-chevron-right text-[18px] font-bold'></i></a>
</div>
</li>
</ul>
</section>
</div>
<!-- Display when user searches -->
<section class="mt-[90px] hero-sec section hidden flex-col justify-center items-center gap-6">
<div id="searchedMovie" class="flex flex-row justify-center items-center mb-1">
<h1
class="section-title text-center text-[1.5rem] md:text-[2rem] font-bold dark:text-neutral-100 text-neutral-700 mr-3">
Showing results for <span
class="gradient-hover-effect capitalize tracking-tight text-purple-400">Terminator</span>.
</h1>
</div>
<div class="search-filters flex flex-col md:flex-row gap-4 justify-center items-center mb-5" id="searchFilters">
<h3 class="text-[20px] dark:text-neutral-100 text-neutral-700 font-semibold tracking-tight">Filter Results:
</h3>
<div
class="filters grid grid-cols-1 mobile:grid-cols-2 md:grid-flow-col place-items-center place-content-center gap-3">
<button id="fm"
class="w-full filter-btn flex flex-row justify-center items-center gap-2 rounded-md text-center px-2 py-1 bg-slate-200 hover:bg-purple-300 dark:bg-neutral-500 dark:hover:bg-purple-400 dark:text-neutral-100 text-neutral-700 font-normal text-[15px] tracking-normal">
<i class='text-[20px] bx bx-camera-movie'></i> Movie </button>
<button id="fs"
class="w-full filter-btn flex flex-row justify-center items-center gap-2 rounded-md text-center px-2 py-1 bg-slate-200 hover:bg-purple-300 dark:bg-neutral-500 dark:hover:bg-purple-400 dark:text-neutral-100 text-neutral-700 font-normal text-[15px] tracking-normal">
<i class='text-[20px] bx bxs-film'></i> Series </button>
<button id="fclear"
class="w-full filter-btn flex flex-row justify-center items-center gap-1 rounded-md text-center px-2 py-1 bg-slate-200 hover:bg-purple-300 dark:bg-neutral-500 dark:hover:bg-purple-400 dark:text-neutral-100 text-neutral-700 font-normal text-[15px] tracking-normal">
<i class='text-[20px] bx bx-x-circle'></i> Clear All </button>
</div>
</div>
<ul class="movie-cards grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-5 place-content-between w-full mx-auto"
id="cardsContainer">
<!-- movie card displays here from js -->
</ul>
</section>
<!-- Footer -->
<footer
class="flex flex-row justify-center items-center gap-2 px-3 py-6 text-[13px] sm:text-[16px] dark:text-neutral-100 text-neutral-700 w-full">
© 2022 <strong><a target="_blank" href="https://saimcode.vercel.app/" class="pb-1 hover:border-b-2">Saim
Qureshi</a></strong> All Rights Reserved.
</footer>
<!-- JS -->
<script src="./src/js/app.js"></script>
<script src="./src/js/homePage.js"></script>
<script src="./src/js/themeSwitch.js"></script>
</body>
</html>