1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
use dioxus::prelude::*;
#[component]
pub fn VideoHero(
title: String,
subtitle: String,
video: String,
claim: String,
cta: String,
cta_link: String,
) -> Element {
rsx! {
section {
class: "md:flex flex-row gap-8 text-center md:text-left",
div {
class: "flex-1",
div {
h1 {
class: "text-primary text-2xl md:text-5xl font-bold",
"{title}"
}
p {
class: "py-6",
"{subtitle}"
}
div {
a {
class: "btn btn-primary",
href: cta_link,
"{cta}"
}
strong {
class: "hidden md:inline ml-4",
"{claim}"
}
}
}
}
div {
class: "flex-1 mt-8 md:mt-0",
iframe {
class: "w-full aspect-[16/9]",
src: "{video}",
title: "YouTube video player",
"frameborder": "0",
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
referrerpolicy: "strict-origin-when-cross-origin",
allowfullscreen: true,
}
}
}
}
}