-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwin98-theme.html
184 lines (167 loc) · 6.02 KB
/
win98-theme.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
176
177
178
179
180
181
182
183
184
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Now Playing - Win98</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Courier New", monospace; /* Police rétro */
background-color: transparent; /* Fond noir */
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.now-playing-container {
width: 420px;
background-color: #c0c0c0; /* Fond gris clair */
display: flex;
flex-direction: column;
padding: 5px;
}
.title-bar {
background-color: #000080; /* Bleu foncé */
color: white;
padding: 2px 5px;
font-size: 14px;
display: flex;
align-items: center;
height: 24px;
border-bottom: 2px solid #808080;
}
.content {
display: flex;
flex-direction: row;
gap: 5px;
padding: 5px;
}
.content-left {
display: flex;
flex-direction: column;
gap: 5px;
}
.music-cover {
width: 100px;
height: 100px;
border: 2px solid #000; /* Bordure noire */
object-fit: cover;
}
.content-right {
flex: 1;
display: flex;
flex-direction: column;
gap: 5px;
}
.music-body {
flex: 1;
background-color: #000; /* Fond noir */
padding: 5px;
color: white;
border: 2px solid #808080;
box-shadow: inset -2px -2px #fff, inset 2px 2px #000;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
height: 80px;
}
.music-name {
font-size: 16px; /* Texte plus grand */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: white;
}
.music-artist {
font-size: 14px; /* Texte plus grand pour l'artiste */
color: #a0a0a0; /* Texte gris clair pour l'artiste */
margin-top: 5px;
}
.progress-bar-container {
display: flex;
align-items: center;
background-color: #c0c0c0; /* Fond gris clair */
padding: 2px;
height: 20px;
}
.progress-bar {
flex: 1;
background-color: #808080; /* Fond gris sombre */
height: 8px;
position: relative;
border: 1px solid #000;
}
.progress-bar-handle {
width: 12px; /* Curseur légèrement plus large */
height: 16px;
background-color: #c0c0c0;
border: 2px solid #000;
position: absolute;
left: 23%; /* Curseur centré */
transform: translateX(-50%);
top: -4px;
}
</style>
</head>
<body>
<div class="now-playing-container">
<div class="title-bar">Music_Player.exe</div>
<div class="content">
<div class="content-left">
<img
id="cover"
class="music-cover"
src=""
alt="Album Cover"
crossOrigin="anonymous"
/>
</div>
<div class="content-right">
<div class="music-body">
<div class="music-name" id="title">The_Smile_-_Wall_of_Eyes.mp3</div>
<div class="music-artist" id="artist">The Smile</div>
</div>
<div class="progress-bar-container">
<div class="progress-bar">
<div class="progress-bar-handle"></div>
</div>
</div>
</div>
</div>
</div>
<script>
const coverElement = document.getElementById("cover");
const titleElement = document.getElementById("title");
const artistElement = document.getElementById("artist");
let currentTitle = "";
let currentArtist = "";
let currentCoverUrl = "";
function refreshContent() {
fetch("/now-playing-data")
.then((response) => response.json())
.then((data) => {
if (
data.title &&
(data.title !== currentTitle || data.coverUrl !== currentCoverUrl)
) {
titleElement.textContent = data.title;
artistElement.textContent = data.artist || "Unknown Artist";
coverElement.src = data.coverUrl || coverElement.src;
currentTitle = data.title;
currentArtist = data.artist;
currentCoverUrl = data.coverUrl;
}
})
.catch((error) => console.error("Error fetching data:", error));
}
refreshContent();
setInterval(refreshContent, 5000);
</script>
</body>
</html>