From 608d17a7525ba349880305071657c6a6f477db3b Mon Sep 17 00:00:00 2001 From: denizk0461 Date: Mon, 18 Aug 2025 14:03:28 +0200 Subject: [PATCH] moved liked albums over to lib/likedalbums.ts and transferred data into map --- src/lib/likedalbums.ts | 375 ++++++++++++++++++++++++++++ src/routes/about/music/+page.svelte | 326 +----------------------- 2 files changed, 378 insertions(+), 323 deletions(-) create mode 100644 src/lib/likedalbums.ts diff --git a/src/lib/likedalbums.ts b/src/lib/likedalbums.ts new file mode 100644 index 0000000..105c6cc --- /dev/null +++ b/src/lib/likedalbums.ts @@ -0,0 +1,375 @@ + + export interface AlbumEntry { + artist: string; + title: string; + year: number; + img: string; + description: string[]; + }; + + export const albums: Map = new Map([ + [ + "acloudyskye_wdyw", { + artist: "acloudyskye", + title: "What Do You Want!", + year: 2022, + img: "acloudyskye_02_wdyw.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "acloudyskye_tmbsh", { + artist: "acloudyskye", + title: "There Must Be Something Here", + year: 2024, + img: "acloudyskye_03_tmbsh.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + }, + ], + [ + "acloudyskye_twbtlt", { + artist: "acloudyskye", + title: "This Won't Be The Last Time", + year: 2025, + img: "acloudyskye_04_twbtlt.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "avicii_true", { + artist: "Avicii", + title: "True", + year: 2013, + img: "avicii_01_true.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "avicii_trueaba", { + artist: "Avicii", + title: "True (Avicii by Avicii)", + year: 2014, + img: "avicii_02_trueaba.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "avicii_avici01", { + artist: "Avicii", + title: "Avīci (01)", + year: 2017, + img: "avicii_04_avici01.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "benboehmer_breathing", { + artist: "Ben Böhmer", + title: "Breathing", + year: 2019, + img: "benboehmer_01_breathing.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "bitbird_ct3", { + artist: "bitbird artists", + title: "create together vol. 3", + year: 2022, + img: "bitbird_ct3.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "bitbird_gf4", { + artist: "bitbird artists", + title: "Gouldian Finch 4", + year: 2021, + img: "bitbird_gf4.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "brakence_hypochondriac", { + artist: "brakence", + title: "hypochondriac", + year: 2022, + img: "brakence_04_hypochondriac.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "duskus_healersvol1", { + artist: "Duskus", + title: "Healers Vol. 1", + year: 2023, + img: "duskus_02_healersvol1.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "fromtheheart_thiok", { + artist: "FROMTHEHEART", + title: '"things happen, it\'s ok!"', + year: 2020, + img: "fromtheheart_thiok.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "gabbystart_alex", { + artist: "gabby start", + title: "alex", + year: 2022, + img: "gabbystart_02_alex.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "illenium_ashes", { + artist: "ILLENIUM", + title: "Ashes", + year: 2016, + img: "illenium_01_ashes.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "illenium_awake", { + artist: "ILLENIUM", + title: "Awake", + year: 2017, + img: "illenium_02_awake.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "illenium_ascend", { + artist: "ILLENIUM", + title: "ASCEND", + year: 2019, + img: "illenium_03_ascend.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "janeremover_teenweek", { + artist: "Jane Remover", + title: "Teen Week", + year: 2021, + img: "janeremover_01_teenweek.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "janeremover_frailty", { + artist: "Jane Remover", + title: "Frailty", + year: 2021, + img: "janeremover_02_frailty.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "janeremover_censusdesignated", { + artist: "Jane Remover", + title: "Census Designated", + year: 2023, + img: "janeremover_03_censusdesignated.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "janeremover_revengeseekerz", { + artist: "Jane Remover", + title: "Revengeseekerz", + year: 2025, + img: "janeremover_04_revengeseekerz.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "jaron_ihtsc", { + artist: "Jaron", + title: "it's hard to see color [When You're So Impossibly Far Away*]", + year: 2022, + img: "jaron_02_ihtsc.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "jaron_lightyears", { + artist: "Jaron", + title: "LIGHTYEARS", + year: 2024, + img: "jaron_03_lightyears.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "kasbo_pwdk", { + artist: "Kasbo", + title: "Places We Don't Know", + year: 2018, + img: "kasbo_01_pwdk.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "kasbo_tmoap", { + artist: "Kasbo", + title: "The Making of a Paracosm", + year: 2020, + img: "kasbo_02_tmoap.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "kaskade_christmas", { + artist: "Kaskade", + title: "Kaskade Christmas Deluxe", + year: 2018, + img: "kaskade_christmas.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "kmoe_k1", { + artist: "kmoe", + title: "K1", + year: 2025, + img: "kmoe_01_k1.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "knapsack_futura", { + artist: "Knapsack", + title: "futura", + year: 2018, + img: "knapsack_02_futura.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + [ + "knapsack_stem", { + artist: "Knapsack", + title: "Stem", + year: 2025, + img: "knapsack_04_stem.webp", + description: [ + "test 1", + "test 2", + "test 3", + ], + } + ], + ]); \ No newline at end of file diff --git a/src/routes/about/music/+page.svelte b/src/routes/about/music/+page.svelte index 2c6110e..9d605b5 100644 --- a/src/routes/about/music/+page.svelte +++ b/src/routes/about/music/+page.svelte @@ -1,327 +1,7 @@ @@ -336,7 +16,7 @@
- {#each albums as album} + {#each albums.entries() as [key, album]} {@render albumButton({ album })} {/each}
@@ -364,7 +44,7 @@ } .album-button { - width: calc(100%/8); + width: calc(100%/12); line-height: 0; }