dioxus-letter-werefox-cafe/src/lib.rs

68 lines
2.2 KiB
Rust

pub mod web_app {
// import the prelude to get access to the `rsx!` macro and the `Scope` and `Element` types
use dioxus::prelude::*;
pub fn app(cx: Scope) -> Element {
cx.render(rsx! (
div {
make_poem {},
}
))
}
fn make_poem(cx: Scope) -> Element {
cx.render(rsx!(
div {
class: "font-nerd dark:bg-alice-werefox-grey text-alice-werefox-grey-light flex flex-col space-y-4 mx-4 py-4",
div {
p {
"You are important. I wrote a small poem I hope will help you today."
},
p {
"It's not very long, but I'm doing my best, and so are you."
}
},
div {
p {
"You are the moon, you are the stars"
},
p {
"Im glad you're here, whomever you are."
},
p{
"We've been through much; in this life it's true,"
},
p {
"But in the end, you will come through."
}
},
div {
p {
"Much like life, this poem is short"
},
p {
"It doesn't always rhyme, or have a nice beat;"
},
p {
"It might seem wrong, or incomplete;"
},
p {
"It might go on, or so it seems;"
},
p {
"It might feel like you're in a dream."
}
}
div {
p {
"That's not the point, I know in my heart"
},
p {
"I'm glad you're here, whomever you are."
},
}
}
))
}
}