fix: merged frontend and frontend-content

This commit is contained in:
Luis Pereira 2026-01-12 21:44:20 +00:00 committed by Brian O'Reilly
parent 151f6c5569
commit 01cb0366c0
3 changed files with 66 additions and 164 deletions

View File

@ -853,7 +853,8 @@
(define-page front-page-content #@"/content" () (define-page front-page-content #@"/content" ()
"Front page content (displayed in content frame)" "Front page content (displayed in content frame)"
(clip:process-to-string (clip:process-to-string
(load-template "front-page-content") (load-template "front-page")
:framesetp t
:title "ASTEROID RADIO" :title "ASTEROID RADIO"
:station-name "ASTEROID RADIO" :station-name "ASTEROID RADIO"
:status-message "🟢 LIVE - Broadcasting asteroid music for hackers" :status-message "🟢 LIVE - Broadcasting asteroid music for hackers"

View File

@ -1,125 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title data-text="title">ASTEROID RADIO</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="/asteroid/static/favicon.ico">
<link rel="icon" type="image/png" sizes="32x32" href="/asteroid/static/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/asteroid/static/favicon-16x16.png">
<link rel="stylesheet" type="text/css" href="/asteroid/static/asteroid.css">
<script src="/asteroid/static/js/auth-ui.js"></script>
<script src="/asteroid/static/js/front-page.js"></script>
<script src="/asteroid/static/js/recently-played.js"></script>
<script src="/api/asteroid/spectrum-analyzer.js"></script>
</head>
<body>
<div class="container">
<header>
<h1 class="page-title">
<img src="/asteroid/static/asteroid.png" alt="Asteroid" style="height: 60px; width: auto;">
<span data-text="station-name">ASTEROID RADIO</span>
<img src="/asteroid/static/asteroid.png" alt="Asteroid" style="height: 60px; width: auto;">
</h1>
<h3 class="page-subtitle">The Station at the End of Time</h3>
<!-- Spectrum Analyzer Canvas -->
<div style="text-align: center; margin: 15px 0;">
<canvas id="spectrum-canvas" width="800" height="100" style="max-width: 100%; border: 1px solid #00ff00; background: #000; border-radius: 4px;"></canvas>
<div style="margin-top: 8px; font-size: 0.9em;">
<label style="margin-right: 10px;">
Style:
<select id="spectrum-style-selector" onchange="setSpectrumStyle(this.value)" style="padding: 3px; background: #000; color: #00ff00; border: 1px solid #00ff00;">
<option value="bars">Bars</option>
<option value="wave">Wave</option>
<option value="dots">Dots</option>
</select>
</label>
<label>
Theme:
<select id="spectrum-theme-selector" onchange="setSpectrumTheme(this.value)" style="padding: 3px; background: #000; color: #00ff00; border: 1px solid #00ff00;">
<option value="monotone">Monotone</option>
<option value="green">Green</option>
<option value="blue">Blue</option>
<option value="purple">Purple</option>
<option value="red">Red</option>
<option value="amber">Amber</option>
<option value="rainbow">Rainbow</option>
</select>
</label>
</div>
</div>
<nav class="nav">
<a href="/asteroid/content" target="_self">Home</a>
<a href="/asteroid/player-content" target="_self">Player</a>
<a href="/asteroid/about-content" target="_self">About</a>
<a href="/asteroid/status-content" target="_self">Status</a>
<a href="/asteroid/profile" target="_self" data-show-if-logged-in>Profile</a>
<a href="/asteroid/admin" target="_self" data-show-if-admin>Admin</a>
<a href="/asteroid/login" target="_self" data-show-if-logged-out>Login</a>
<a href="/asteroid/register" target="_self" data-show-if-logged-out>Register</a>
<a href="/asteroid/logout" data-show-if-logged-in class="btn-logout">Logout</a>
</nav>
</header>
<main>
<div class="live-stream">
<h2 style="color: #00ff00; margin: 0;"><span class="live-stream-indicator" style="font-size: 1rem;">🟢</span> LIVE STREAM</h2>
<!-- Channel Selector -->
<div class="live-stream-quality" style="margin-bottom: 15px;">
<label for="stream-channel" class="live-stream-label"><strong>Channel:</strong></label>
<select id="stream-channel" onchange="changeChannel()">
<option value="curated">🎧 <c:splice lquery="(text curated-channel-name)">Curated</c:splice></option>
<option value="shuffle">🎲 Shuffle</option>
</select>
</div>
<input type="hidden" id="stream-base-url" lquery="(val stream-base-url)">
<p><strong class="live-stream-label">Stream URL:</strong> <code id="stream-url" lquery="(text default-stream-url)"></code></p>
<p><strong class="live-stream-label">Stream Quality:</strong> <span id="stream-format" lquery="(text default-stream-encoding-desc)"></span></p>
<p><strong class="live-stream-label">BROADCASTING:</strong> <span id="stream-status" style="">Asteroid music for Hackers</span></p>
<p class="frame-enable-message"><em>The live stream player is now in the persistent bar at the bottom of the page</em></p>
</div>
<div id="now-playing" class="now-playing"></div>
<!-- Recently Played Tracks -->
<div id="recently-played-panel" class="recently-played-panel">
<h3>Recently Played</h3>
<div id="recently-played-list" class="recently-played-list">
<p class="loading">Loading...</p>
</div>
</div>
<!-- Track Request Section -->
<div class="request-panel">
<h3>🎵 Request a Track</h3>
<p class="request-description">Want to hear something specific? Submit a request and an admin will review it.</p>
<div class="request-form">
<input type="text" id="request-title" class="request-input" placeholder="Suggest a track, artist, or album...">
<input type="text" id="request-message" class="request-input" placeholder="Why do you want to hear this? (optional)">
<button class="btn btn-primary" onclick="submitTrackRequest()">Submit Request</button>
</div>
<div id="request-status" class="request-status" style="display: none;"></div>
<div class="recent-requests">
<h4>Recently Played Requests</h4>
<div id="recent-requests-list">
<p class="no-requests">Loading...</p>
</div>
</div>
</div>
</main>
<footer class="site-footer">
<span>Listed on <a href="http://www.internet-radio.com/stations/ambient/" target="_blank" rel="noopener">Internet Radio</a></span>
<span class="craftering">
<a href="https://craftering.systemcrafters.net/@asteroid/previous">←</a>
<a href="https://craftering.systemcrafters.net/">craftering</a>
<a href="https://craftering.systemcrafters.net/@asteroid/next">→</a>
</span>
</footer>
</div>
</body>
</html>

View File

@ -51,6 +51,8 @@
</div> </div>
<nav class="nav"> <nav class="nav">
<c:if test="(not framesetp)">
<c:then>
<a href="/asteroid/">Home</a> <a href="/asteroid/">Home</a>
<a href="/asteroid/player">Player</a> <a href="/asteroid/player">Player</a>
<a href="/asteroid/about">About</a> <a href="/asteroid/about">About</a>
@ -60,6 +62,19 @@
<a href="/asteroid/login" data-show-if-logged-out>Login</a> <a href="/asteroid/login" data-show-if-logged-out>Login</a>
<a href="/asteroid/register" data-show-if-logged-out>Register</a> <a href="/asteroid/register" data-show-if-logged-out>Register</a>
<a href="/asteroid/logout" data-show-if-logged-in class="btn-logout">Logout</a> <a href="/asteroid/logout" data-show-if-logged-in class="btn-logout">Logout</a>
</c:then>
<c:else>
<a href="/asteroid/content" target="_self">Home</a>
<a href="/asteroid/player-content" target="_self">Player</a>
<a href="/asteroid/about-content" target="_self">About</a>
<a href="/asteroid/status-content" target="_self">Status</a>
<a href="/asteroid/profile" target="_self" data-show-if-logged-in>Profile</a>
<a href="/asteroid/admin" target="_self" data-show-if-admin>Admin</a>
<a href="/asteroid/login" target="_self" data-show-if-logged-out>Login</a>
<a href="/asteroid/register" target="_self" data-show-if-logged-out>Register</a>
<a href="/asteroid/logout" data-show-if-logged-in class="btn-logout">Logout</a>
</c:else>
</c:if>
</nav> </nav>
</header> </header>
@ -78,6 +93,8 @@
</select> </select>
</div> </div>
<c:if test="(not framesetp)">
<c:then>
<!-- Stream Quality Selector --> <!-- Stream Quality Selector -->
<div class="live-stream-quality" style="margin-bottom: 15px;"> <div class="live-stream-quality" style="margin-bottom: 15px;">
<label for="stream-quality" class="live-stream-label" ><strong>Quality:</strong></label> <label for="stream-quality" class="live-stream-label" ><strong>Quality:</strong></label>
@ -87,12 +104,16 @@
<option value="low">MP3 64kbps (Low Bandwidth)</option> <option value="low">MP3 64kbps (Low Bandwidth)</option>
</select> </select>
</div> </div>
</c:then>
</c:if>
<input type="hidden" id="stream-base-url" lquery="(val stream-base-url)"> <input type="hidden" id="stream-base-url" lquery="(val stream-base-url)">
<p><strong class="live-stream-label">Stream URL:</strong> <code id="stream-url" lquery="(text default-stream-url)"></code></p> <p><strong class="live-stream-label">Stream URL:</strong> <code id="stream-url" lquery="(text default-stream-url)"></code></p>
<p><strong class="live-stream-label">Stream Quality:</strong> <span id="stream-format" lquery="(text default-stream-encoding-desc)"></span></p> <p><strong class="live-stream-label">Stream Quality:</strong> <span id="stream-format" lquery="(text default-stream-encoding-desc)"></span></p>
<p><strong class="live-stream-label" class="live-stream-label">BROADCASTING:</strong> <span id="stream-status" style="">Asteroid music for Hackers</span></p> <p><strong class="live-stream-label" class="live-stream-label">BROADCASTING:</strong> <span id="stream-status" style="">Asteroid music for Hackers</span></p>
<c:if test="(not framesetp)">
<c:then>
<div style="display: flex; gap: 10px; justify-content: end; margin-bottom: 20px;"> <div style="display: flex; gap: 10px; justify-content: end; margin-bottom: 20px;">
<button id="reconnect-btn" class="btn btn-warning" onclick="reconnectStream()" style="font-size: 0.9em; display: none;"> <button id="reconnect-btn" class="btn btn-warning" onclick="reconnectStream()" style="font-size: 0.9em; display: none;">
🔄 Reconnect Stream 🔄 Reconnect Stream
@ -114,6 +135,11 @@
Your browser does not support the audio element. Your browser does not support the audio element.
</audio> </audio>
</div> </div>
</c:then>
<c:else>
<p class="frame-enable-message"><em>The live stream player is now in the persistent bar at the bottom of the page</em></p>
</c:else>
</c:if>
</div> </div>
<div id="now-playing" class="now-playing"></div> <div id="now-playing" class="now-playing"></div>