Added basic navigation components
This commit is contained in:
parent
6d6b2c57c5
commit
cf12fc51d7
@ -1,3 +1,6 @@
|
|||||||
pub mod admin;
|
pub mod admin;
|
||||||
|
pub mod agenda;
|
||||||
pub mod home;
|
pub mod home;
|
||||||
pub mod layout;
|
pub mod layout;
|
||||||
|
pub mod news;
|
||||||
|
pub mod settings;
|
||||||
|
10
src/components/agenda.rs
Normal file
10
src/components/agenda.rs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
use dioxus::prelude::*;
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
pub fn Agenda() -> Element {
|
||||||
|
rsx! {
|
||||||
|
div {
|
||||||
|
h1 { class: "text-xl font-bold text-primary", "Agenda" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -17,13 +17,13 @@ pub fn Navbar() -> Element {
|
|||||||
"Home"
|
"Home"
|
||||||
},
|
},
|
||||||
Link {
|
Link {
|
||||||
to: Route::Home {},
|
to: Route::News {},
|
||||||
class: "btn btn-ghost flex-col flex-nowrap py-1 gap-1 font-normal h-max",
|
class: "btn btn-ghost flex-col flex-nowrap py-1 gap-1 font-normal h-max",
|
||||||
icons::Newspaper {},
|
icons::Newspaper {},
|
||||||
div { class: "font-normal", "Nieuws" }
|
div { class: "font-normal", "Nieuws" }
|
||||||
},
|
},
|
||||||
Link {
|
Link {
|
||||||
to: Route::Home {},
|
to: Route::Agenda {},
|
||||||
class: "btn btn-ghost flex-col flex-nowrap py-1 gap-1 font-normal h-max",
|
class: "btn btn-ghost flex-col flex-nowrap py-1 gap-1 font-normal h-max",
|
||||||
icons::Calendar {},
|
icons::Calendar {},
|
||||||
span { class: "font-normal", "Agenda" }
|
span { class: "font-normal", "Agenda" }
|
||||||
|
@ -21,7 +21,7 @@ pub fn Topbar() -> Element {
|
|||||||
}
|
}
|
||||||
Link {
|
Link {
|
||||||
class: "btn btn-square btn-ghost",
|
class: "btn btn-square btn-ghost",
|
||||||
to: Route::Home {},
|
to: Route::Settings {},
|
||||||
icons::Cog {}
|
icons::Cog {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
10
src/components/news.rs
Normal file
10
src/components/news.rs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
use dioxus::prelude::*;
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
pub fn News() -> Element {
|
||||||
|
rsx! {
|
||||||
|
div {
|
||||||
|
h1 { class: "text-xl font-bold text-primary", "Nieuws" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
src/components/settings.rs
Normal file
10
src/components/settings.rs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
use dioxus::prelude::*;
|
||||||
|
|
||||||
|
#[component]
|
||||||
|
pub fn Settings() -> Element {
|
||||||
|
rsx! {
|
||||||
|
div {
|
||||||
|
h1 { class: "text-xl font-bold text-primary", "Settings" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -8,13 +8,22 @@ use tracing::{info, Level};
|
|||||||
|
|
||||||
// Use routes
|
// Use routes
|
||||||
use components::admin::members::migration::Migration;
|
use components::admin::members::migration::Migration;
|
||||||
|
use components::agenda::Agenda;
|
||||||
use components::home::Home;
|
use components::home::Home;
|
||||||
|
use components::news::News;
|
||||||
|
use components::settings::Settings;
|
||||||
|
|
||||||
#[derive(Clone, Routable, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
|
#[derive(Clone, Routable, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||||
pub enum Route {
|
pub enum Route {
|
||||||
#[layout(Wrapper)]
|
#[layout(Wrapper)]
|
||||||
#[route("/")]
|
#[route("/")]
|
||||||
Home {},
|
Home {},
|
||||||
|
#[route("/agenda")]
|
||||||
|
Agenda {},
|
||||||
|
#[route("/news")]
|
||||||
|
News {},
|
||||||
|
#[route("/settings")]
|
||||||
|
Settings {},
|
||||||
#[route("/admin/members/migration")]
|
#[route("/admin/members/migration")]
|
||||||
Migration {},
|
Migration {},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user