(songs) hide songs for now
This commit is contained in:
parent
e473edecdb
commit
09de7c070f
|
@ -18,10 +18,6 @@ const menu: MenuItem[] = [
|
|||
name: 'Wiki',
|
||||
url: '/wiki/',
|
||||
},
|
||||
{
|
||||
name: 'Songs',
|
||||
url: '/songs/',
|
||||
},
|
||||
{
|
||||
name: 'Map',
|
||||
url: '/map/',
|
||||
|
|
|
@ -30,5 +30,10 @@ export const collections = {
|
|||
})
|
||||
)
|
||||
})
|
||||
}),
|
||||
wiki: defineCollection({
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
---
|
||||
import Base from "@layouts/Base.astro";
|
||||
import Grid from "@components/songs/AlbumGrid.astro";
|
||||
import Header from "@components/headers/Base.astro";
|
||||
import { CIRCLES } from "@utils/songs/data";
|
||||
|
||||
|
||||
export async function getStaticPaths() {
|
||||
return Object.keys(CIRCLES)
|
||||
.map(circle => ({
|
||||
params: { circle },
|
||||
props: { albums: CIRCLES[circle].albums }
|
||||
}))
|
||||
}
|
||||
|
||||
interface Props {
|
||||
albums: typeof CIRCLES[string]['albums'];
|
||||
}
|
||||
|
||||
const circle = Astro.params.circle!;
|
||||
const albums = Astro.props.albums;
|
||||
const items = Object.keys(albums)
|
||||
.map(slug => ({
|
||||
title: albums[slug].title,
|
||||
cover: albums[slug].cover,
|
||||
url: `/songs/${circle}/${slug}/`
|
||||
}))
|
||||
---
|
||||
|
||||
<Base>
|
||||
<main class="l-songs-circle">
|
||||
<article class="l-songs-circle__article">
|
||||
<Header title={CIRCLES[circle].name} />
|
||||
<Grid albums={items} />
|
||||
</article>
|
||||
</main>
|
||||
</Base>
|
|
@ -1,55 +0,0 @@
|
|||
---
|
||||
import Base from "@layouts/Base.astro";
|
||||
import Header from '@components/headers/Base.astro';
|
||||
import { CollectionEntry, getCollection } from 'astro:content';
|
||||
import { ALBUMS, getAllCats, order } from "@utils/songs/data";
|
||||
import Info from "@components/songs/Info.astro";
|
||||
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const songs = await getCollection('songs');
|
||||
const cats = getAllCats(songs);
|
||||
|
||||
return [...cats].map(cat => ({
|
||||
params: { circle: ALBUMS[cat].circle, cat },
|
||||
props: {
|
||||
songs: songs
|
||||
.filter(entry => cat in entry.data.album)
|
||||
.sort(order(cat))
|
||||
.map(song => ({
|
||||
frontmatter: song.data,
|
||||
slug: `/songs/${ALBUMS[cat].circle}/${cat}/${song.slug}/`
|
||||
}))
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
interface Props {
|
||||
songs: Array<{
|
||||
frontmatter: CollectionEntry<'songs'>['data'],
|
||||
slug: string,
|
||||
}>
|
||||
}
|
||||
|
||||
const cat = Astro.params.cat!;
|
||||
const songs = Astro.props.songs;
|
||||
const album = ALBUMS[cat];
|
||||
---
|
||||
|
||||
<Base>
|
||||
<main class="l-songs-aside">
|
||||
<article class="l-songs-aside__page">
|
||||
<Header title={album.title} />
|
||||
<div class="l-songs-cat__list">
|
||||
{songs.map(song => [
|
||||
<span>{song.frontmatter.album[cat].track}</span>
|
||||
<a href={song.slug}>{song.frontmatter.title}</a>
|
||||
])}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<aside>
|
||||
<Info image={album.cover} title={album.title} small={cat}/>
|
||||
</aside>
|
||||
</main>
|
||||
</Base>
|
|
@ -8,13 +8,13 @@ import { ALBUMS } from "@utils/songs/data";
|
|||
|
||||
|
||||
export async function getStaticPaths() {
|
||||
return (await getCollection('songs'))
|
||||
return []; /*(await getCollection('songs'))
|
||||
.map(song => Object.keys(song.data.album)
|
||||
.map(cat => ({
|
||||
params: { circle: ALBUMS[cat].circle, cat, song: song.slug},
|
||||
props: { song, cat }
|
||||
})))
|
||||
.flat()
|
||||
.flat()*/
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
---
|
||||
import List from "../../layouts/List.astro";
|
||||
import { CIRCLES } from "../../utils/songs/data";
|
||||
|
||||
|
||||
const pages = Object.keys(CIRCLES)
|
||||
.map(slug => ({ title: CIRCLES[slug].name, slug: `/songs/${slug}/` }))
|
||||
.sort((a, b) => a.title < b.title ? -1 : 1)
|
||||
---
|
||||
|
||||
<List title="Circles" pages={pages}/>
|
Loading…
Reference in a new issue