-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage.html
115 lines (98 loc) · 2.93 KB
/
page.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
<!DOCTYPE html>
<html lang="en">
<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>page</title>
<style>
h1 {
color: rgb(182, 179, 179);
}
.append {
display: grid;
grid-template-columns: repeat(5, 1fr);
grid-gap: 15px;
margin: auto;
padding: 5px;
}
.append>div img {
width: 260px;
border-radius: 8px;
transition: all .2s;
transition-delay: .2s;
cursor: pointer;
}
.append>div img:hover {
transform: scale(1.3);
}
#padding {
padding: 30px;
}
#take {
color: #fff;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: #0C111B;
}
ul {
display: flex;
background-color: #131A28;
padding: 17px;
justify-content: space-between;
padding-left: 55px;
padding-right: 120px;
align-items: center;
animation: all 2s;
}
h1,
.append {
padding: 17px;
padding-left: 55px;
padding-right: 200px;
}
li {
list-style-type: none;
}
</style>
</head>
<body>
<nav>
<ul>
<li>
<a href="index.html"><img src="https://secure-media.hotstarext.com/web-assets/prod/images/brand-logos/disney-hotstar-logo-dark.svg" alt="hotstar"></a>
</li>
</ul>
</nav>
<h1>Showing all results for <span id="take"></span></h1>
<div class="append"></div>
</div>
</body>
</html>
<script>
const EXCTRA_IMG__LINK = 'https://image.tmdb.org/t/p/w500/';
const getinfo = JSON.parse(localStorage.getItem('Result'));
const searchchara = JSON.parse(localStorage.getItem('query'));
document.querySelector('#take').innerText = searchchara;
getinfo.map(function(el, i) {
var box = document.createElement('div');
let img = document.createElement('img');
if (el.backdrop_path == null) {
// el.backdrop_path.pop()
} else {
img.src = EXCTRA_IMG__LINK + el.backdrop_path;
box.append(img);
document.querySelector('.append').append(box);
}
img.addEventListener('click', function() {
window.location.href = 'movieinfo.html';
localStorage.setItem('movieinfo', JSON.stringify(el));
});
});
</script>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1490922135309990" crossorigin="anonymous"></script>