- 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
56 lines
1.0 KiB
Svelte
56 lines
1.0 KiB
Svelte
<script lang="ts">
|
|
import { Info } from 'lucide-svelte';
|
|
|
|
interface Props {
|
|
text: string;
|
|
}
|
|
|
|
let { text }: Props = $props();
|
|
|
|
let isVisible = $state(false);
|
|
</script>
|
|
|
|
<div
|
|
class="tooltip-container"
|
|
onmouseenter={() => (isVisible = true)}
|
|
onmouseleave={() => (isVisible = false)}
|
|
>
|
|
<Info size={14} class="icon" />
|
|
{#if isVisible}
|
|
<div class="tooltip">
|
|
{text}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
|
|
<style>
|
|
.tooltip-container {
|
|
position: relative;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
cursor: help;
|
|
}
|
|
|
|
.tooltip-container :global(.icon) {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.tooltip {
|
|
position: absolute;
|
|
bottom: 100%;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
margin-bottom: 8px;
|
|
padding: 8px 12px;
|
|
background-color: var(--bg-tertiary);
|
|
border-radius: 6px;
|
|
font-size: 12px;
|
|
color: var(--text-secondary);
|
|
white-space: nowrap;
|
|
max-width: 200px;
|
|
white-space: normal;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
z-index: 100;
|
|
}
|
|
</style>
|