-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
175 lines (132 loc) · 4.26 KB
/
index.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Radio</title>
<meta name="description" content="radio player vue.js audio vue.app" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<link rel="icon" type="image/svg+xml" href="img/fav.svg" />
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Jost:wght@400&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Tulpen+One&display=swap" rel="stylesheet" />
<!-- style CSS -->
<link href="css/style.css" rel="stylesheet" />
</head>
<body>
<!-- loader -->
<div class="loader">
<svg viewBox="-3 -4 39 39">
<polygon fill="#f1f1f1" stroke="#000" stroke-width="1" points="16,0 32,32 0,32">
</polygon>
</svg>
</div>
<!-- player -->
<div class="container" id="app">
<div class="player">
<div class="top-color">
<div class="code">
<a :href="`https://github.com/yojeero/`" target="_blank">
<svg>
<use xlink:href="img/icon.svg#icon-code"></use>
</svg></a>
</div>
<div class="speaker"></div>
<div class="point">
<a :href="currentTrack.url" target="_blank"></a>
</div>
</div>
<div class="main">
<div class="top-clock">
<div id="time"></div>
<div id="day"></div>
</div>
<div class="cover-img" id="spinner">
<transition-group :name="transitionName">
<div class="album-img" v-if="$index === currentTrackIndex"
:style="{ backgroundImage: `url(${track.cover})` }" v-for="(track, $index) in tracks"
:key="$index"></div>
</transition-group>
</div>
<div class="progress" ref="progress">
<div class="album-info" v-if="currentTrack">
<div class="name">{{ currentTrack.name }}</div>
<div class="artist">{{ currentTrack.artist }}</div>
</div>
<div class="progress_bar" @click="clickProgress">
<div class="line" :style="{ width : barWidth }"></div>
</div>
</div>
<div class="player-controls">
<div class="pn-icon" @click="prevTrack" @keyup.left="prevTrack" tabindex="0">
<svg>
<use xlink:href="img/icon.svg#icon-prev"></use>
</svg>
</div>
<div class="xl-icon" @click="play" onClick="spin();" @keyup.space="play" tabindex="0">
<svg>
<use xlink:href="img/icon.svg#p-stop" v-if="isTimerPlaying"></use>
<use xlink:href="img/icon.svg#p-play" v-else></use>
</svg>
</div>
<div class="pn-icon" @click="nextTrack" @keyup.right="nextTrack" tabindex="0">
<svg>
<use xlink:href="img/icon.svg#icon-next"></use>
</svg>
</div>
</div>
</div><!-- end main content -->
<div class="bottom-color">
<div class="bottom-label">
live
<div class="time">
<div class="time-label">
<svg>
<use xlink:href="img/icon.svg#icon-time"></use>
</svg>
</div>
<div class="time-radio">{{ currentTime }}</div>
</div>
time
</div>
</div>
</div><!-- end player -->
</div><!-- end container -->
<!-- jQuery + Vue JS -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.6.4/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.1/dist/vue.min.js"></script>
<script src="js/vue.player.js"></script>
<!-- loader hide -->
<script>
setTimeout(function () {
document.querySelector(".loader").style.display = "none";
}, 500);
</script>
<!-- SVG icons -->
<script src="https://cdn.jsdelivr.net/npm/svg4everybody@2.1.9/dist/svg4everybody.min.js" onload="svg4everybody({})" async=""></script>
<!-- clock -->
<script>
let updateClock = () => {
let t = new Date(),
e = [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
],
a = e[t.getDay()],
d = String(t.getHours()).padStart(2, "0"),
n = String(t.getMinutes()).padStart(2, "0"),
u = `${d}:${n}`;
(document.getElementById("time").textContent = `${u}`),
(document.getElementById("day").textContent = `${a}`);
};
setInterval(updateClock, 1e3), updateClock();
</script>
</body>
</html>