hyaenidae/server/templates/profiles/public.rs.html
asonix f350d718ac Add Profile and Submission report logic
Implement Follow and Block logic
2021-01-14 20:42:30 -06:00

35 lines
1.4 KiB
HTML

@use crate::{templates::{layouts::home, profiles::{submission_tile, view}}, nav::NavState, profiles::ProfileView};
@use hyaenidae_toolkit::templates::button_group;
@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, {}, {
@:card(Card::full_width().dark(nav_state.dark()), { @:view(&pview.profile, nav_state.dark()) })
@if !pview.buttons().is_empty() {
@:card(Card::full_width().dark(nav_state.dark()), {
@:card_title({ Profile Actions })
@:card_body({
@:button_group(&pview.buttons())
})
})
}
@if !pview.submissions.is_empty() {
@:card(Card::full_width().dark(nav_state.dark()), {
@:card_title({ Submissions })
@:card_section({
<div class="submission-tiles">
@for submission in &pview.submissions {
@:submission_tile(submission, pview.viewer, nav_state.dark())
}
</div>
})
@if pview.nav().len() > 0 {
@:card_body({
@:button_group(&pview.nav())
})
}
})
}
})