/
home
/
shalala
/
winterhits.com
/
the-moon-and-the-sun
/
Upload File
HOME
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title id="page-title">Audio Player</title> <style> /* ───────────────────────────────────────── LOCAL FONTS ───────────────────────────────────────── */ @font-face { font-family: 'Mono45Headline'; src: url('../Mono45Headline-Light.woff2') format('woff2'), url('../Mono45Headline-Light.woff') format('woff'); font-weight: 300; font-style: normal; } @font-face { font-family: 'Mono45Headline'; src: url('../Mono45Headline-Regular.woff2') format('woff2'), url('../Mono45Headline-Regular.woff') format('woff'); font-weight: 400; font-style: normal; } @font-face { font-family: 'Mono45Headline'; src: url('../Mono45Headline-Bold.woff2') format('woff2'), url('../Mono45Headline-Bold.woff') format('woff'); font-weight: 700; font-style: normal; } /* ───────────────────────────────────────── CSS CUSTOM PROPERTIES (set by JS from JSON) ───────────────────────────────────────── */ :root { --bg: #0d0d0d; --surface: #161616; --border: #2a2a2a; --accent: #e8d5a3; --accent-dim: #a89060; --text: #f0ece4; --text-muted: #7a7570; --progress-bg: #252525; } *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } body { background: var(--bg); color: var(--text); font-family: 'Mono45Headline', monospace; font-weight: 400; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 0.5rem 2rem 2rem 2rem; } /* grain overlay */ body::before { content: ''; position: fixed; inset: 0; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E"); opacity: 0.04; pointer-events: none; z-index: 0; } .card { position: relative; z-index: 1; width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; } /* ── artwork ── */ .artwork-wrap { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #111; } .artwork-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter 0.6s ease; } .artwork-wrap.playing img { filter: brightness(0.85); } /* animated EQ bars over artwork when playing */ .eq-bars { position: absolute; bottom: 1.2rem; left: 1.4rem; display: flex; gap: 3px; align-items: flex-end; height: 28px; opacity: 0; transition: opacity 0.3s; } .artwork-wrap.playing .eq-bars { opacity: 1; } .eq-bars span { display: block; width: 3px; background: var(--accent); border-radius: 1px; animation: eq 0.8s ease-in-out infinite alternate; } .eq-bars span:nth-child(1) { height: 40%; animation-duration: 0.6s; } .eq-bars span:nth-child(2) { height: 80%; animation-duration: 0.9s; } .eq-bars span:nth-child(3) { height: 55%; animation-duration: 0.7s; } .eq-bars span:nth-child(4) { height: 90%; animation-duration: 1.0s; } .eq-bars span:nth-child(5) { height: 50%; animation-duration: 0.75s; } @keyframes eq { from { transform: scaleY(1); } to { transform: scaleY(0.2); } } /* format badge — Light */ .format-badge { position: absolute; top: 1rem; right: 1rem; font-family: 'Mono45Headline', monospace; font-weight: 300; font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent-dim); padding: 0.2rem 0.5rem; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); } /* ── metadata ── */ .meta { padding: 1.5rem 1.6rem 0.8rem; border-bottom: 1px solid var(--border); } /* label — Light */ .track-label { font-family: 'Mono45Headline', monospace; font-weight: 300; font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem; } /* title — Bold */ .track-title { font-family: 'Mono45Headline', monospace; font-weight: 700; font-size: 1.75rem; line-height: 1.1; color: var(--text); margin-bottom: 0.35rem; } /* subtitle — Regular, inline after title */ .track-subtitle { display: block; font-weight: 300; font-size: 1.75rem; } /* artist — Regular */ .track-artist { font-family: 'Mono45Headline', monospace; font-weight: 400; font-size: 1rem; color: var(--accent-dim); letter-spacing: 0.06em; } /* ── description — Regular ── */ .description { padding: 1rem 1.6rem; font-family: 'Mono45Headline', monospace; font-weight: 400; font-size: 1rem; line-height: 1.7; color: var(--text-muted); border-bottom: 1px solid var(--border); } /* ── controls ── */ .controls { padding: 1.2rem 1.6rem 1.5rem; } /* progress bar */ .progress-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.2rem; } .time { font-family: 'Mono45Headline', monospace; font-weight: 400; font-size: 0.65rem; color: var(--text-muted); min-width: 3rem; letter-spacing: 0.05em; } .time.right { text-align: right; } /* progress track — tall touch target, slim visual bar */ .progress-track { flex: 1; height: 44px; display: flex; align-items: center; position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; } .progress-visual { position: absolute; left: 0; right: 0; height: 3px; background: var(--progress-bg); border-radius: 2px; pointer-events: none; } .progress-fill { height: 100%; background: var(--accent); border-radius: 2px; width: 0%; pointer-events: none; } .progress-thumb { position: absolute; top: 50%; left: 0%; transform: translate(-50%, -50%); width: 12px; height: 12px; border-radius: 50%; background: var(--accent); opacity: 0; transition: opacity 0.2s; pointer-events: none; } .progress-track:hover .progress-thumb, .progress-track.dragging .progress-thumb { opacity: 1; } /* buttons row */ .buttons-row { display: flex; align-items: center; justify-content: space-between; } /* equal-width sides so play button sits dead centre */ .side { flex: 1; display: flex; align-items: center; } .side.right { justify-content: flex-end; } /* play/pause */ .btn-play { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s, color 0.2s; flex-shrink: 0; -webkit-tap-highlight-color: transparent; } .btn-play:hover { background: var(--accent); color: var(--bg); } .btn-play svg { display: block; } /* volume */ .volume-group { display: flex; align-items: center; gap: 0.5rem; } .vol-icon { color: var(--text-muted); cursor: pointer; flex-shrink: 0; transition: color 0.2s; } .vol-icon:hover { color: var(--accent); } input[type=range].vol-slider { -webkit-appearance: none; appearance: none; width: 70px; height: 3px; background: var(--progress-bg); border-radius: 2px; outline: none; cursor: pointer; } input[type=range].vol-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); cursor: pointer; } input[type=range].vol-slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer; } /* download button — accent bg, --bg text */ .btn-download { font-family: 'Mono45Headline', monospace; font-weight: 400; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--bg); background: var(--accent); border: none; padding: 0.5rem 0.85rem; cursor: pointer; display: inline-block; transition: opacity 0.2s; -webkit-tap-highlight-color: transparent; } .btn-download:hover { opacity: 0.8; } /* footer */ .card-footer { padding: 0.7rem 1.6rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; } .footer-label { font-family: 'Mono45Headline', monospace; font-weight: 300; font-size: 0.55rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--border); } .waveform-static { display: flex; align-items: center; gap: 2px; height: 14px; } .waveform-static span { display: block; width: 2px; border-radius: 1px; background: var(--border); } /* ── next track bar ── */ .next-track-bar { display: none; border-top: 1px solid var(--border); padding: 0.75rem 1.6rem; align-items: center; justify-content: space-between; gap: 1rem; } .next-track-bar.ready { display: flex; } .next-track-label { font-family: 'Mono45Headline', monospace; font-weight: 300; font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; } .next-track-link { font-family: 'Mono45Headline', monospace; font-weight: 700; font-size: 0.7rem; letter-spacing: 0.06em; color: var(--accent); text-decoration: none; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; transition: opacity 0.2s; } .next-track-link:hover { opacity: 0.7; } </style> </head> <body> <!-- ═══════════════════════════════════════════════════ --> <script id="track-config" type="application/json"> { "title": "The Moon and The Sun", "subtitle": "(Fritz von Runte bopping along marsh' up)", "artist": "Fritz von Runte with Kahimi Karie", "label": "Marshall Records", "src": "The Moon and The Sun (Fritz von Runte bopping along marsh' up).flac", "format": "MARSH' UP", "artwork": "cover-4-two-marsh'-ups.jpg", "artworkAlt": "Album artwork for Two Marsh' Ups", "description": "比企真理 whispering about the moon and the sun on a hypnotic melody that makes my sphinkter cry sweet molasses tears", "downloadUrl": "https://winterhits.bandcamp.com/", "colors": { "--bg": "#0d0d0d", "--surface": "#161616", "--border": "#FED600", "--accent": "#e8d5a3", "--accent-dim": "#F47A20", "--text": "#f0ece4", "--text-muted": "#7a7570", "--progress-bg": "#252525" } } </script> <!-- ═══════════════════════════════════════════════════ --> <!-- hidden audio element --> <audio id="audio"></audio> <div class="card" id="player-card"> <!-- artwork --> <div class="artwork-wrap" id="artwork-wrap"> <img id="artwork-img" src="" alt="" /> <div class="format-badge" id="format-badge"></div> <div class="eq-bars"> <span></span><span></span><span></span><span></span><span></span> </div> </div> <!-- metadata --> <div class="meta"> <div class="track-label" id="track-label"></div> <div class="track-title" id="track-title"></div> <div class="track-artist" id="track-artist"></div> </div> <!-- description --> <div class="description" id="track-description"></div> <!-- controls --> <div class="controls"> <div class="progress-row"> <span class="time" id="time-current">0:00</span> <div class="progress-track" id="progress-track"> <div class="progress-visual"> <div class="progress-fill" id="progress-fill"></div> </div> <div class="progress-thumb" id="progress-thumb"></div> </div> <span class="time right" id="time-duration">0:00</span> </div> <div class="buttons-row"> <!-- volume (left) --> <div class="side left"> <div class="volume-group"> <svg class="vol-icon" id="vol-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" onclick="toggleMute()"> <polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"/> <path id="vol-wave-1" d="M15.54 8.46a5 5 0 0 1 0 7.07"/> <path id="vol-wave-2" d="M19.07 4.93a10 10 0 0 1 0 14.14"/> </svg> <input type="range" class="vol-slider" id="vol-slider" min="0" max="1" step="0.01" value="1" oninput="setVolume(this.value)"/> </div> </div> <!-- play/pause (centre) --> <button class="btn-play" id="btn-play" onclick="togglePlay()" aria-label="Play / Pause"> <svg id="icon-play" width="20" height="20" viewBox="0 0 24 24" fill="currentColor"> <polygon points="5 3 19 12 5 21 5 3"/> </svg> <svg id="icon-pause" width="20" height="20" viewBox="0 0 24 24" fill="currentColor" style="display:none"> <rect x="6" y="4" width="4" height="16"/><rect x="14" y="4" width="4" height="16"/> </svg> </button> <!-- download (right) --> <div class="side right"> <a class="btn-download" id="btn-download" href="#" target="_blank" rel="noopener">Download</a> </div> </div> </div> <!-- next track bar (hidden until tracks.json loads) --> <div class="next-track-bar" id="next-track-bar"> <span class="next-track-label">Up next</span> <a class="next-track-link" id="next-track-link" href="#">—</a> </div> <!-- footer --> <div class="card-footer"> <span class="footer-label" id="footer-label"></span> <div class="waveform-static" id="waveform-static"></div> </div> </div> <script> // ── parse config ───────────────────────────────── const cfg = JSON.parse(document.getElementById('track-config').textContent); // ── apply colours ──────────────────────────────── if (cfg.colors) { const root = document.documentElement; Object.entries(cfg.colors).forEach(([prop, val]) => { root.style.setProperty(prop, val); }); } // ── populate content ───────────────────────────── document.title = (cfg.title || 'Track') + ' - Winterhits.com'; document.getElementById('track-label').textContent = cfg.label || ''; document.getElementById('track-artist').textContent = cfg.artist || ''; document.getElementById('track-description').textContent = cfg.description || ''; // title + optional subtitle const titleEl = document.getElementById('track-title'); titleEl.textContent = cfg.title || 'Untitled'; if (cfg.subtitle) { const sub = document.createElement('span'); sub.className = 'track-subtitle'; sub.textContent = cfg.subtitle; titleEl.appendChild(sub); } // format badge — only shown if set in JSON const badgeEl = document.getElementById('format-badge'); if (cfg.format) { badgeEl.textContent = cfg.format; } else { badgeEl.style.display = 'none'; } // static folder paths document.getElementById('artwork-img').src = cfg.artwork ? 'artwork/' + cfg.artwork : ''; document.getElementById('artwork-img').alt = cfg.artworkAlt || cfg.title || ''; const dlBtn = document.getElementById('btn-download'); if (cfg.downloadUrl) { dlBtn.href = cfg.downloadUrl; } else { dlBtn.style.visibility = 'hidden'; } const audio = document.getElementById('audio'); audio.src = cfg.src ? 'audio/' + cfg.src : ''; // footer year document.getElementById('footer-label').textContent = 'Marshall Records \u00a9 2001\u2013' + new Date().getFullYear(); // ── static waveform decoration ─────────────────── const waveHeights = [4,7,12,6,10,14,8,5,11,9,13,6,8,12,5,9,7,11,4,10]; const wf = document.getElementById('waveform-static'); waveHeights.forEach(h => { const s = document.createElement('span'); s.style.height = h + 'px'; wf.appendChild(s); }); // ── helpers ────────────────────────────────────── function fmt(s) { if (isNaN(s) || !isFinite(s)) return '0:00'; const m = Math.floor(s / 60); const ss = String(Math.floor(s % 60)).padStart(2, '0'); return `${m}:${ss}`; } function setProgress(pct) { document.getElementById('progress-fill').style.width = pct + '%'; document.getElementById('progress-thumb').style.left = pct + '%'; } // ── playback ───────────────────────────────────── let playing = false; function togglePlay() { playing ? audio.pause() : audio.play(); } audio.addEventListener('play', () => { playing = true; document.getElementById('icon-play').style.display = 'none'; document.getElementById('icon-pause').style.display = 'block'; document.getElementById('artwork-wrap').classList.add('playing'); }); audio.addEventListener('pause', () => { playing = false; document.getElementById('icon-play').style.display = 'block'; document.getElementById('icon-pause').style.display = 'none'; document.getElementById('artwork-wrap').classList.remove('playing'); }); audio.addEventListener('ended', () => { playing = false; document.getElementById('icon-play').style.display = 'block'; document.getElementById('icon-pause').style.display = 'none'; document.getElementById('artwork-wrap').classList.remove('playing'); setProgress(0); document.getElementById('time-current').textContent = '0:00'; }); // ── progress ───────────────────────────────────── audio.addEventListener('timeupdate', () => { if (!audio.duration) return; setProgress((audio.currentTime / audio.duration) * 100); document.getElementById('time-current').textContent = fmt(audio.currentTime); }); audio.addEventListener('loadedmetadata', () => { document.getElementById('time-duration').textContent = fmt(audio.duration); }); // ── seek: click + touch drag ────────────────────── const progressTrack = document.getElementById('progress-track'); function seekTo(clientX) { const rect = progressTrack.getBoundingClientRect(); const pct = Math.min(1, Math.max(0, (clientX - rect.left) / rect.width)); if (audio.duration) audio.currentTime = pct * audio.duration; setProgress(pct * 100); } progressTrack.addEventListener('click', e => seekTo(e.clientX)); let dragging = false; progressTrack.addEventListener('touchstart', e => { dragging = true; progressTrack.classList.add('dragging'); seekTo(e.touches[0].clientX); }, { passive: true }); window.addEventListener('touchmove', e => { if (dragging) seekTo(e.touches[0].clientX); }, { passive: true }); window.addEventListener('touchend', () => { if (!dragging) return; dragging = false; progressTrack.classList.remove('dragging'); }); // ── volume ─────────────────────────────────────── let lastVol = 1; let muted = false; function setVolume(v) { audio.volume = +v; lastVol = +v; muted = (+v === 0); updateVolIcon(+v); } function toggleMute() { if (muted) { const v = lastVol || 0.8; audio.volume = v; document.getElementById('vol-slider').value = v; muted = false; updateVolIcon(v); } else { lastVol = audio.volume; audio.volume = 0; document.getElementById('vol-slider').value = 0; muted = true; updateVolIcon(0); } } function updateVolIcon(v) { document.getElementById('vol-wave-1').style.display = v > 0 ? 'block' : 'none'; document.getElementById('vol-wave-2').style.display = v >= 0.5 ? 'block' : 'none'; } // ── next track (random from tracks.json) ───────── fetch('/tracks.json') .then(r => r.json()) .then(tracks => { const currentPath = window.location.pathname.replace(/\/?$/, '/'); const others = tracks.filter(t => t.url.replace(/\/?$/, '/') !== currentPath); if (!others.length) return; const next = others[Math.floor(Math.random() * others.length)]; const link = document.getElementById('next-track-link'); link.textContent = next.title + (next.artist ? ' — ' + next.artist : ''); link.href = next.url; document.getElementById('next-track-bar').classList.add('ready'); }) .catch(() => { /* tracks.json unavailable — fail silently */ }); </script> </body> </html>