feat(frontend): add static shell + index page
This commit is contained in:
parent
01c281ca80
commit
04835f31b6
6 changed files with 118 additions and 0 deletions
44
frontend/src/pages/index.astro
Normal file
44
frontend/src/pages/index.astro
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
import '@styles/tokens.css';
|
||||
import '@styles/global.css';
|
||||
import '@styles/components/hero.css';
|
||||
import '@styles/components/deck.css';
|
||||
import '@styles/components/spectrum.css';
|
||||
import '@styles/components/tape.css';
|
||||
import '@styles/components/history-card.css';
|
||||
import '@styles/components/listen-ways-card.css';
|
||||
import '@styles/components/footer.css';
|
||||
|
||||
import TopNav from '@components/TopNav.astro';
|
||||
import HistoryCard from '@components/HistoryCard.astro';
|
||||
import ListenWaysCard from '@components/ListenWaysCard.astro';
|
||||
import FooterStrip from '@components/FooterStrip.astro';
|
||||
import { HeroPlayer } from '@components/HeroPlayer';
|
||||
import { listStations } from '@lib/stations';
|
||||
|
||||
export const prerender = false;
|
||||
|
||||
const root = process.env.LIBRARY_ROOT ?? '/library';
|
||||
const initialStations = await listStations(root);
|
||||
const firstStation = initialStations[0]?.id ?? '';
|
||||
---
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
||||
<title>denpa.fm // 電波</title>
|
||||
<meta name="description" content="denpa.fm — a tiny independent radio." />
|
||||
</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<TopNav />
|
||||
<HeroPlayer initialStations={initialStations} client:load />
|
||||
<div id="listen" class="row-grid two">
|
||||
{firstStation ? <HistoryCard station={firstStation} /> : <div />}
|
||||
{firstStation ? <ListenWaysCard stationId={firstStation} /> : <div />}
|
||||
</div>
|
||||
<FooterStrip />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue