@use crate::extensions::ProfileExt; @use crate::nav::NavState; @use crate::profile_list::ProfileListState; @use crate::templates::layouts::home; @use hyaenidae_toolkit::{templates::button_group, Button}; @use hyaenidae_toolkit::{templates::{card, card_body, card_section}, Card}; @use hyaenidae_toolkit::templates::{icon, image}; @use hyaenidae_toolkit::{templates::link, Link}; @use hyaenidae_toolkit::templates::search; @(state: &ProfileListState, nav_state: &NavState) @:home("Discover Users", "Find users on Hyaenidae", nav_state, {}, { @:card(&Card::full_width().dark(nav_state.dark()), { @for pview in state.profiles() { @:card_section({
@if let Some(img) = pview.banner_image() {
@:image(&img)
}
@:icon(&pview.icon().small(true).dark(nav_state.dark()))
@if let Some(display_name) = pview.profile.display_name() { @:link(&Link::current_tab(&pview.profile.view_path()).plain(true), { @Html(display_name) }) }
@:link(&Link::current_tab(&pview.profile.view_path()).plain(true), { @pview.profile.full_handle() })
@if !pview.profile.is_suspended() { @:button_group(&state.profile_buttons(pview)) }
}) } @if state.has_nav() { @:card_body({ @:button_group(&state.nav()) }) } }) })