-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
122 lines (114 loc) · 4.01 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
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
<!doctype html>
<html>
<head>
<title> RedLine ! </title>
</head>
<link rel="stylesheet" type="text/css" href='./style/bootstrap.min.css' />
<style>
body {
box-sizing: border-box;
overflow-x: hidden;
}
#header {
/* padding-left: 30px; */
/* padding-right: 30px; */
/* padding-bottom: 30px; */
margin-left: 30px;
margin-right: 30px;
margin-bottom: 10px;
height: 192px;
box-sizing: border-box;
color: white;
background-image: url(./img/nav_bar.png);
}
.imgClass {
padding: 30px;
padding-top: 30px;
}
.search{
width: 100%;
height: 80%;
font-size: 100px;
}
</style>
<body>
<!-- <div data-sticky-container>
<div class="title-bar" id='header' data-sticky data-options="marginTop:0;" style="width:100%">
<h1> Test </h1>
</div>
</div>-->
<div id="app">
<nav class="navbar navbar-light bg-faded sticky-top" id='header'>
<input type="text" class='search' v-model="search" />
</nav>
<!-- <div class="container"> -->
<div class='row' style='padding-top:30px'>
<div class='col-4' v-for='item in filteredShows'>
<div>
<img v-bind:src="'img/' + item['poster-image']" class='imgClass' width="100%"> </img>
</div>
<div>
<center>
{{ item.name }}
<hr/>
</center>
</div>
</div>
</div>
<div class='row' style="text-align:center">
<nav aria-label="Page navigation example">
<center>
<ul class="pagination pagination-lg">
<li class="page-item"><a class="page-link" href="#">Previous</a></li>
<li class="page-item active"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="https://diag-demo.herokuapp.com/page2.html">2</a></li>
<li class="page-item"><a class="page-link" href="https://diag-demo.herokuapp.com/page3">3</a></li>
<li class="page-item"><a class="page-link" href="https://diag-demo.herokuapp.com/page2.html">Next</a></li>
</ul>
</center>
</nav>
</div>
</div>
<!-- </div> -->
<script src='./script/vue.min.js'> </script>
<script src='./script/jquery.min.js'> </script>
<!-- <script src='./script/jquery.min.js'> </script>-->
<script>
window.onload = function (e) {
console.log('page start loading ...');
// val = value['page']['content-items']['content']
// console.log(val)
new Vue({
el: '#app',
data: function () {
return {
search: '',
message: []
};
},
computed:
{
filteredShows: function () {
var self = this;
return this.message.filter(function (shows) { return shows.name.toLowerCase().indexOf(self.search.toLowerCase()) >= 0; });
}
},
mounted: function(){
var self = this;
$.ajax({
// url: 'http://www.mocky.io/v2/59babf8b0f00003b036229d0',
url: "https://diag-demo.herokuapp.com/json.php?name=page1",
method: 'GET',
success: function(data){
self.message = data['page']['content-items']['content'];
},
error: function(error){
console.log("Error fetching data ... "+JSON.stringify(error))
}
})
}
})
}
</script>
</body>
</html>