-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
73 lines (71 loc) · 2.95 KB
/
index.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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<!-- link fontawesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css">
<!-- Link css -->
<link rel="stylesheet" href="css/style.css">
<!-- Link Vue -->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<!-- Link axios -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.20.0/axios.min.js"></script>
<title>Boolflix</title>
</head>
<body>
<div id="app">
<div id="header">
<img src="img/Boolflix-Logo.png" alt="" @click="popularShows">
<!-- Search tool -->
<div class="search-tool">
<input v-model="search" v-on:keyup.13="searchMovie" placeholder="Search">
<button @click="searchMovie"><i class="fas fa-search"></i></button>
</div>
<!-- Filters -->
<div>
<span @click="filterTv">Tv Shows</span> |
<span @click="filterMovie">Movies</span> |
<span @click="showLang = !showLang; showGenre = false">Language <i class="fas fa-sort-down"></i></span> |
<span @click="showGenre = !showGenre; showLang = false">Genre <i class="fas fa-sort-down"></i></span>
<!-- Language List -->
<div class="filter language" v-if="showLang">
<ul>
<li v-for="(language, index) in languages">{{language.english_name}}</li>
</ul>
</div>
<!-- Genre List -->
<div class="filter genre" v-if="showGenre">
<ul>
<li v-for="(genre, index) in genres">{{genre.name}}</li>
</ul>
</div>
</div>
</div>
<div id="movies">
<h1>{{mainText}}</h1>
<!-- Poster -->
<div class="poster" v-for="(movie, index) in moviesTv">
<img v-if="movie.poster_path===null" src="img/no-cover.png" alt="">
<img v-else :src="'https://image.tmdb.org/t/p/w342/' + movie.poster_path" alt="Poster">
<!-- Overlay -->
<div class="overlay">
<!-- Movie title -->
<p><span>Title:</span> {{movie.title || movie.name}}</p>
<p><span>Original Title:</span> {{movie.original_title || movie.original_name}}</p>
<!-- Original language -->
<div class="language">
<span>Original Language:</span>
<img class="flag" :src="'img/' + movie.original_language + '.svg'" :alt="movie.original_language">
</div>
<!-- Stars -->
<i class="fas fa-star" v-for="vote in Math.ceil(movie.vote_average / 2)"></i><i class="far fa-star" v-for="vote in 5 - (Math.ceil(movie.vote_average / 2))"></i>
<!-- Overview -->
<p v-if="movie.overview!==''" ><span>Overview:</span> {{movie.overview}}</p>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/script.js">
</script>
</body>
</html>