File tree Expand file tree Collapse file tree 4 files changed +44
-7
lines changed
routes/music/playlist/[playlistID] Expand file tree Collapse file tree 4 files changed +44
-7
lines changed Original file line number Diff line number Diff line change
1
+ <svg viewBox =" 0 0 24 24" xmlns =" http://www.w3.org/2000/svg"
2
+ ><path
3
+ d =" M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"
4
+ fill =" currentColor"
5
+ /></svg
6
+ >
Original file line number Diff line number Diff line change @@ -21,4 +21,5 @@ export interface AppleMusicPlaylist {
21
21
tracks : AppleMusicSong [ ] ;
22
22
last_modified : Date ;
23
23
url : string ;
24
+ spotify_url : string ;
24
25
}
Original file line number Diff line number Diff line change 6
6
of,
7
7
more,
8
8
icon : Icon,
9
- iconPaddingBottom = ' 3px'
9
+ iconPaddingBottom = ' 3px' ,
10
+ iconColor = ' inherit'
10
11
}: {
11
12
on? : string ;
12
13
more? : boolean ;
13
14
of? : string ;
14
15
icon? : Component ;
15
16
iconPaddingBottom? : string ;
17
+ iconColor? : string ;
16
18
} = $props ();
17
19
</script >
18
20
28
30
{/if }
29
31
30
32
{#if Icon }
31
- <div class ="icon" style:--icon-padding-bottom ={iconPaddingBottom }>
33
+ <div
34
+ class =" icon"
35
+ style:--icon-padding-bottom ={iconPaddingBottom }
36
+ style:--icon-color ={iconColor }
37
+ >
32
38
<Icon />
33
39
</div >
34
40
{/if }
50
56
margin-left : 7px ;
51
57
margin-right : 6px ;
52
58
margin-bottom : var (--icon-padding-bottom );
59
+ color : var (--icon-color );
53
60
}
54
61
55
62
@media (max-width : 500px ) {
Original file line number Diff line number Diff line change 6
6
import ViewButton from ' $lib/view-button.svelte' ;
7
7
import { DynamicHead , Error } from ' @gleich/ui' ;
8
8
import type { PlaylistData } from ' ./+page.server' ;
9
+ import SpotifyIcon from ' $lib/icons/spotify-icon.svelte' ;
9
10
10
11
const { data }: { data: PlaylistData } = $props ();
11
12
</script >
36
37
</p >
37
38
</div >
38
39
</div >
39
- <a class ="view-on-apple-music" href ={data .playlist .url } target =" _blank" >
40
- <ViewButton on ="Apple Music" icon ={AppleMusicIcon } iconPaddingBottom =" 1.5px" />
41
- </a >
40
+ <div class =" view-on-buttons" >
41
+ <a class ="view-on-button" href ={data .playlist .spotify_url } target =" _blank" >
42
+ <ViewButton on ="Spotify" icon ={SpotifyIcon } iconPaddingBottom =" 1px" iconColor =" #24db68" />
43
+ </a >
44
+ <a class ="view-on-button" href ={data .playlist .url } target =" _blank" >
45
+ <ViewButton
46
+ on =" Apple Music"
47
+ icon ={AppleMusicIcon }
48
+ iconPaddingBottom =" 0.5px"
49
+ iconColor =" #fb455d"
50
+ />
51
+ </a >
52
+ </div >
42
53
</div >
43
54
<div class =" songs" >
44
55
{#each data .playlist .tracks as song (song )}
83
94
width : 192px ;
84
95
}
85
96
86
- .view-on-apple-music {
87
- margin-top : 20px ;
97
+ .view-on-buttons {
98
+ display : flex ;
99
+ gap : 10px ;
100
+ margin-top : 30px ;
101
+ margin-bottom : 10px ;
102
+ }
103
+
104
+ .view-on-button {
105
+ flex : 1 ;
88
106
text-decoration : inherit ;
89
107
}
90
108
102
120
.stats {
103
121
align-items : flex-start ;
104
122
}
123
+
124
+ .view-on-buttons {
125
+ flex-direction : column ;
126
+ gap : 10px ;
127
+ }
105
128
}
106
129
</style >
You can’t perform that action at this time.
0 commit comments