|
9 | 9 | from movie_streaming_site.pages.search import search_page
|
10 | 10 | from reflex_motion import motion
|
11 | 11 |
|
| 12 | + |
12 | 13 | class slider(rx.Component):
|
13 | 14 | library = "nuka-carousel"
|
14 | 15 | tag = "Carousel"
|
15 | 16 | autoplay:rx.Var[bool]
|
16 | 17 | showDots:rx.Var[bool]
|
| 18 | + wrapMode:rx.Var[str] |
17 | 19 | autoplayInterval:rx.Var[int]
|
18 |
| - |
19 |
| - |
20 |
| -Slider = slider.create |
| 20 | + scrollDistance:rx.Var[str] |
21 | 21 |
|
22 | 22 |
|
23 | 23 | @rx.page(on_load=State.on_load)
|
24 | 24 | def index():
|
25 | 25 | return rx.box(
|
26 | 26 |
|
27 | 27 | rx.box(
|
28 |
| - rx.image(src="https://cloud-6t0bvxvfn-hack-club-bot.vercel.app/8torndado.jpg", width="100vw", height="108vh"), |
| 28 | + Slider( |
| 29 | + rx.image(src="https://media.themoviedb.org/t/p/w1920_and_h800_multi_faces/stKGOm8UyhuLPR9sZLjs5AkmncA.jpg", width="110vw", height="108vh"), |
| 30 | + rx.image(src="https://media.themoviedb.org/t/p/w1920_and_h800_multi_faces/qGQf2OHIkoh89K8XeKQzhxczf96.jpg", width="110vw", height="108vh"), |
| 31 | + rx.image(src="https://media.themoviedb.org/t/p/w1920_and_h800_multi_faces/eHz61dRrYZB16glXDttV0CnJf6j.jpg", width="110vw", height="108vh"), |
| 32 | + rx.image(src="https://media.themoviedb.org/t/p/w1920_and_h800_multi_faces/mabuNsGJgRuCTuGqjFkWe1xdu19.jpg", width="110vw", height="108vh"), |
| 33 | + autoplay=True, |
| 34 | + showDots=False, |
| 35 | + autoplayInterval=3000, |
| 36 | + scrollDistance="slide", |
| 37 | + wrapMode="wrap", |
| 38 | + ), |
| 39 | + |
29 | 40 |
|
30 | 41 | rx.box(
|
31 | 42 | width="100vw",
|
32 | 43 | height="108vh",
|
33 | 44 | position="absolute",
|
34 | 45 | left="0",
|
35 | 46 | top="0",
|
36 |
| - bg="linear-gradient(180deg, rgba(18, 18, 18, 0) 0%, rgba(18, 18, 18, 0.25) 37%, rgba(18, 18, 18, 0.77) 67%, rgba(18, 18, 18, 0.90) 77%, #121212 93%)", |
| 47 | + bg="linear-gradient(180deg,rgba(18, 18, 18, 0.25) 0%, rgba(18, 18, 18, 0.77) 50%, rgba(18, 18, 18, 0.90) 77%, #121212 93%)", |
37 | 48 | ),
|
38 | 49 | motion(
|
39 | 50 |
|
@@ -61,14 +72,14 @@ def index():
|
61 | 72 | ),
|
62 | 73 |
|
63 | 74 | rx.heading(
|
64 |
| - "TORNADO MOVIE OR SOMETHING", |
| 75 | + "Thousands of movies, right at your fingertips", |
65 | 76 | font_size="14vh",
|
66 | 77 | font_weight="900",
|
67 | 78 | color="white",
|
68 | 79 | position="absolute",
|
69 | 80 | left="7vw",
|
70 | 81 | top="20vh",
|
71 |
| - width="43vw", |
| 82 | + width="50vw", |
72 | 83 | height="30vh",
|
73 | 84 | line_height="14vh"
|
74 | 85 | ),
|
@@ -123,20 +134,27 @@ def index():
|
123 | 134 |
|
124 | 135 |
|
125 | 136 |
|
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | + |
| 141 | +Slider = slider.create |
126 | 142 | def testpage():
|
127 | 143 | return rx.box(
|
128 | 144 | Slider(
|
129 | 145 | rx.image(src="https://commerce.nearform.com/open-source/nuka-carousel/img/pexels-01.jpg"),
|
130 |
| - rx.image(src="https://commerce.nearform.com/open-source/nuka-carousel/img/pexels-01.jpg"), |
| 146 | + rx.image(src="https://commerce.nearform.com/open-source/nuka-carousel/img/pexels-02.jpg"), |
| 147 | + rx.image(src="https://commerce.nearform.com/open-source/nuka-carousel/img/pexels-03.jpg"), |
| 148 | + rx.image(src="https://commerce.nearform.com/open-source/nuka-carousel/img/pexels-04.jpg"), |
131 | 149 | autoplay=True,
|
132 | 150 | showDots=True,
|
133 |
| - autoplayInterval=3000 |
| 151 | + autoplayInterval=3000, |
| 152 | + wrapMode="wrap", |
134 | 153 | )
|
135 | 154 | )
|
136 | 155 |
|
137 | 156 |
|
138 | 157 |
|
139 |
| - |
140 | 158 | style = {
|
141 | 159 | "body":{
|
142 | 160 | "background-color":"#121212"
|
|
0 commit comments