landingpage.rs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //! Basic example that renders a simple VNode to the browser.
  2. use std::rc::Rc;
  3. use dioxus_core::prelude::*;
  4. use dioxus_html_namespace as dioxus_elements;
  5. use dioxus_web::*;
  6. fn main() {
  7. // Setup logging
  8. // wasm_logger::init(wasm_logger::Config::new(log::Level::Debug));
  9. console_error_panic_hook::set_once();
  10. // Run the app
  11. wasm_bindgen_futures::spawn_local(WebsysRenderer::start(App));
  12. }
  13. static App: FC<()> = |cx| {
  14. let (contents, set_contents) = use_state_classic(cx, || "asd");
  15. cx.render(rsx! {
  16. div {
  17. class: "flex items-center justify-center flex-col"
  18. div {
  19. class: "flex items-center justify-center"
  20. div {
  21. class: "flex flex-col bg-white rounded p-4 w-full max-w-xs"
  22. div { class: "font-bold text-xl", "Example cloud app" }
  23. div { class: "text-sm text-gray-500", "This is running in the cloud!!" }
  24. div {
  25. class: "flex flex-row items-center justify-center mt-6"
  26. div { class: "font-medium text-6xl", "100%" }
  27. }
  28. div {
  29. class: "flex flex-row justify-between mt-6"
  30. a {
  31. href: "https://www.dioxuslabs.com"
  32. class: "underline"
  33. "Made with dioxus"
  34. }
  35. }
  36. }
  37. }
  38. }
  39. })
  40. };