File tree Expand file tree Collapse file tree 3 files changed +36
-9
lines changed Expand file tree Collapse file tree 3 files changed +36
-9
lines changed Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
import * as Carousel from " @/components/ui/carousel/index.ts" ;
3
+ import { type CarouselAPI } from " @/components/ui/carousel/context.js" ;
4
+ import { Button } from " @/components/ui/button" ;
3
5
import HomepageCarouselItem from " @/components/HomepageCarouselItem.svelte" ;
6
+ interface Props {
7
+ slides: {
8
+ title: string ;
9
+ image: {
10
+ path: string ;
11
+ alt? : string ;
12
+ };
13
+ text: string ;
14
+ actionLabel: string ;
15
+ actionTo: string ;
16
+ }[];
17
+ }
18
+ let {slides}: Props = $props ();
4
19
</script >
5
20
6
- <Carousel .Root class =" w-full h-fit" >
21
+ <Carousel .Root opts ={{
22
+ loop : true ,
23
+ }} class =" w-full h-fit" >
7
24
<Carousel .Content class =" bg-red-400" >
8
- < HomepageCarouselItem src = " /images/IMG_7311.JPG " />
9
- < Carousel . Item >B</ Carousel . Item >
10
- < Carousel . Item >C</ Carousel . Item >
25
+ { #each slides as slide }
26
+ < HomepageCarouselItem src ={ slide . image . path } alt ={ slide . image . alt } / >
27
+ { /each }
11
28
</Carousel .Content >
12
29
<div
13
30
class =" w-4/5 sm:w-72 bg-background absolute bottom-12 left-8 px-4 py-2"
Original file line number Diff line number Diff line change 43
43
--border : 214.3 31.8% 91.4% ;
44
44
--input : 214.3 31.8% 91.4% ;
45
45
46
- --primary : 222.2 47.4 % 11.2 % ;
47
- --primary-foreground : 210 40% 98% ;
46
+ --primary : 4 100 % 57 % ; /* #FF3123 robocon red */
47
+ --primary-foreground : 210 40% 98% ; /* idk, to change */
48
48
49
49
--secondary : 210 40% 96.1% ;
50
50
--secondary-foreground : 222.2 47.4% 11.2% ;
57
57
58
58
--ring : 222.2 84% 4.9% ;
59
59
60
- --radius : 0.5 rem ;
60
+ --radius : 0.4 rem ;
61
61
}
62
62
63
63
.dark {
99
99
body {
100
100
@apply bg-background text-foreground;
101
101
}
102
- }
102
+ }
Original file line number Diff line number Diff line change @@ -10,6 +10,16 @@ import HomepageCarousel from '@/components/HomepageCarousel.svelte';
10
10
<Navbar />
11
11
</header >
12
12
<main class =" h-screen" >
13
- <HomepageCarousel client:load />
13
+ <HomepageCarousel client:load slides ={ [
14
+ {
15
+ title:" Lorem Ipsum" ,
16
+ image:{
17
+ path:" /images/IMG_7815.JPG" ,
18
+ },
19
+ text:" Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec quis erat in ante dignissim euismod id quis diam." ,
20
+ actionLabel:" Click" ,
21
+ actionTo:" /"
22
+ }
23
+ ]} />
14
24
</main >
15
25
</Layout >
You can’t perform that action at this time.
0 commit comments