landingpage.rs 1.4 KB

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