@use crate::{templates::{layouts::home, profiles::view}, nav::NavState, profiles::Profile}; @use hyaenidae_toolkit::{templates::{button_group, card, card_body, card_title}, Button, Card}; @(profiles: &[Profile], nav_state: &NavState) @:home("Switch Profile", "Select the profile you wish to use", nav_state, {}, { @for profile in profiles { @:card(&Card::full_width().dark(nav_state.dark()), { @:view(profile, nav_state.dark()) @:card_body({
@:button_group(&[ &Button::primary(&format!("Select {}", profile.name())).dark(nav_state.dark()), ])
}) }) } @:card(&Card::full_width().dark(nav_state.dark()), { @:card_title({ Create a New Profile }) @:card_body({ @:button_group(&[ Button::primary_outline("Create").href("/profiles/create/handle").dark(nav_state.dark()), ]) }) }) })