hyaenidae/server/templates/profiles/list.rs.html
asonix 4ff824b92d Delete 'Back' in favor of mobile nav query
Add submissions to home page
Add drafts page
Validate handle, display name, description, submission: title, description
Add block checks to submission iterator
Add user info to submission page
Abstract dark preference to a single source, not yet configurable
2021-01-10 22:09:47 -06:00

29 lines
1.1 KiB
HTML

@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("card-top", profile)
@:card_body({
<form method="POST" action="/profiles/change">
<input type="hidden" name="profile_id" value="@profile.id()" />
@:button_group(&[
&Button::primary(&format!("Select {}", profile.name())).dark(nav_state.dark()),
])
</form>
})
})
}
@: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()),
])
})
})
})