feat: implement basic selectable nav list

This commit is contained in:
alphafetus committed 2026-01-26 16:42:32 -05:00
1 parent 2069beba8a
commit aa912673c0
10 files changed
+285 -19

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
use leptos::prelude::*;
#[component]
pub fn AdminHomePage() -> impl IntoView {
view! {
<div class="flex flex-1 flex-col gap-4 items-center m-4">
<div class="font-bold text-3xl">"Admin Home Page"</div>
<div class="text-lg">"This is just a placeholder for now."</div>
</div>
}
}
+7 -1
View File
@@ -1,2 +1,8 @@
mod shell;
pub use shell::*;
pub use shell::*;
mod home_page;
pub use home_page::*;
mod provider_page;
pub use provider_page::*;
mod scholarship_page;
pub use scholarship_page::*;
+30
View File
@@ -0,0 +1,30 @@
use leptos::prelude::*;
use crate::components::{NavListInfo, SelectableNavList};
#[component]
pub fn AdminProviderPage() -> impl IntoView {
let selected_items = RwSignal::new(Vec::new());
let provider_list = RwSignal::new(vec![
NavListInfo {
text: "Testing 1".to_string(),
id: "1".to_string(),
slug: "1".to_string(),
},
NavListInfo {
text: "Testing 2".to_string(),
id: "2".to_string(),
slug: "2".to_string(),
}
]);
view! {
<div class="flex flex-1 flex-col gap-4 items-stretch mt-4">
<div class="font-bold text-3xl self-center">"Provider View"</div>
<SelectableNavList
selected=selected_items
name="providers-nav-list"
items=provider_list
/>
</div>
}
}
+15
View File
@@ -0,0 +1,15 @@
use leptos::prelude::*;
#[component]
pub fn AdminScholarshipPage() -> impl IntoView {
view! {
<div class="flex flex-1 flex-col gap-4">
<div class="font-bold text-3xl">
"Scholarships View"
</div>
<div>
"This is a placeholder for now. It will show a list of all scholarships."
</div>
</div>
}
}
+3 -8
View File
@@ -15,14 +15,9 @@ pub fn AdminShell() -> impl IntoView {
<Banner title="R15 Scholarships Admin" logo="/PHS_Stacked_Acronym.png" />
// We'll put the tabs here.
<TabSidebarList tabs=vec![
TabInfo {
name: "Home".to_string(),
path: "/admin/home".to_string(),
},
TabInfo {
name: "Test".to_string(),
path: "/admin/testing".to_string(),
},
TabInfo::new("Home", "/admin/home"),
TabInfo::new("Providers", "/admin/providers"),
TabInfo::new("Scholarships", "/admin/scholarships"),
] />
</AdminLoginContext>
}