-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
470 lines (395 loc) · 22 KB
/
index.html
File metadata and controls
470 lines (395 loc) · 22 KB
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>moonweft</title>
<link rel="stylesheet" href="styles/base.css">
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=VT323&display=swap" rel="stylesheet">
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon-32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon-16.png">
</head>
<body>
<div class="scanlines"></div>
<div class="site-container">
<div class="split-layout">
<div class="main-window">
<header class="site-banner">
<img src="assets/banner.png" alt="moonweft banner" class="banner-img">
</header>
<nav class="top-nav">
<a href="#">[home]</a>
<a href="projects.html">[projects]</a>
<a href="community.html">[board]</a>
<a href="notes.html">[blog]</a>
</nav>
<main>
<div class="about-card">
<div class="about-header">About</div>
<div class="about-content">
<p>Hello I'm <strong>meledo</strong>.</p>
<p>I fell down the Neocities rabbit hole recently and got inspired to make my own little website.</p>
<p>I'll post anything that I'm currently working on here. You can check out some of my projects and links below as well as some blog posts.</p>
<div class="about-actions">
<a href="projects.html" class="leak-btn p5-style">
<span class="p5-bg-layer"></span>
<img src="assets/projects-text.png" alt="PROJECTS" class="p5-img">
</a>
<a href="community.html" class="leak-btn board-style-btn">
BOARD
</a>
</div>
<p class="code-tidbit"><a target="_blank" href="https://copyheart.org/manifesto/">Copying is an act of love</a>. If you liked anything here, feel free to copy.<br>The code here is free and open source under GPLv3.</p>
</div>
</div>
<hr class="dashed-line">
<article class="card fetch-card">
<div class="fetch-art">
<pre>
/\
/ \
/\ \
/ > ω <\
/ __ \
/ __| |__-\
/_-'' ''-_\
</pre>
</div>
<div class="fetch-info">
<div class="fetch-title">user@moonweft</div>
<div class="fetch-separator">----------</div>
<div class="fetch-row">
<span class="key">OS:</span>
<span class="val">Arch Linux btw</span>
</div>
<div class="fetch-row">
<span class="key">Shell:</span>
<span class="val">zsh</span>
</div>
<div class="fetch-row">
<span class="key">Github:</span>
<span class="val"><a href="https://github.com/mel-edo" target="_blank" rel="noopener noreferrer">/mel-edo</a></span>
</div>
<div class="fetch-row">
<span class="key">Time:</span>
<span class="val" id="clock">loading...</span>
</div>
<div class="fetch-colors">
<span class="color-box c1"></span>
<span class="color-box c2"></span>
<span class="color-box c3"></span>
<span class="color-box c4"></span>
<span class="color-box c5"></span>
</div>
</div>
</article>
<div class="blog-section">
<div class="section-title">
<span>Recent Posts</span>
<a href="notes.html">[all]</a>
</div>
<div class="blog-list" id="homepage-blog-list"></div>
</div>
<a href="checkpoint.html" class="checkpoint-banner">
<div class="cp-icon">
<img src="assets/bonfire.png" alt="bonfire">
</div>
<div class="cp-text">
<div class="cp-title">INTERNET CHECKPOINT</div>
<div class="cp-sub">Take a rest. Save your progress</div>
</div>
<div class="cp-arrow">-></div>
</a>
</main>
</div>
<aside class="sidebar">
<div class="card music-card">
<div class="music-header">
<span class="music-icon">[♫]</span>
<span id="lf-status">[OFFLINE]</span>
</div>
<div class="music-info">
<div class="music-art">
<img id="lf-art" src="assets/vinyl.png" alt="album art">
</div>
<div class="music-details">
<div id="lf-track" class="track-name">Loading...</div>
<div id="lf-artist" class="artist-name">---</div>
</div>
</div>
</div>
<div class="card status-card">
<div class="card-header">[discord]</div>
<div class="status-content" id="discord-widget">
<div class="status-icon">
<img id="discord-pfp" src="assets/default-pfp.png" alt="pfp">
<div class="status-dot" id="discord-status-dot"></div>
</div>
<div class="status-details">
<div id="discord-username">loading...</div>
<div id="discord-activity" class="scrolling-text">connecting...</div>
</div>
</div>
</div>
<div class="card status-card">
<div class="card-header">[steam]</div>
<div class="status-content">
<div class="status-icon">
<img id="steam-icon" src="assets/steam-icon.png" alt="steam">
</div>
<div class="status-details">
<div id="steam-status-text" class="recently-played">Recently Played</div>
<div id="steam-game" class="highlight-text">loading...</div>
</div>
</div>
</div>
<div class="card moon-widget">
<div class="mw-header">[moon]</div>
<div class="mw-decor-tl">+</div>
<div class="mw-decor-tr">?</div>
<div class="mw-icon-container">
<div id="mw-visual" class="pixel-moon">0</div>
</div>
<div class="mw-data">
<div class="mw-row">
<span class="mw-label">Phase:</span>
<span id="mw-phase" class="mw-val-yellow">Calculating...</span>
</div>
</div>
</div>
<div class="card visitor-panel">
<div class="visitor-header">[visitor counter]</div>
<div class="visitor-visual">
<div class="visitor-counter"><img src="https://count.getloli.com/get/@moonweft-demo?theme=nixietube-1&padding=4&darkmode=0" alt="visitor count"></div>
</div>
</div>
<div class="card polar-panel">
<div class="polar-header">[cool gif I found]</div>
<div class="polar-visual">
<div class="polar-gif"><img src="assets/bongo-cat-polar-bear.gif" alt="cool gif"></div>
</div>
</div>
<div class="card photos-panel" style="background:#000; padding:10px; border:1px solid #444; font-family:'VT323', monospace;">
<div class="photos-header" style="color:var(--accent); font-size:1.1rem; padding-bottom:5px; margin-bottom:10px;">[photos]</div>
<div class="photos-content" style="padding: 20px; border: 1px dashed #444; color: #888; text-align: center; font-style: italic;">
[ photography showcase coming soon ]
</div>
</div>
</aside>
</div>
</div>
<script>
function updateClock() {
const now = new Date();
const timeString = now.toLocaleTimeString('en-US', {
hour12: false,
hour: '2-digit',
minute: '2-digit',
timeZone: 'Asia/Kolkata',
timeZoneName: 'short'
});
document.getElementById('clock').textContent = timeString;
}
updateClock();
setInterval(updateClock, 30000);
</script>
<script>
function updateMoonPhase() {
const now = new Date();
let year = now.getFullYear();
let month = now.getMonth() + 1;
let day = now.getDate();
if (month < 3) {
year--;
month += 12;
}
let c = 365.25 * year;
let e = 30.6 * month;
let jd = c + e + day - 694039.09;
jd /= 29.5305882;
let b = parseInt(jd);
jd -= b;
const phaseIndex = Math.round(jd * 8) % 8;
const phaseNames = [
"New Moon", "Waxing Crescent", "First Quarter", "Waxing Gibbous",
"Full Moon", "Waning Gibbous", "Last Quarter", "Waning Crescent"
];
const textElement = document.getElementById('mw-phase');
if (textElement) {
textElement.textContent = phaseNames[phaseIndex];
}
const visualElement = document.getElementById('mw-visual');
if (visualElement) {
visualElement.innerHTML = `<img src="assets/moon${phaseIndex}.png" width="96" style="image-rendering: pixelated; display: block;">`;
}
}
updateMoonPhase();
fetch('data/notes.json')
.then(res => res.json())
.then(data => {
const list = document.getElementById('homepage-blog-list');
const recent = data.slice(0, 3);
recent.forEach(post => {
const link = document.createElement('a');
link.href = post.url;
link.className = 'blog-entry';
link.innerHTML = `
<span class="entry-date">[${post.date.split(' ').slice(0, 2).join(' ')}]</span>
<span class="entry-title">${post.title}</span>
`;
list.appendChild(link);
});
})
.catch(err => console.error("Failed to log blog posts", err));
</script>
<script>
const workerUrl = "https://moonweft-music.meledo.workers.dev/music";
function updateLastFM() {
fetch(workerUrl)
.then(res => res.json())
.then(data => {
const track = data.recenttracks.track[0];
if (!track) return;
const isPlaying = track['@attr'] && track['@attr'].nowplaying === 'true';
// Try different image sizes as fallbacks if the preferred size is missing
const artUrl = (track.image[3] && track.image[3]['#text']) || // extralarge
(track.image[2] && track.image[2]['#text']) || // large
(track.image[1] && track.image[1]['#text']) || // medium
(track.image[0] && track.image[0]['#text']); // small
const currentTrackName = document.getElementById('lf-track').textContent;
document.getElementById('lf-track').textContent = track.name;
document.getElementById('lf-artist').textContent = track.artist['#text'];
document.getElementById('lf-status').textContent = isPlaying ? "[LISTENING NOW]" : "[RECENTLY LISTENED]";
const imgElement = document.getElementById('lf-art');
const setArtFallback = () => {
if (track.name !== currentTrackName) {
imgElement.src = 'assets/vinyl.png';
}
};
// Check if art exists and is not Last.fm's default grey star placeholder
if (artUrl && !artUrl.includes('2a96cbd8b46e442fc41c2b86b821562f')) {
imgElement.src = artUrl;
} else {
// Secondary fallback: iTunes API
const query = track.artist['#text'] + ' ' + track.name;
fetch(`https://itunes.apple.com/search?term=${encodeURIComponent(query)}&media=music&entity=song&limit=1`)
.then(r => r.json())
.then(itunesData => {
if (itunesData.results && itunesData.results.length > 0) {
// Replace 100x100 with 300x300 for higher quality
imgElement.src = itunesData.results[0].artworkUrl100.replace('100x100bb', '300x300bb');
} else {
setArtFallback();
}
})
.catch(() => setArtFallback());
}
const icon = document.querySelector('.music-icon');
if (isPlaying) {
icon.style.animation = "blink 1s infinite";
document.getElementById('lf-status').style.color = "#a6e3a1";
} else {
icon.style.animation = "none";
document.getElementById('lf-status').style.color = "var(--accent)";
}
})
.catch(err => console.error("Worker error:", err));
}
updateLastFM();
setInterval(updateLastFM, 60000);
</script>
<script>
const steamWorkerUrl = "https://moonweft-music.meledo.workers.dev/steam";
function updateSteam() {
fetch(steamWorkerUrl)
.then(res => res.json())
.then(data => {
const games = data.response.games;
if (games && games.length > 0) {
const game = games[0];
document.getElementById('steam-game').textContent = game.name;
const imgUrl = `http://media.steampowered.com/steamcommunity/public/images/apps/${game.appid}/${game.img_icon_url}.jpg`;
document.getElementById('steam-icon').src = imgUrl;
} else {
document.getElementById('steam-game').textContent = "Offline";
}
})
.catch(err => console.error("Steam error:", err));
}
updateSteam();
setInterval(updateSteam, 300000);
</script>
<script>
const discordID = "246259493111857152";
function initDiscord() {
fetch(`https://api.lanyard.rest/v1/users/${discordID}`)
.then(res => res.json())
.then(data => {
if (!data.success) return;
const d = data.data;
const avatarID = d.discord_user.avatar;
document.getElementById('discord-pfp').src =
`https://cdn.discordapp.com/avatars/${discordID}/${avatarID}.png`;
document.getElementById('discord-username').textContent = d.discord_user.username;
const statusColors = {
online: "#43b581",
idle: "#faa61a",
dnd: "#f04747",
offline: "#747f8d"
};
document.getElementById('discord-status-dot').style.background =
statusColors[d.discord_status] || statusColors.offline;
const activity = d.activities.find(a => a.type === 0);
if (activity) {
document.getElementById('discord-activity').textContent = `Playing: ${activity.name}`;
} else {
document.getElementById('discord-activity').textContent = "Chilling";
}
});
}
initDiscord();
setInterval(initDiscord, 120000);
document.addEventListener("DOMContentLoaded", () => {
// 1. Use querySelectorAll to find ALL links to projects.html
const projectLinks = document.querySelectorAll('a[href="projects.html"]');
const videoOverlay = document.getElementById('transition-overlay');
const video = document.getElementById('joker-transition');
const secretFrame = document.getElementById('secret-projects-frame');
// 2. Loop through every link we found and attach the click event
if (projectLinks.length > 0 && video && secretFrame) {
projectLinks.forEach(link => {
link.addEventListener('click', (e) => {
e.preventDefault(); // Stop normal navigation
// 3. Show the video overlay, play it, and BLOCK other clicks
videoOverlay.style.display = 'block';
// Turn on pointer events so the overlay acts like a shield,
// preventing the user from clicking the link twice during the animation.
videoOverlay.style.pointerEvents = 'auto';
video.play();
const swapTime = 800; // Adjust this timing as needed
setTimeout(() => {
secretFrame.style.opacity = '1';
}, swapTime);
// 4. When the video ends, officially change the URL.
// { once: true } ensures this event only fires one time.
video.addEventListener('ended', () => {
sessionStorage.setItem('heistSuccess', 'true');
window.location.href = link.href;
}, { once: true });
});
});
}
});
</script>
<footer class="site-footer">
<p>♡2026 moonweft</p>
<p class="mail"><a href="mailto:meledo@duck.com" target="_blank">meledo@duck.com</a></p>
</footer>
<script src="scripts/oneko.js"></script>
<iframe id="secret-projects-frame" src="projects.html" style="opacity: 0; pointer-events: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; border: none; z-index: 2147483646;"></iframe>
<div id="transition-overlay" style="display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 2147483647; pointer-events: none;">
<video id="joker-transition" muted playsinline style="width: 100%; height: 100%; object-fit: cover;">
<source src="assets/joker.webm" type="video/webm">
</video>
</div>
</body>
</html>