diff --git a/public/img/vinyl/college_park.png b/public/img/vinyl/college_park.png new file mode 100644 index 0000000..656c554 Binary files /dev/null and b/public/img/vinyl/college_park.png differ diff --git a/public/img/vinyl/evig_eventyr.jpg b/public/img/vinyl/evig_eventyr.jpg new file mode 100644 index 0000000..c945d62 Binary files /dev/null and b/public/img/vinyl/evig_eventyr.jpg differ diff --git a/public/img/vinyl/minecraft_volume_alpha.jpg b/public/img/vinyl/minecraft_volume_alpha.jpg new file mode 100644 index 0000000..327f413 Binary files /dev/null and b/public/img/vinyl/minecraft_volume_alpha.jpg differ diff --git a/public/img/vinyl/sa_klart_det_gjor_vondt.jpg b/public/img/vinyl/sa_klart_det_gjor_vondt.jpg new file mode 100644 index 0000000..004e471 Binary files /dev/null and b/public/img/vinyl/sa_klart_det_gjor_vondt.jpg differ diff --git a/src/data/vinyl.json b/src/data/vinyl.json new file mode 100644 index 0000000..f737854 --- /dev/null +++ b/src/data/vinyl.json @@ -0,0 +1,22 @@ +[ + { + "album": "Minecraft Volume Alpha", + "artist": "C418", + "cover": "/img/vinyl/minecraft_volume_alpha.jpg" + }, + { + "album": "College Park", + "artist": "Logic", + "cover": "/img/vinyl/college_park.png" + }, + { + "album": "Evig Eventyr", + "artist": "Ka2", + "cover": "/img/vinyl/evig_eventyr.jpg" + }, + { + "album": "SΓ… KLART DET GJØR VONDT", + "artist": "RamΓ³n", + "cover": "/img/vinyl/sa_klart_det_gjor_vondt.jpg" + } +] \ No newline at end of file diff --git a/src/pages/more.md b/src/pages/more.md index 200bbb4..cbc2102 100644 --- a/src/pages/more.md +++ b/src/pages/more.md @@ -6,10 +6,12 @@ layout: "../layouts/Layout.astro" [🌐 Connect](/connect) -[✨ Uses](/uses) - [πŸ“œ CV (under construction)](/) +[🌱 Digital garden](/garden) + [πŸ“š Logs](/logs) -[🌱 Digital garden](/garden) +[✨ Uses](/uses) + +[πŸ“€ Vinyl collection](/vinyl) \ No newline at end of file diff --git a/src/pages/vinyl.astro b/src/pages/vinyl.astro new file mode 100644 index 0000000..7b38759 --- /dev/null +++ b/src/pages/vinyl.astro @@ -0,0 +1,51 @@ +--- +import SectionContainer from '../components/SectionContainer.astro'; +import vinyl from '../data/vinyl.json' + +const vinylByAlbumTitle = vinyl.reduce((acc:any, currentVinyl) => { + const { album, artist, cover } = currentVinyl; + if (!acc[album]) { + acc[album] = { + vinyls: [], + artist: artist, + cover: cover + }; + } + acc[album].vinyls.push(currentVinyl); + return acc; +}, {}); + +const vinylData = Object.keys(vinylByAlbumTitle).map(albumTitle => { + const albumData = vinylByAlbumTitle[albumTitle]; + return { + title: albumTitle, + artist: albumData.artist, + cover: albumData.cover, + vinyl: albumData.vinyls, + }; +}); +--- + + +
+
+ +

+ πŸ“€ Platesamlinga +

+

Here's a collection of all the vinyl's that I got!

+
+
+ {vinylData.map((album) => ( +
+ +

{album.title}

+

{album.artist}

+
+ ))} +
+
+
\ No newline at end of file