website.rs 686 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //! DioxusLabs Webiste
  2. //! ------------------
  3. //!
  4. //! This is the example powering the DioxusLabs website :)
  5. //! It's always good to dogfood your code, right?
  6. use dioxus::prelude::*;
  7. fn main() {}
  8. mod state {
  9. pub struct AppState {
  10. cur_page: Route,
  11. }
  12. pub enum Route {
  13. Homepage,
  14. Docs,
  15. }
  16. }
  17. static APP: FC<()> = |ctx, props| {
  18. ctx.render(html! {
  19. <div>
  20. <div>
  21. })
  22. };
  23. /// Draw the navbar on top of the screen
  24. static Navbar: FC<state::Route> = |ctx, props| {
  25. ctx.render(html! {
  26. <div>
  27. <div>
  28. })
  29. };
  30. static Homepage: FC<()> = |ctx, props| {
  31. ctx.render(html! {
  32. <div>
  33. <div>
  34. })
  35. };