diff --git a/asteroid.lisp b/asteroid.lisp
index eb07dcf..7f61005 100644
--- a/asteroid.lisp
+++ b/asteroid.lisp
@@ -516,7 +516,7 @@
("message" . "Listening history cleared successfully"))))
|#
-;; Front page
+;; Front page - regular view by default
(define-page front-page #@"/" ()
"Main front page"
(let ((template-path (merge-pathnames "template/front-page.chtml"
@@ -537,6 +537,44 @@
:now-playing-album "Startup Sounds"
:now-playing-duration "โ")))
+;; Frameset wrapper for persistent player mode
+(define-page frameset-wrapper #@"/frameset" ()
+ "Frameset wrapper with persistent audio player"
+ (let ((template-path (merge-pathnames "template/frameset-wrapper.chtml"
+ (asdf:system-source-directory :asteroid))))
+ (clip:process-to-string
+ (plump:parse (alexandria:read-file-into-string template-path))
+ :title "๐ต ASTEROID RADIO ๐ต")))
+
+;; Content frame - front page content without player
+(define-page front-page-content #@"/content" ()
+ "Front page content (displayed in content frame)"
+ (let ((template-path (merge-pathnames "template/front-page-content.chtml"
+ (asdf:system-source-directory :asteroid))))
+ (clip:process-to-string
+ (plump:parse (alexandria:read-file-into-string template-path))
+ :title "๐ต ASTEROID RADIO ๐ต"
+ :station-name "๐ต ASTEROID RADIO ๐ต"
+ :status-message "๐ข LIVE - Broadcasting asteroid music for hackers"
+ :listeners "0"
+ :stream-quality "128kbps MP3"
+ :stream-base-url *stream-base-url*
+ :now-playing-artist "The Void"
+ :now-playing-track "Silence"
+ :now-playing-album "Startup Sounds"
+ :now-playing-duration "โ")))
+
+;; Persistent audio player frame (bottom frame)
+(define-page audio-player-frame #@"/audio-player-frame" ()
+ "Persistent audio player frame (bottom of page)"
+ (let ((template-path (merge-pathnames "template/audio-player-frame.chtml"
+ (asdf:system-source-directory :asteroid))))
+ (clip:process-to-string
+ (plump:parse (alexandria:read-file-into-string template-path))
+ :stream-base-url *stream-base-url*
+ :default-stream-url (concatenate 'string *stream-base-url* "/asteroid.aac")
+ :default-stream-encoding "audio/aac")))
+
;; Configure static file serving for other files
(define-page static #@"/static/(.*)" (:uri-groups (path))
(serve-file (merge-pathnames (concatenate 'string "static/" path)
@@ -837,6 +875,18 @@
:now-playing-album "Startup Sounds"
:player-status "Stopped")))
+;; Player content frame (for frameset mode)
+(define-page player-content #@"/player-content" ()
+ "Player page content (displayed in content frame)"
+ (let ((template-path (merge-pathnames "template/player-content.chtml"
+ (asdf:system-source-directory :asteroid))))
+ (clip:process-to-string
+ (plump:parse (alexandria:read-file-into-string template-path))
+ :title "Asteroid Radio - Web Player"
+ :stream-base-url *stream-base-url*
+ :default-stream-url (concatenate 'string *stream-base-url* "/asteroid.aac")
+ :default-stream-encoding "audio/aac")))
+
(define-page popout-player #@"/popout-player" ()
"Pop-out player window"
(let ((template-path (merge-pathnames "template/popout-player.chtml"
diff --git a/static/js/front-page.js b/static/js/front-page.js
index c841b5a..f21fb68 100644
--- a/static/js/front-page.js
+++ b/static/js/front-page.js
@@ -169,3 +169,30 @@ setInterval(function() {
popoutWindow = null;
}
}, 1000);
+
+// Frameset mode functionality
+function enableFramesetMode() {
+ // Save preference
+ localStorage.setItem('useFrameset', 'true');
+ // Redirect to frameset wrapper
+ window.location.href = '/asteroid/frameset';
+}
+
+function disableFramesetMode() {
+ // Clear preference
+ localStorage.removeItem('useFrameset');
+ // Redirect to regular view
+ window.location.href = '/asteroid/';
+}
+
+// Check if user prefers frameset mode on page load
+window.addEventListener('DOMContentLoaded', function() {
+ const path = window.location.pathname;
+ const isFramesetPage = path.includes('/frameset') || path.includes('/content') ||
+ path.includes('/audio-player-frame') || path.includes('/player-content');
+
+ if (localStorage.getItem('useFrameset') === 'true' && !isFramesetPage && path === '/asteroid/') {
+ // User wants frameset but is on regular front page, redirect
+ window.location.href = '/asteroid/frameset';
+ }
+});
diff --git a/template/admin.chtml b/template/admin.chtml
index ecfa9a5..5310f18 100644
--- a/template/admin.chtml
+++ b/template/admin.chtml
@@ -12,9 +12,9 @@
๐๏ธ ADMIN DASHBOARD
diff --git a/template/audio-player-frame.chtml b/template/audio-player-frame.chtml
new file mode 100644
index 0000000..a7d8669
--- /dev/null
+++ b/template/audio-player-frame.chtml
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+
+
+
+
๐ข LIVE:
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
+
+
+
+
diff --git a/template/frameset-wrapper.chtml b/template/frameset-wrapper.chtml
new file mode 100644
index 0000000..0cf1f2e
--- /dev/null
+++ b/template/frameset-wrapper.chtml
@@ -0,0 +1,23 @@
+
+
+
+
๐ต ASTEROID RADIO ๐ต
+
+
+
+
+
+
diff --git a/template/front-page-content.chtml b/template/front-page-content.chtml
new file mode 100644
index 0000000..f4e8c97
--- /dev/null
+++ b/template/front-page-content.chtml
@@ -0,0 +1,47 @@
+
+
+
+
๐ต ASTEROID RADIO ๐ต
+
+
+
+
+
+
+
+
+
+
+
+
+
Station Status
+
๐ข LIVE - Broadcasting asteroid music for hackers
+
Current listeners: 0
+
Stream quality: AAC 96kbps Stereo
+
+
+
+
๐ข LIVE STREAM
+
The live stream player is now in the persistent bar at the bottom of the page.
+
Stream URL:
+
Format:
+
Status: โ BROADCASTING
+
+
+
+
+
+
+
diff --git a/template/front-page.chtml b/template/front-page.chtml
index cbf1ee5..dff4977 100644
--- a/template/front-page.chtml
+++ b/template/front-page.chtml
@@ -35,9 +35,14 @@
๐ข LIVE STREAM
-
+
+
+
+
diff --git a/template/login.chtml b/template/login.chtml
index 7c315c2..584ab07 100644
--- a/template/login.chtml
+++ b/template/login.chtml
@@ -11,9 +11,9 @@
diff --git a/template/player-content.chtml b/template/player-content.chtml
new file mode 100644
index 0000000..c347c46
--- /dev/null
+++ b/template/player-content.chtml
@@ -0,0 +1,120 @@
+
+
+
+
Asteroid Radio - Web Player
+
+
+
+
+
+
+
+
+
๐ต WEB PLAYER
+
+
+
+
+
๐ข Live Radio Stream
+
The live stream player is now in the persistent bar at the bottom of the page. It will continue playing as you navigate between pages!
+
+
+
+
+
+
+
Personal Track Library
+
+
+
+
+
+
+
+
+
+
+
+
Audio Player
+
+
+
๐ต
+
+
No track selected
+
Unknown Artist
+
Unknown Album
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0:00 / 0:00
+
+
+
+
+
+
+
+
+
+
+
+
Playlists
+
+
+
+
+
+
+
+
No playlists created yet.
+
+
+
+
+
+
+
Play Queue
+
+
+
+
+
+
+
+
+
diff --git a/template/player.chtml b/template/player.chtml
index 5911737..4ddcb91 100644
--- a/template/player.chtml
+++ b/template/player.chtml
@@ -12,9 +12,9 @@
๐ต WEB PLAYER
-
Home
-
Profile
-
Admin
+
Home
+
Profile
+
Admin
Login
Register
Logout
diff --git a/template/profile.chtml b/template/profile.chtml
index 5398903..2956190 100644
--- a/template/profile.chtml
+++ b/template/profile.chtml
@@ -12,9 +12,9 @@
๐ค USER PROFILE
diff --git a/template/register.chtml b/template/register.chtml
index 95ba65f..650400c 100644
--- a/template/register.chtml
+++ b/template/register.chtml
@@ -11,9 +11,9 @@
diff --git a/template/users.chtml b/template/users.chtml
index bd63584..58fb45d 100644
--- a/template/users.chtml
+++ b/template/users.chtml
@@ -11,8 +11,8 @@