@use crate::{templates::{layouts::home, profiles::{submission_tile, view}}, nav::NavState, profiles::ProfileView}; @use hyaenidae_toolkit::{templates::button_group, Button}; @use hyaenidae_toolkit::{templates::{card, card_body, card_section, card_title}, Card}; @(pview: &ProfileView, nav_state: &NavState) @:home(&pview.profile.name(), pview.profile.description().unwrap_or(&format!("{}'s profile on Hyaenidae", pview.profile.name())), nav_state, {}, { @:view("standalone account-page", &pview.profile) @if pview.is_self { @:card(Card::full_width().dark(nav_state.dark()), { @:card_title({ Profile Actions }) @:card_body({ @:button_group(&[ &Button::secondary("View Profile").href(&pview.profile.view_path()).dark(nav_state.dark()), &Button::secondary("Edit Profile").href("/profiles/current").dark(nav_state.dark()), &Button::secondary("Switch Profile").href("/profiles/change").dark(nav_state.dark()), ]) }) }) } @:card(Card::full_width().dark(nav_state.dark()), { @:card_title({ Drafts }) @:card_section({
@for submission in &pview.submissions { @:submission_tile(submission, pview.viewer, nav_state.dark()) }
}) @if pview.nav().len() > 0 { @:card_body({ @:button_group(&pview.nav()) }) } }) })