Commit 25e8cb6 1 parent 0422cec commit 25e8cb6 Copy full SHA for 25e8cb6
File tree 4 files changed +35
-41
lines changed
4 files changed +35
-41
lines changed Original file line number Diff line number Diff line change 1
1
export default function SearchBar ( { source } : { source ?: string } ) {
2
2
return (
3
- < >
4
- < form
5
- id = "search-form"
6
- hx-post = "/search"
7
- hx-target = "#search-results"
8
- hx-swap = "innerHTML"
9
- hx-indicator = "#loading-indicator"
10
- hx-request = '\"timeout\":6000'
11
- class = "flex w-full max-w-3xl items-center justify-center"
3
+ < form
4
+ id = "search-form"
5
+ hx-post = "/search"
6
+ hx-target = "#search-results"
7
+ hx-swap = "innerHTML"
8
+ hx-indicator = "#loading-indicator"
9
+ hx-request = '\"timeout\":6000'
10
+ class = "flex w-full max-w-3xl items-center justify-center px-2"
11
+ >
12
+ < label for = "song-link" class = "sr-only" >
13
+ Search
14
+ </ label >
15
+ < input
16
+ type = "text"
17
+ id = "song-link"
18
+ name = "link"
19
+ class = "flex-1 rounded-lg border bg-white p-2.5 text-sm font-normal text-black placeholder:text-gray-400 lg:text-base"
20
+ placeholder = "https://open.spotify.com/track/7A8MwSsu9efJXP6xvZfRN3?si=d4f1e2eb324c43df"
21
+ value = { source }
22
+ />
23
+ < button
24
+ type = "submit"
25
+ class = "ml-2 rounded-lg border border-green-500 bg-green-500 p-2.5 text-sm font-medium text-white focus:outline-none focus:ring-1 focus:ring-white"
12
26
>
13
- < label for = "song-link" class = "sr-only" >
14
- Search
15
- </ label >
16
- < input
17
- type = "text"
18
- id = "song-link"
19
- name = "link"
20
- class = "flex-1 rounded-lg border bg-white p-2.5 text-sm font-normal text-black placeholder:text-gray-400 lg:text-base"
21
- placeholder = "https://open.spotify.com/track/7A8MwSsu9efJXP6xvZfRN3?si=d4f1e2eb324c43df"
22
- value = { source }
23
- />
24
- < button
25
- type = "submit"
26
- class = "ml-2 rounded-lg border border-green-500 bg-green-500 p-2.5 text-sm font-medium text-white focus:outline-none focus:ring-1 focus:ring-white"
27
- >
28
- < i class = "fas fa-search p-1 text-black" />
29
- < span class = "sr-only" > Search</ span >
30
- </ button >
31
- </ form >
32
- </ >
27
+ < i class = "fas fa-search p-1 text-black" />
28
+ < span class = "sr-only" > Search</ span >
29
+ </ button >
30
+ </ form >
33
31
) ;
34
32
}
Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ export default function SearchCard(props: { searchResult: SearchResult }) {
9
9
data-id = { props . searchResult . id }
10
10
class = "m-4 flex max-w-2xl flex-wrap items-start justify-center rounded-lg border border-white md:p-4"
11
11
>
12
- < div class = "w-full m-4" >
12
+ < div class = "w-full m-4 md:w-44 " >
13
13
< img
14
- class = "mx-auto w-28 lg :w-48 "
14
+ class = "mx-auto w-28 md :w-44 "
15
15
src = { props . searchResult . image }
16
16
alt = { props . searchResult . title }
17
17
/>
Original file line number Diff line number Diff line change @@ -16,10 +16,6 @@ html {
16
16
animation : loading 2s linear infinite;
17
17
}
18
18
19
- .min-screen-4 {
20
- min-height : calc (100vh - 4rem );
21
- }
22
-
23
19
@keyframes loading {
24
20
0% {
25
21
left : -100% ;
Original file line number Diff line number Diff line change @@ -10,17 +10,17 @@ export default function Home({
10
10
children ?: JSX . Element ;
11
11
} ) {
12
12
return (
13
- < div class = "flex flex-col" >
13
+ < div class = "flex flex-col gap-2 h-screen p-2 " >
14
14
< LoadingIndicator />
15
- < main class = "flex flex-1 flex-col items-center justify-start p-2 min-screen-4 " >
16
- < div class = "my-7 text-center sm:my-16 " >
15
+ < main class = "flex flex-1 flex-col items-center justify-start" >
16
+ < div class = "flex flex-col gap-4 my-8 text-center sm:my-12 " >
17
17
< h1 class = "text-4xl uppercase md:text-5xl lg:text-6xl" > I don't have Spotify</ h1 >
18
- < h2 class = "mt-6 text-sm lg:text-lg" >
18
+ < h2 class = "text-sm lg:text-lg" >
19
19
Paste a Spotify link and listen on other platforms.
20
20
</ h2 >
21
21
</ div >
22
- < SearchBar source = { source } / >
23
- < div class = "my-4" >
22
+ < div class = "my-4 flex flex-col gap-4" >
23
+ < SearchBar source = { source } / >
24
24
< div id = "search-results" > { children } </ div >
25
25
</ div >
26
26
</ main >
You can’t perform that action at this time.
0 commit comments