-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
spotify.html.j2
111 lines (94 loc) · 3.3 KB
/
spotify.html.j2
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
<svg width="480" height="133" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<foreignObject width="480" height="133">
<div xmlns="http://www.w3.org/1999/xhtml" class="container">
<style>
div {
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
}
.main {
/*margin-top: 40px;*/
display: flex;
}
.currentStatus {
position: static;
float: left;
font-size: 24px;
margin-top: -5px;
margin-left: 10px;
}
.container {
border-radius: 5px;
padding: 10px 10px 10px 0px;
}
.art {
float: left;
width: 27%;
margin-left: -5px;
}
.content {
width: 71%;
}
.song {
font-size: 24px;
color: #666;
text-align: center;
margin-top: 3px;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
.artist {
font-size: 20px;
color: #b3b3b3;
text-align: center;
margin-bottom: 5px;
margin-top: 4px;
}
.cover {
border-radius: 5px;
height: 100px;
width: 100px;
}
#bars {
height: 30px;
bottom: 23px;
margin: -20px 0 0 0px;
position: absolute;
width: 40px;
}
.bar {
background: #1DB954cc;
bottom: 1px;
height: 3px;
position: absolute;
width: 3px;
animation: sound 0ms -800ms linear infinite alternate;
}
@keyframes sound {
0% {
opacity: .35;
height: 3px;
}
100% {
opacity: 1;
height: 15px;
}
}
{{barCSS|safe}}
</style>
<!-- <div class="currentStatus">{{status}}</div> -->
<div class="main">
<a class="art" href="{}" target="_BLANK">
<center>
<img src="data:image/png;base64, {{image}}" class="cover" />
</center>
</a>
<div class="content">
<div class="song">{{songName}}</div>
<div class="artist">{{artistName}}</div>
<div id="bars">{{contentBar|safe}}</div>
</div>
</div>
</div>
</foreignObject>
</svg>