|
1 | 1 | <script> |
2 | | - import { crossfade } from 'svelte/transition'; |
3 | | - import { Music } from 'lucide-svelte'; |
4 | | - import { File } from 'lucide-svelte'; |
5 | | - import { FileVideo } from 'lucide-svelte'; |
6 | | - import { House } from 'lucide-svelte'; |
7 | | - import { Settings2 } from 'lucide-svelte'; |
| 2 | + import { crossfade } from 'svelte/transition' |
| 3 | + import { Music } from 'lucide-svelte' |
| 4 | + import { File } from 'lucide-svelte' |
| 5 | + import { FileVideo } from 'lucide-svelte' |
| 6 | + import { House } from 'lucide-svelte' |
| 7 | + import { Settings2 } from 'lucide-svelte' |
8 | 8 |
|
9 | | - export let isExpanded = true; |
| 9 | + export let isExpanded = true |
10 | 10 |
|
11 | 11 | const [send, receive] = crossfade({ |
12 | 12 | duration: 160 |
13 | | - }); |
| 13 | + }) |
14 | 14 | </script> |
15 | 15 |
|
16 | 16 | {#if isExpanded} |
17 | 17 | <aside |
18 | 18 | in:receive={{ key: 'sidebar' }} |
19 | 19 | out:send={{ key: 'sidebar' }} |
20 | | - class="border-base-300 bg-base-100 fixed left-0 top-0 z-40 h-screen w-64 border-r pt-20 transition-transform sm:translate-x-0" |
| 20 | + class="fixed left-0 top-0 z-40 h-screen w-64 border-r border-base-300 bg-base-100 pt-20 transition-transform sm:translate-x-0" |
21 | 21 | aria-label="Sidebar" |
22 | 22 | > |
23 | | - <div class="bg-base-100 flex h-full flex-col justify-between overflow-y-auto px-3 pb-4"> |
| 23 | + <div class="flex h-full flex-col justify-between overflow-y-auto bg-base-100 px-3 pb-4"> |
24 | 24 | <div class="flex flex-col space-y-2 font-medium"> |
25 | | - <a href="/app" class="text-base-content hover:bg-base-100 flex items-center rounded-lg p-2"> |
| 25 | + <a href="/app" class="flex items-center rounded-lg p-2 text-base-content hover:bg-base-100"> |
26 | 26 | <House /> |
27 | 27 | <span class="ms-3">Overview</span> |
28 | 28 | </a> |
29 | | - <div class="collapse-arrow collapse"> |
| 29 | + <div class="collapse collapse-arrow"> |
30 | 30 | <input type="checkbox" /> |
31 | 31 | <div |
32 | | - class="collapse-title hover:bg-base-100 flex min-h-0 items-center rounded-lg px-2 py-1.5" |
| 32 | + class="collapse-title flex min-h-0 items-center rounded-lg px-2 py-1.5 hover:bg-base-100" |
33 | 33 | > |
34 | 34 | <Music /> |
35 | 35 | <span class="ms-3">Music</span> |
|
39 | 39 | <li> |
40 | 40 | <a |
41 | 41 | href="/app/music" |
42 | | - class="hover:bg-base-100 flex items-center rounded-lg px-2 py-1.5" |
| 42 | + class="flex items-center rounded-lg px-2 py-1.5 hover:bg-base-100" |
43 | 43 | > |
44 | 44 | <span class="ms-3">音樂</span> |
45 | 45 | </a> |
46 | 46 | </li> |
47 | 47 | <li> |
48 | 48 | <a |
49 | 49 | href="/app/albums" |
50 | | - class="hover:bg-base-100 flex items-center rounded-lg px-2 py-1.5" |
| 50 | + class="flex items-center rounded-lg px-2 py-1.5 hover:bg-base-100" |
51 | 51 | > |
52 | 52 | <span class="ms-3">專輯</span> |
53 | 53 | </a> |
|
57 | 57 | </div> |
58 | 58 | <a |
59 | 59 | href="/app/video" |
60 | | - class="text-base-content hover:bg-base-100 flex items-center rounded-lg p-2" |
| 60 | + class="flex items-center rounded-lg p-2 text-base-content hover:bg-base-100" |
61 | 61 | > |
62 | 62 | <FileVideo /> |
63 | 63 | <span class="ms-3">Video</span> |
64 | 64 | </a> |
65 | 65 | <a |
66 | 66 | href="/app/file" |
67 | | - class="text-base-content hover:bg-base-100 flex items-center rounded-lg p-2" |
| 67 | + class="flex items-center rounded-lg p-2 text-base-content hover:bg-base-100" |
68 | 68 | > |
69 | 69 | <File /> |
70 | 70 | <span class="ms-3">File</span> |
|
73 | 73 | <div class="mt-auto pt-4"> |
74 | 74 | <a |
75 | 75 | href="/app/setting" |
76 | | - class="text-base-content hover:bg-base-100 flex items-center rounded-lg p-2" |
| 76 | + class="flex items-center rounded-lg p-2 text-base-content hover:bg-base-100" |
77 | 77 | > |
78 | 78 | <Settings2 /> |
79 | 79 | <span class="ms-3">設定</span> |
|
85 | 85 | <aside |
86 | 86 | in:receive={{ key: 'sidebar' }} |
87 | 87 | out:send={{ key: 'sidebar' }} |
88 | | - class="border-base-300 bg-base-100 fixed left-0 top-0 z-40 h-screen w-16 border-r pt-20 transition-transform sm:translate-x-0" |
| 88 | + class="fixed left-0 top-0 z-40 h-screen w-16 border-r border-base-300 bg-base-100 pt-20 transition-transform sm:translate-x-0" |
89 | 89 | aria-label="Sidebar" |
90 | 90 | > |
91 | | - <div class="bg-base-100 flex h-full flex-col items-center overflow-hidden px-3 pb-4"> |
| 91 | + <div class="flex h-full flex-col items-center overflow-hidden bg-base-100 px-3 pb-4"> |
92 | 92 | <div class="space-y-2 font-medium"> |
93 | | - <a href="/app" class="text-base-content hover:bg-base-100 flex items-center rounded-lg p-2"> |
| 93 | + <a href="/app" class="flex items-center rounded-lg p-2 text-base-content hover:bg-base-100"> |
94 | 94 | <House /> |
95 | 95 | </a> |
96 | 96 | <a |
97 | 97 | href="/app/albums" |
98 | | - class="text-base-content hover:bg-base-100 flex items-center rounded-lg p-2" |
| 98 | + class="flex items-center rounded-lg p-2 text-base-content hover:bg-base-100" |
99 | 99 | > |
100 | 100 | <Music /> |
101 | 101 | </a> |
102 | 102 | <a |
103 | 103 | href="/app/video" |
104 | | - class="text-base-content hover:bg-base-100 flex items-center rounded-lg p-2" |
| 104 | + class="flex items-center rounded-lg p-2 text-base-content hover:bg-base-100" |
105 | 105 | > |
106 | 106 | <FileVideo /> |
107 | 107 | </a> |
108 | 108 | <a |
109 | 109 | href="/app/file" |
110 | | - class="text-base-content hover:bg-base-100 flex items-center rounded-lg p-2" |
| 110 | + class="flex items-center rounded-lg p-2 text-base-content hover:bg-base-100" |
111 | 111 | > |
112 | 112 | <File /> |
113 | 113 | </a> |
114 | 114 | </div> |
115 | 115 | <div class="mt-auto pt-4"> |
116 | 116 | <a |
117 | 117 | href="/app/setting" |
118 | | - class="text-base-content hover:bg-base-100 flex items-center rounded-lg p-2" |
| 118 | + class="flex items-center rounded-lg p-2 text-base-content hover:bg-base-100" |
119 | 119 | > |
120 | 120 | <Settings2 /> |
121 | 121 | </a> |
|
0 commit comments