-
Notifications
You must be signed in to change notification settings - Fork 593
/
spotify.natemoo-re.html.j2
131 lines (106 loc) · 2.73 KB
/
spotify.natemoo-re.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<svg width="320" height="{{height}}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="cardTitle" role="img">
<title id="cardTitle">Now playing on Spotify</title>
<foreignObject width="320" height="{{height}}">
<style>
div {
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
}
.container {
display: flex;
align-items: center;
border-radius: 10px;
padding: 10px 10px
}
.cover-link {
height: 64px;
}
.cover {
border-radius: 1px;
margin-right: 10px;
}
.playing {
display: flex;
justify-content: center;
align-items: center;
color: #53b14f;
font-weight: bold;
text-align: center;
margin-bottom: 8px;
}
.not-play {
color: #ff1616;
text-align: center;
margin-bottom: 0;
}
.artist {
color: #121212;
font-weight: 500;
font-size: 14px;
margin-bottom: 3px;
}
.song {
color: #212122;
font-size: 14px;
margin-bottom: 18px;
}
@media (prefers-color-scheme: light) {
.artist{
color: #121212;
}
.song{
color: #212122;
}
}
@media (prefers-color-scheme: dark) {
.artist{
color: #f4f4f4;
}
.song{
color: #dbdbdc;
}
}
#bars {
position: absolute;
height: 6px;
width: 220px;
overflow: hidden;
margin: -6px 0 0 0px;
}
.bar {
background: #{{bar_color|safe}};
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: 6px;
}
}
{{css_bar|safe}}
</style>
<div xmlns="http://www.w3.org/1999/xhtml" class="container">
{% if song_name %}
{% if cover_image %}
<a href="{}" target="_BLANK" class="cover-link">
<img src="data:image/png;base64, {{img}}" width="64" height="64" class="cover" />
</a>
{% endif %}
<div class="text-container">
<div class="artist">{{artist_name}}</div>
<div class="song">{{song_name}}</div>
<div id='bars'>{{content_bar|safe}}</div>
</div>
{% else %}
<div class="playing not-play">Nothing playing on Spotify</div>
{% endif %}
</div>
</foreignObject>
</svg>