-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathoverlay.html
151 lines (150 loc) · 4.34 KB
/
overlay.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Aiden Wallis — Spotify Now Playing</title>
<link href="https://aidenwallis.co.uk/favicon.ico" rel="shortuct icon">
<script src="https://use.typekit.net/ddr3uqp.js"></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script>
<style>
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
}
html, body {
font-family: 'proxima-nova', sans-serif;
margin: 0;
overflow: hidden;
padding: 0;
}
.wrapper {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
width: 100vw;
height: 100vh;
}
#container {
width: 70px;
height: 70px;
position: relative;
background: #1b1d20;
margin: auto;
transition: opacity .4s ease, transform .4s ease, width .4s ease;
opacity: 0;
transform: translateY(300px);
}
#container.raise {
opacity: 1;
transform: translateY(0);
}
#container.active {
width: 350px;
}
img {
width: 70px;
height: 70px;
transition: opacity .4s ease;
opacity: 0;
position: absolute;
left: 0;
top: 0;
}
img.active {
opacity: 1;
}
.cover {
width: 70px;
height: 70px;
position: relative;
z-index: 9;
}
.main {
position: absolute;
padding-left: 70px;
padding-top: 10px;
top: 0;
height: 70px;
width: 100%;
max-width: 350px;
overflow: hidden;
}
#artists {
color: #25CBA3;
font-weight: 600;
margin: 0;
font-size: 15px;
text-transform: uppercase;
}
#name {
color: #fff;
margin: 4px 0 0;
font-size: 24px;
}
h4, h2 {
opacity: 0;
white-space: nowrap;
padding-left: 10px;
transform: translateX(-50px);
transition: opacity .4s ease, transform .4s ease;
display: inline-block;
}
h4.active, h2.active {
opacity: 1;
transform: translateX(0);
}
h4.drop, h2.drop {
transform: translateY(100px);
}
.artists-height-fix {
min-height: 20px;
}
h2.scrolling, h4.scrolling {
/* -webkit-animation: slide 30s linear infinite; */
position: absolute;
animation: slide 30s linear infinite;
}
@keyframes slide {
from {
/* left: 100%; */
transform: translateX(100%);
}
to {
/* left: -100%; */
transform: translateX(-100%);
}
}
</style>
</head>
<body>
<div class="wrapper">
<div id="container">
<div class="cover">
<img id="album-current" alt="Current album cover">
<img id="album-new" alt="New album cover">
</div>
<div class="main">
<div class="artists-height-fix"><h4 id="artists"></h4></div>
<h2 id="name"></h2>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/2.0.4/fetch.min.js" defer="defer"></script>
<script src="app.js?v=2" defer="defer"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-124482195-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-124482195-1');
</script>
</body>
</html>