2021-12-08 03:38:31 +00:00
|
|
|
import Layout from '../components/layout';
|
2022-04-28 01:55:18 +00:00
|
|
|
import { mapChild, toListItem } from '../components/lists';
|
2022-04-23 23:03:43 +00:00
|
|
|
import pl from '../public/playlists.yaml';
|
2021-12-08 03:38:31 +00:00
|
|
|
|
|
|
|
function Playlists() {
|
2022-09-28 00:52:24 +00:00
|
|
|
|
2021-12-08 03:38:31 +00:00
|
|
|
return (
|
|
|
|
<Layout name='Playlists'>
|
2022-04-28 01:55:18 +00:00
|
|
|
<h2>Music</h2>
|
|
|
|
{
|
|
|
|
pl.map((item: Record<string, any>) => {
|
|
|
|
const lItem = toListItem(item)
|
|
|
|
if (lItem)
|
2022-09-28 00:52:24 +00:00
|
|
|
return mapChild(lItem, 0, {
|
|
|
|
'spotify': (i) => {
|
|
|
|
return <div>
|
|
|
|
<a className='extern link button'
|
|
|
|
href={`https://open.spotify.com/track/${i.id}`}></a>
|
|
|
|
{i.title}</div>;
|
|
|
|
},
|
|
|
|
'youtube-playlist': (i) => {
|
|
|
|
return <div>
|
|
|
|
<a className='extern link button'
|
|
|
|
href={`https://youtube.com/playlist?list=${i.id}`}></a>
|
|
|
|
{i.title}</div>;
|
|
|
|
}
|
|
|
|
})
|
2022-04-28 01:55:18 +00:00
|
|
|
})
|
|
|
|
}
|
2021-12-08 03:38:31 +00:00
|
|
|
</Layout>
|
|
|
|
);
|
|
|
|
}
|
2022-01-25 00:58:01 +00:00
|
|
|
export default Playlists;
|