feat: use navbar partial on all page templates
This commit is contained in:
parent
7c6eaa1fe0
commit
0def454077
|
|
@ -1009,6 +1009,7 @@
|
||||||
(error () 0))))
|
(error () 0))))
|
||||||
(clip:process-to-string
|
(clip:process-to-string
|
||||||
(load-template "admin")
|
(load-template "admin")
|
||||||
|
:navbar-exclude '("admin")
|
||||||
:title "🎵 ASTEROID RADIO - Admin Dashboard"
|
:title "🎵 ASTEROID RADIO - Admin Dashboard"
|
||||||
:server-status "🟢 Running"
|
:server-status "🟢 Running"
|
||||||
:database-status (handler-case
|
:database-status (handler-case
|
||||||
|
|
@ -1027,6 +1028,7 @@
|
||||||
(require-authentication)
|
(require-authentication)
|
||||||
(clip:process-to-string
|
(clip:process-to-string
|
||||||
(load-template "users")
|
(load-template "users")
|
||||||
|
:navbar-exclude '("profile" "users")
|
||||||
:title "ASTEROID RADIO - User Management"))
|
:title "ASTEROID RADIO - User Management"))
|
||||||
|
|
||||||
;; User Profile page (requires authentication)
|
;; User Profile page (requires authentication)
|
||||||
|
|
@ -1035,6 +1037,7 @@
|
||||||
(require-authentication)
|
(require-authentication)
|
||||||
(clip:process-to-string
|
(clip:process-to-string
|
||||||
(load-template "profile")
|
(load-template "profile")
|
||||||
|
:navbar-exclude '("about" "status" "profile")
|
||||||
:title "🎧 admin - Profile | Asteroid Radio"
|
:title "🎧 admin - Profile | Asteroid Radio"
|
||||||
:username "admin"
|
:username "admin"
|
||||||
:user-role "admin"
|
:user-role "admin"
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,13 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" type="text/css" href="/asteroid/static/asteroid.css">
|
<link rel="stylesheet" type="text/css" href="/asteroid/static/asteroid.css">
|
||||||
<script src="/asteroid/static/js/auth-ui.js"></script>
|
<script lquery='(text (asteroid::get-auth-state-js-var))'></script>
|
||||||
<script src="/asteroid/static/js/admin.js"></script>
|
<script src="/asteroid/static/js/admin.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>🎛️ ADMIN DASHBOARD</h1>
|
<h1>🎛️ ADMIN DASHBOARD</h1>
|
||||||
<div class="nav">
|
<c:h>(asteroid::load-template "partial/navbar-admin")</c:h>
|
||||||
<a href="/asteroid">Home</a>
|
|
||||||
<a href="/asteroid/player">Player</a>
|
|
||||||
<a href="/asteroid/profile">Profile</a>
|
|
||||||
<a href="/asteroid/admin/users">👥 Users</a>
|
|
||||||
<a href="/asteroid/logout" class="btn-logout">Logout</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- System Status -->
|
<!-- System Status -->
|
||||||
<div class="admin-section">
|
<div class="admin-section">
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,7 @@
|
||||||
<span>ASTEROID RADIO</span>
|
<span>ASTEROID RADIO</span>
|
||||||
<img src="/asteroid/static/asteroid.png" alt="Asteroid" style="height: 50px; width: auto;">
|
<img src="/asteroid/static/asteroid.png" alt="Asteroid" style="height: 50px; width: auto;">
|
||||||
</h1>
|
</h1>
|
||||||
<nav class="nav">
|
<c:h>(asteroid::load-template "partial/navbar")</c:h>
|
||||||
<a href="/asteroid/">Home</a>
|
|
||||||
<a href="/asteroid/player">Player</a>
|
|
||||||
<a href="/asteroid/about">About</a>
|
|
||||||
</nav>
|
|
||||||
</header>
|
</header>
|
||||||
<main style="max-width: 800px; margin: 0 auto; padding: 20px;">
|
<main style="max-width: 800px; margin: 0 auto; padding: 20px;">
|
||||||
<section style="margin-bottom: 30px;">
|
<section style="margin-bottom: 30px;">
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/asteroid/static/favicon-32x32.png">
|
<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="icon" type="image/png" sizes="16x16" href="/asteroid/static/favicon-16x16.png">
|
||||||
<link rel="stylesheet" type="text/css" href="/asteroid/static/asteroid.css">
|
<link rel="stylesheet" type="text/css" href="/asteroid/static/asteroid.css">
|
||||||
<script src="/asteroid/static/js/auth-ui.js"></script>
|
<script lquery='(text (asteroid::get-auth-state-js-var))'></script>
|
||||||
<script src="/asteroid/static/js/front-page.js"></script>
|
<script src="/asteroid/static/js/front-page.js"></script>
|
||||||
<script src="/asteroid/static/js/recently-played.js"></script>
|
<script src="/asteroid/static/js/recently-played.js"></script>
|
||||||
<script src="/api/asteroid/spectrum-analyzer.js"></script>
|
<script src="/api/asteroid/spectrum-analyzer.js"></script>
|
||||||
|
|
@ -50,32 +50,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav class="nav">
|
<c:h>(asteroid::load-template "partial/navbar")</c:h>
|
||||||
<c:if test="(not framesetp)">
|
|
||||||
<c:then>
|
|
||||||
<a href="/asteroid/">Home</a>
|
|
||||||
<a href="/asteroid/player">Player</a>
|
|
||||||
<a href="/asteroid/about">About</a>
|
|
||||||
<a href="/asteroid/status">Status</a>
|
|
||||||
<a href="/asteroid/profile" data-show-if-logged-in>Profile</a>
|
|
||||||
<a href="/asteroid/admin" data-show-if-admin>Admin</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/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>
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,7 @@
|
||||||
<img src="/asteroid/static/asteroid.png" alt="Asteroid" style="height: 50px; width: auto;">
|
<img src="/asteroid/static/asteroid.png" alt="Asteroid" style="height: 50px; width: auto;">
|
||||||
<span>ASTEROID RADIO - LOGIN</span>
|
<span>ASTEROID RADIO - LOGIN</span>
|
||||||
</h1>
|
</h1>
|
||||||
<nav class="nav">
|
<c:h>(asteroid::load-template "partial/navbar")</c:h>
|
||||||
<a href="/asteroid">Home</a>
|
|
||||||
<a href="/asteroid/player">Player</a>
|
|
||||||
<a href="/asteroid/status">Status</a>
|
|
||||||
<a href="/asteroid/register">Register</a>
|
|
||||||
</nav>
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="auth-container">
|
<div class="auth-container">
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
<c:let home-href='(if framesetp "content" "")'
|
||||||
|
player-href='(if framesetp "player-content" "player")'
|
||||||
|
current-user='(asteroid::get-current-user)'
|
||||||
|
framesetp='framesetp'>
|
||||||
|
<!-- Navbar definition -->
|
||||||
|
<nav class="nav">
|
||||||
|
<c:unless test='(asteroid::member-string "home" (** :navbar-exclude))'>
|
||||||
|
<a lquery='(attr :href (eval (format nil "/asteroid/~a" home-href)) :target (when framesetp "_self"))'>
|
||||||
|
Home
|
||||||
|
</a>
|
||||||
|
</c:unless>
|
||||||
|
<c:unless test='(asteroid::member-string "player" (** :navbar-exclude))'>
|
||||||
|
<a lquery='(attr :href (eval (format nil "/asteroid/~a" player-href)) :target (when framesetp "_self"))'>
|
||||||
|
Player
|
||||||
|
</a>
|
||||||
|
</c:unless>
|
||||||
|
<c:unless test='(asteroid::member-string "profile" (** :navbar-exclude))'>
|
||||||
|
<a href="/asteroid/profile"
|
||||||
|
lquery='(attr :target (when framesetp "_self"))'>
|
||||||
|
Profile
|
||||||
|
</a>
|
||||||
|
</c:unless>
|
||||||
|
<c:unless test='(asteroid::member-string "admin" (** :navbar-exclude))'>
|
||||||
|
<a href="/asteroid/admin"
|
||||||
|
lquery='(attr :target (when framesetp "_self"))'>
|
||||||
|
Admin
|
||||||
|
</a>
|
||||||
|
</c:unless>
|
||||||
|
<c:unless test='(asteroid::member-string "users" (** :navbar-exclude))'>
|
||||||
|
<a href="/asteroid/admin/users"
|
||||||
|
lquery='(attr :target (when framesetp "_self"))'>
|
||||||
|
👥 Users
|
||||||
|
</a>
|
||||||
|
</c:unless>
|
||||||
|
<a href="/asteroid/logout"
|
||||||
|
lquery='(attr :target (when framesetp "_self"))'
|
||||||
|
class="btn-logout">
|
||||||
|
Logout
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
</c:let>
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/asteroid/static/favicon-32x32.png">
|
<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="icon" type="image/png" sizes="16x16" href="/asteroid/static/favicon-16x16.png">
|
||||||
<link rel="stylesheet" type="text/css" href="/asteroid/static/asteroid.css">
|
<link rel="stylesheet" type="text/css" href="/asteroid/static/asteroid.css">
|
||||||
<script src="/asteroid/static/js/auth-ui.js"></script>
|
<script lquery='(text (asteroid::get-auth-state-js-var))'></script>
|
||||||
<script src="/asteroid/static/js/front-page.js"></script>
|
<script src="/asteroid/static/js/front-page.js"></script>
|
||||||
<script src="/asteroid/static/js/player.js"></script>
|
<script src="/asteroid/static/js/player.js"></script>
|
||||||
<c:if test="framesetp">
|
<c:if test="framesetp">
|
||||||
|
|
@ -56,26 +56,7 @@
|
||||||
</c:then>
|
</c:then>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
<div class="nav">
|
<c:h>(asteroid::load-template "partial/navbar")</c:h>
|
||||||
<c:if test="(not framesetp)">
|
|
||||||
<c:then>
|
|
||||||
<a href="/asteroid">Home</a>
|
|
||||||
<a href="/asteroid/profile">Profile</a>
|
|
||||||
<a href="/asteroid/admin" data-show-if-admin>Admin</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/logout" data-show-if-logged-in class="btn-logout">Logout</a>
|
|
||||||
</c:then>
|
|
||||||
<c:else>
|
|
||||||
<a href="/asteroid/content" target="content-frame">Home</a>
|
|
||||||
<a href="/asteroid/profile" target="content-frame" data-show-if-logged-in>Profile</a>
|
|
||||||
<a href="/asteroid/admin" target="content-frame" data-show-if-admin>Admin</a>
|
|
||||||
<a href="/asteroid/login" target="content-frame" data-show-if-logged-out>Login</a>
|
|
||||||
<a href="/asteroid/register" target="content-frame" 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>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Live Stream Section -->
|
<!-- Live Stream Section -->
|
||||||
<div class="player-section">
|
<div class="player-section">
|
||||||
|
|
|
||||||
|
|
@ -5,18 +5,13 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" type="text/css" href="/asteroid/static/asteroid.css">
|
<link rel="stylesheet" type="text/css" href="/asteroid/static/asteroid.css">
|
||||||
<script src="/asteroid/static/js/auth-ui.js"></script>
|
<script lquery='(text (asteroid::get-auth-state-js-var))'></script>
|
||||||
<script src="/asteroid/static/js/profile.js"></script>
|
<script src="/asteroid/static/js/profile.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>👤 USER PROFILE</h1>
|
<h1>👤 USER PROFILE</h1>
|
||||||
<div class="nav">
|
<c:h>(asteroid::load-template "partial/navbar")</c:h>
|
||||||
<a href="/asteroid">Home</a>
|
|
||||||
<a href="/asteroid/player">Player</a>
|
|
||||||
<a href="/asteroid/admin" data-show-if-admin>Admin</a>
|
|
||||||
<a href="/asteroid/logout" class="btn-logout">Logout</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- User Profile Header -->
|
<!-- User Profile Header -->
|
||||||
<div class="admin-section">
|
<div class="admin-section">
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,7 @@
|
||||||
<img src="/asteroid/static/asteroid.png" alt="Asteroid" style="height: 50px; width: auto;">
|
<img src="/asteroid/static/asteroid.png" alt="Asteroid" style="height: 50px; width: auto;">
|
||||||
<span>ASTEROID RADIO - REGISTER</span>
|
<span>ASTEROID RADIO - REGISTER</span>
|
||||||
</h1>
|
</h1>
|
||||||
<nav class="nav">
|
<c:h>(asteroid::load-template "partial/navbar")</c:h>
|
||||||
<a href="/asteroid">Home</a>
|
|
||||||
<a href="/asteroid/player">Player</a>
|
|
||||||
<a href="/asteroid/status">Status</a>
|
|
||||||
<a href="/asteroid/login">Login</a>
|
|
||||||
</nav>
|
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="auth-container">
|
<div class="auth-container">
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" type="text/css" href="/asteroid/static/asteroid.css">
|
<link rel="stylesheet" type="text/css" href="/asteroid/static/asteroid.css">
|
||||||
<script src="/asteroid/static/js/auth-ui.js"></script>
|
<script lquery='(text (asteroid::get-auth-state-js-var))'></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
@ -16,34 +16,8 @@
|
||||||
<img src="/asteroid/static/asteroid.png" alt="Asteroid" style="height: 50px; width: auto;">
|
<img src="/asteroid/static/asteroid.png" alt="Asteroid" style="height: 50px; width: auto;">
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<nav class="nav">
|
<c:h>(asteroid::load-template "partial/navbar")</c:h>
|
||||||
<c:if test="(not framesetp)">
|
|
||||||
<c:then>
|
|
||||||
<a href="/asteroid">Home</a>
|
|
||||||
<a href="/asteroid/player">Player</a>
|
|
||||||
<a href="/asteroid/about">About</a>
|
|
||||||
<a href="/asteroid/status">Status</a>
|
|
||||||
<a href="/asteroid/profile" data-show-if-logged-in>Profile</a>
|
|
||||||
<a href="/asteroid/admin" data-show-if-admin>Admin</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/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>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main style="max-width: 800px; margin: 0 auto; padding: 20px;">
|
<main style="max-width: 800px; margin: 0 auto; padding: 20px;">
|
||||||
<section style="margin-bottom: 30px;">
|
<section style="margin-bottom: 30px;">
|
||||||
<h2 style="color: #00ff00; border-bottom: 2px solid #00ff00; padding-bottom: 10px;">🟢 Server Status</h2>
|
<h2 style="color: #00ff00; border-bottom: 2px solid #00ff00; padding-bottom: 10px;">🟢 Server Status</h2>
|
||||||
|
|
@ -61,12 +35,14 @@
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section style="margin-bottom: 30px;">
|
<c:when test='(equal "admin" (clip (asteroid::get-current-user) :role))'>
|
||||||
<h2 style="color: #00ff00; border-bottom: 2px solid #00ff00; padding-bottom: 10px;">ℹ️ Additional Information</h2>
|
<section style="margin-bottom: 30px;">
|
||||||
<p style="line-height: 1.6;">
|
<h2 style="color: #00ff00; border-bottom: 2px solid #00ff00; padding-bottom: 10px;">ℹ️ Additional Information</h2>
|
||||||
For detailed system status and administration, please visit the <a href="/asteroid/admin" style="color: #00ff00;" data-show-if-admin>Admin Dashboard</a>.
|
<p style="line-height: 1.6;">
|
||||||
</p>
|
For detailed system status and administration, please visit the <a href="/asteroid/admin" style="color: #00ff00;">Admin Dashboard</a>.
|
||||||
</section>
|
</p>
|
||||||
|
</section>
|
||||||
|
</c:when>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,8 @@
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>👥 USER MANAGEMENT</h1>
|
<h1>👥 USER MANAGEMENT</h1>
|
||||||
<div class="nav">
|
<c:h>(asteroid::load-template "partial/navbar-admin")</c:h>
|
||||||
<a href="/asteroid">Home</a>
|
|
||||||
<a href="/asteroid/admin">Admin</a>
|
|
||||||
<a href="/asteroid/logout" class="btn-logout">Logout</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- User Statistics -->
|
<!-- User Statistics -->
|
||||||
<div class="admin-section">
|
<div class="admin-section">
|
||||||
<h2>User Statistics</h2>
|
<h2>User Statistics</h2>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue