2025-08-18 12:18:49 +02:00
|
|
|
|
<script lang="ts">
|
|
|
|
|
|
import BannerTitleAlt from "$lib/banner-title-alt.svelte";
|
|
|
|
|
|
import Content from "$lib/content.svelte";
|
2025-08-18 14:03:28 +02:00
|
|
|
|
import { albums, type AlbumEntry } from "$lib/likedalbums";
|
2025-08-18 14:22:13 +02:00
|
|
|
|
|
|
|
|
|
|
let prnt = function(key: string) {
|
|
|
|
|
|
console.log(key)
|
|
|
|
|
|
}
|
2025-08-18 12:18:49 +02:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<svelte:head>
|
|
|
|
|
|
<title>My Liked Music | denizk0461</title>
|
|
|
|
|
|
</svelte:head>
|
|
|
|
|
|
|
|
|
|
|
|
<BannerTitleAlt
|
|
|
|
|
|
title="My Liked Music"
|
2025-08-18 19:56:14 +02:00
|
|
|
|
banner="/projects/banner.webp"
|
2025-08-18 12:18:49 +02:00
|
|
|
|
subtitle="A look into my music taste"
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<Content>
|
2025-08-18 15:00:55 +02:00
|
|
|
|
<div class="album-showcase">
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2025-08-18 12:18:49 +02:00
|
|
|
|
<div class="album-button-container">
|
2025-08-18 14:03:28 +02:00
|
|
|
|
{#each albums.entries() as [key, album]}
|
2025-08-18 14:22:13 +02:00
|
|
|
|
{@render albumButton({ key, album })}
|
2025-08-18 12:18:49 +02:00
|
|
|
|
{/each}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</Content>
|
|
|
|
|
|
|
2025-08-18 15:00:55 +02:00
|
|
|
|
{#snippet albumShowcase({
|
|
|
|
|
|
album,
|
|
|
|
|
|
}: {
|
|
|
|
|
|
album: AlbumEntry;
|
|
|
|
|
|
})}
|
|
|
|
|
|
<img class="album-showcase-img" alt="Album art for {album.artist} – {album.title}">
|
|
|
|
|
|
<h2 class="album-showcase-title">{album.artist} – {album.title}</h2>
|
|
|
|
|
|
{#each album.description as paragraph}
|
|
|
|
|
|
<p class="album-showcase-paragraph">{paragraph}</p>
|
|
|
|
|
|
{/each}
|
|
|
|
|
|
{/snippet}
|
|
|
|
|
|
|
2025-08-18 12:18:49 +02:00
|
|
|
|
{#snippet albumButton({
|
2025-08-18 14:22:13 +02:00
|
|
|
|
key,
|
|
|
|
|
|
album,
|
2025-08-18 12:18:49 +02:00
|
|
|
|
}: {
|
2025-08-18 14:22:13 +02:00
|
|
|
|
key: string;
|
2025-08-18 12:18:49 +02:00
|
|
|
|
album: AlbumEntry;
|
|
|
|
|
|
})}
|
|
|
|
|
|
<div class="album-button">
|
|
|
|
|
|
<input
|
|
|
|
|
|
class="album-button-img"
|
|
|
|
|
|
type="image"
|
|
|
|
|
|
src="{album.img}"
|
2025-08-18 14:22:13 +02:00
|
|
|
|
alt="Album art for {album.artist} – {album.title}"
|
|
|
|
|
|
on:click={() => prnt(key)}
|
|
|
|
|
|
/>
|
2025-08-18 12:18:49 +02:00
|
|
|
|
</div>
|
|
|
|
|
|
{/snippet}
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
2025-08-18 15:00:55 +02:00
|
|
|
|
/* album showcase */
|
|
|
|
|
|
.album-showcase {
|
|
|
|
|
|
/* display: none; */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.album-showcase-img {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.album-showcase-title {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.album-showcase-paragraph {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-18 12:18:49 +02:00
|
|
|
|
.album-button-container {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-18 15:00:55 +02:00
|
|
|
|
/* album buttons */
|
2025-08-18 12:18:49 +02:00
|
|
|
|
.album-button {
|
2025-08-18 14:03:28 +02:00
|
|
|
|
width: calc(100%/12);
|
2025-08-18 12:18:49 +02:00
|
|
|
|
line-height: 0;
|
2025-08-18 14:22:13 +02:00
|
|
|
|
transition: 0.06s ease-in-out scale, 0.1s ease-in-out filter;
|
|
|
|
|
|
scale: 1.0;
|
|
|
|
|
|
z-index: 1;
|
|
|
|
|
|
filter: saturate(0.2) brightness(0.7);
|
|
|
|
|
|
}
|
|
|
|
|
|
.album-button:hover {
|
|
|
|
|
|
scale: 1.25;
|
|
|
|
|
|
z-index: 20;
|
|
|
|
|
|
filter: saturate(1.0) brightness(1.0);
|
2025-08-18 12:18:49 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.album-button-img {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
padding: 2px;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|