Revert "fix: replace Astro.redirect with direct live content at /"
This reverts commit 34ac4be6c2.
This commit is contained in:
@@ -1,78 +1,6 @@
|
||||
---
|
||||
// ─── index.astro — Dashboard root ───────────────────────────────────────────
|
||||
// Serves the same content as /live/ at the root path.
|
||||
// No redirect — avoids meta-refresh issues in SSG mode.
|
||||
// ─── index.astro — Redirect to live dashboard ──────────────────────────────
|
||||
// The root path now redirects to /live where the full SPA lives.
|
||||
// ────────────────────────────────────────────────────────────────────────────
|
||||
import BaseLayout from "../layouts/BaseLayout.astro";
|
||||
import Sidebar from "../components/sidebar/Sidebar.astro";
|
||||
import Header from "../components/header/Header.astro";
|
||||
import Card from "../components/ui/Card.astro";
|
||||
import ThemeToggle from "../islands/ThemeToggle";
|
||||
import VoiceControls from "../islands/VoiceControls";
|
||||
import ActiveSpeakers from "../islands/ActiveSpeakers";
|
||||
import AudioVisualizer from "../islands/AudioVisualizer";
|
||||
import NowPlaying from "../islands/NowPlaying";
|
||||
import Particles from "../islands/Particles";
|
||||
import MascotChat from "../islands/MascotChat";
|
||||
return Astro.redirect("/live", 301);
|
||||
---
|
||||
|
||||
<BaseLayout>
|
||||
<div class="live-page-layout">
|
||||
<Sidebar activeTab="live" />
|
||||
|
||||
<main class="live-main-area">
|
||||
<Header title="Live">
|
||||
<ThemeToggle slot="actions" client:idle />
|
||||
</Header>
|
||||
|
||||
<div class="live-content p-4 md:p-6 lg:p-8">
|
||||
<div class="live-grid">
|
||||
<div class="live-main-col space-y-4 md:space-y-6">
|
||||
<Card variant="glass">
|
||||
<h2 class="text-base font-semibold mb-3">Voice Connection</h2>
|
||||
<VoiceControls client:load />
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<h2 class="text-base font-semibold mb-3">Live Audio</h2>
|
||||
<AudioVisualizer client:idle barCount={48} height={32} />
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<h2 class="text-base font-semibold mb-3">Now Playing</h2>
|
||||
<NowPlaying client:idle />
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
<aside class="live-sidebar-col space-y-4 md:space-y-6">
|
||||
<Card>
|
||||
<h2 class="text-base font-semibold mb-3">Active Speakers</h2>
|
||||
<ActiveSpeakers client:idle />
|
||||
</Card>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<Particles client:idle />
|
||||
<MascotChat client:idle />
|
||||
</BaseLayout>
|
||||
|
||||
<style is:global>
|
||||
.live-page-layout {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.live-main-area {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.live-content { flex: 1; overflow-y: auto; }
|
||||
.live-grid { display: grid; gap: 1.5rem; }
|
||||
@media (min-width: 1024px) { .live-grid { grid-template-columns: 1fr 320px; } }
|
||||
.live-sidebar-col { position: sticky; top: calc(56px + 2rem); align-self: start; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user