feat: begin implementation of "sub tabs"

This commit is contained in:
alphafetus committed 2026-01-29 12:15:09 -05:00
1 parent 7ca78b607b
commit 3f1745a589
8 files changed
+135 -42

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
use leptos::prelude::*;
#[component]
pub fn AdditionalPage() -> impl IntoView {
view! {
<div class="flex flex-1 flex-col gap-4 items-center m-4">
<div class="font-bold text-3xl">"Student Additional Forms"</div>
<div class="text-lg">
"This is just a placeholder for now. We'll show redirect buttons to each form."
</div>
</div>
}
}
+3 -1
View File
@@ -5,7 +5,9 @@ pub fn StudentHomePage() -> impl IntoView {
view! {
<div class="flex flex-1 flex-col gap-4 items-center m-4">
<div class="font-bold text-3xl">"Student Home Page"</div>
<div class="text-lg">"This is just a placeholder for now. We'll show some redirect buttons."</div>
<div class="text-lg">
"This is just a placeholder for now. We'll show some redirect buttons."
</div>
</div>
}
}
+3 -1
View File
@@ -1,7 +1,9 @@
mod shell;
mod home_page;
mod demographics_page;
mod additional_page;
pub use shell::*;
pub use home_page::*;
pub use demographics_page::*;
pub use demographics_page::*;
pub use additional_page::*;
+12 -4
View File
@@ -1,6 +1,6 @@
use leptos::prelude::*;
use leptos_oidc::{AuthLoaded, Authenticated};
use crate::common::TabInfo;
use crate::common::{SubTabInfo, TabInfo};
use crate::components::{Banner, Loading, TabSidebarList};
use crate::components::login::StudentLoginContext;
use crate::pages::UnauthenticatedPage;
@@ -14,9 +14,17 @@ pub fn StudentShell() -> impl IntoView {
<AuthLoaded fallback=Loading>
<Authenticated unauthenticated=UnauthenticatedPage>
<TabSidebarList tabs=vec![
TabInfo::new("Home", "/students/home"),
TabInfo::new("Demographics", "/students/demographics"),
TabInfo::new("Additional Info", "/students/additional"),
TabInfo::new("Home", "/students/home", None),
TabInfo::new("Demographics", "/students/demographics",
Some(vec![
SubTabInfo::new("Testing", "/students/testing"),
SubTabInfo::new("Testing Again!", "/students/testing/again")
])),
TabInfo::new("Additional Info", "/students/additional",
Some(vec![
SubTabInfo::new("Testing", "/students/testing"),
SubTabInfo::new("Testing Again!", "/students/testing/again")
])),
] />
</Authenticated>
</AuthLoaded>