feat: Convert Figma React UI to Svelte 5

- Add lucide-svelte for icons
- Create app.css with theme CSS variables (Dark, Light, OLED, Warm)
- Convert all React components to Svelte 5 using runes ($state, $derived, $effect, $props)
- Implement core components: Sidebar, NowPlayingBar, NavigationItem, UserCard,
  AlbumCard, HorizontalScrollRow, HeroSection, TrackRow, Toggle, Dropdown,
  Tooltip, VolumeSlider
- Implement view components: HomeView, SettingsView, AlbumDetailView
- Implement overlay components: QueuePanel, FullScreenNowPlaying, FocusMode, Toast
- Create main +page.svelte with routing, state management and keyboard shortcuts
- All components use Svelte 5 snippets for component children patterns
This commit is contained in:
vicrodh committed 2026-01-09 07:16:46 -06:00
1 parent ef92897d43
commit cdfd3263de
23 files changed
+4512 -141

No files matched your search

+127
View File
@@ -0,0 +1,127 @@
<script lang="ts">
import { Play, MoreHorizontal } from 'lucide-svelte';
interface Props {
artwork: string;
title: string;
artist: string;
year?: string;
}
let { artwork, title, artist, year }: Props = $props();
let playBtnHovered = $state(false);
</script>
<div class="hero" style="background-image: url({artwork})">
<!-- Gradient Overlay -->
<div class="gradient"></div>
<!-- Content -->
<div class="content">
<h1 class="title">{title}</h1>
<p class="artist">{artist}{year ? ` • ${year}` : ''}</p>
<div class="actions">
<button
class="play-btn"
style="background-color: {playBtnHovered ? 'var(--accent-hover)' : 'var(--accent-primary)'}"
onmouseenter={() => (playBtnHovered = true)}
onmouseleave={() => (playBtnHovered = false)}
>
<Play size={16} fill="white" color="white" />
<span>Play</span>
</button>
<button class="more-btn">
<MoreHorizontal size={16} color="white" />
<span>More</span>
</button>
</div>
</div>
</div>
<style>
.hero {
position: relative;
width: 100%;
height: 320px;
border-radius: 16px;
overflow: hidden;
margin-bottom: 32px;
background-size: cover;
background-position: center;
}
.gradient {
position: absolute;
inset: 0;
background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
}
.content {
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 32px;
}
.title {
font-size: 28px;
font-weight: 700;
color: white;
margin-bottom: 8px;
}
.artist {
font-size: 16px;
color: #aaaaaa;
margin-bottom: 16px;
}
.actions {
display: flex;
align-items: center;
gap: 12px;
}
.play-btn {
height: 36px;
padding: 0 24px;
border-radius: 20px;
border: none;
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
transition: background-color 150ms ease;
}
.play-btn span {
font-size: 14px;
font-weight: 500;
color: white;
}
.more-btn {
height: 36px;
padding: 0 24px;
border-radius: 20px;
border: 1px solid rgba(255, 255, 255, 0.3);
background: transparent;
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
transition: background-color 150ms ease;
}
.more-btn:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.more-btn span {
font-size: 14px;
font-weight: 500;
color: white;
}
</style>