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