/
index.html
74 lines (69 loc) · 2.96 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
74
<!DOCTYPE html>
<html>
<head>
<title>YTS Torrent</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="static/css/style.css">
</head>
<body>
<div class="container">
<div id="vue-app">
<h2 v-on:click="getMovies()">YTS Torrents</h2>
<!-- Filters -->
<div class="filters">
<div class="form-inline">
<div class="form-group">
<input type="text" placeholder="Search movie.." class="form-control" v-model="queryTerm">
<input type="button" class="btn btn-success" v-on:click="getMovies(1, queryTerm)" value="Search Movies">
</div>
</div>
</div>
<hr>
<!-- Main content -->
<div v-if="movies">
<div v-if="movies.length > 0">
<table class="table table-hover">
<thead>
<tr>
<td><h3>SN</h3></td>
<td><h3>Title</h3></td>
<td><h3>Released on</h3></td>
<td><h3>Rating</h3></td>
<td><h3>Genre</h3></td>
<td><h3>Image</h3></td>
<td><h3>Download</h3></td>
</tr>
</thead>
<tbody>
<tr v-for="movie in movies">
<td><h4> {{ movies.indexOf(movie) + 1 }} </h4></td>
<td><h4>{{ movie.title_english }}</h4></td>
<td>{{ movie.year }}</td>
<td>{{ movie.rating }}</td>
<td>
<p v-for="g in movie.genres">{{ g }} </p>
</td>
<td><img height="100px" v-bind:src="movie.medium_cover_image"></td>
<td>
<a v-for="l in movie.torrents" v-bind:href="l.url">
<input type="button" class="btn btn-success" v-bind:value="l.quality">
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div v-else>
<h2> Searching ... </h2>
</div>
</div>
<div v-else>
<h2> {{ memory.queryTerm }} - Not Found </h2>
</div>
</div>
</div>
<script src="https://unpkg.com/vue/dist/vue.min.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="static/js/app.js"></script>
</body>
</html>