Added basic navigation components
This commit is contained in:
parent
6d6b2c57c5
commit
cf12fc51d7
@ -1,3 +1,6 @@
|
||||
pub mod admin;
|
||||
pub mod agenda;
|
||||
pub mod home;
|
||||
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"
|
||||
},
|
||||
Link {
|
||||
to: Route::Home {},
|
||||
to: Route::News {},
|
||||
class: "btn btn-ghost flex-col flex-nowrap py-1 gap-1 font-normal h-max",
|
||||
icons::Newspaper {},
|
||||
div { class: "font-normal", "Nieuws" }
|
||||
},
|
||||
Link {
|
||||
to: Route::Home {},
|
||||
to: Route::Agenda {},
|
||||
class: "btn btn-ghost flex-col flex-nowrap py-1 gap-1 font-normal h-max",
|
||||
icons::Calendar {},
|
||||
span { class: "font-normal", "Agenda" }
|
||||
|
@ -21,7 +21,7 @@ pub fn Topbar() -> Element {
|
||||
}
|
||||
Link {
|
||||
class: "btn btn-square btn-ghost",
|
||||
to: Route::Home {},
|
||||
to: Route::Settings {},
|
||||
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 components::admin::members::migration::Migration;
|
||||
use components::agenda::Agenda;
|
||||
use components::home::Home;
|
||||
use components::news::News;
|
||||
use components::settings::Settings;
|
||||
|
||||
#[derive(Clone, Routable, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
|
||||
pub enum Route {
|
||||
#[layout(Wrapper)]
|
||||
#[route("/")]
|
||||
Home {},
|
||||
#[route("/agenda")]
|
||||
Agenda {},
|
||||
#[route("/news")]
|
||||
News {},
|
||||
#[route("/settings")]
|
||||
Settings {},
|
||||
#[route("/admin/members/migration")]
|
||||
Migration {},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user