/
info.html
135 lines (135 loc) · 3.71 KB
/
info.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
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js" defer></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<style media="screen">
@font-face {
font-family: Lato;
src: url('http://fonts.googleapis.com/css?family=Lato');
}
@keyframes loaded {
from { opacity: 1; }
to { opacity: 0; display: none; z-index: -1 }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
body {
margin: 0px;
}
button, input[type="button"] {
padding: 12px 16px;
font-family: 'Lato', sans-serif;
font-size: 18px;
font-weight: 700;
color: #FFF;
background: #F22539;
border-radius: 60px;
border-style: none;
cursor: pointer;
}
header {
height: 40%;
width: 100%;
}
header > img {
max-height: 100%;
width: 100%;
object-fit: cover;
}
hr {
background: #E8E8E8;
}
main {
height: 60%;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
main > .info > span {
font-size: 18px;
padding: 8px 0px;
font-family: 'Lato', sans-serif;
font-weight: 700;
color: #5E5E5E
}
.info {
padding-top: 8px;
width: 85%;
height: 60%;
}
.info > span.data {
font-weight: 500;
}
.sprite {
background: url("image 14.svg");
background-repeat: no-repeat;
background-size: cover;
background-position: bottom;
text-align: center;
height: 40%;
width: 100%;
}
.sprite > img {
width: 30%;
object-fit: cover;
transform: translate(0%,6%);
}
#preloader {
position: fixed;
width: 100%;
height: 100%;
background: #fff;
z-index: 10;
display: flex;
justify-content: center;
align-items: center;
}
#preloader > img {
position: fixed;
animation: spin 2s linear infinite;
}
@media screen and (max-width: 553px) {
.sprite > img {
width: 35%;
}
}
@media screen and (max-width: 400px) {
.sprite > img {
width: 50%;
}
}
</style>
</head>
<body onload="loaded()">
<div id="preloader">
<img src="Loader.svg" alt="">
</div>
<main id="app">
<div class="sprite">
<img v-bind:src="artwork" alt="">
</div>
<div class="info">
<span id="pokemon-name">Name: </span><span class="data">{{ name | capitalize }}</span><hr>
<span>Weight: </span><span class="data">{{ weight }}</span><hr>
<span>Height: </span><span class="data">{{ height }}</span><hr>
<span>Types: </span><span class="data">{{ types | enlist }} </span><hr>
<button type="button" name="button" class="copy-button" v-on:click="clipboard()">Share to my friends</button>
</div>
</main>
<script type="text/javascript">
function loaded() {
document.getElementById('preloader').style.animation = "loaded 0.5s ease 1 forwards";
}
</script>
<script src="./js/pokemon_info.js" defer></script>
</body>
</html>