42 lines
1.8 KiB
HTML
42 lines
1.8 KiB
HTML
@use crate::{templates::{layouts::home, profiles::view}, nav::NavState, profiles::Profile};
|
|
@use hyaenidae_toolkit::{templates::{button_group, card, card_body, card_title, file_input, statics::{button_js, file_input_js}}, Button, Card, FileInput};
|
|
|
|
@(icon_input: &FileInput, error: Option<String>, profile: &Profile, nav_state: &NavState)
|
|
|
|
@:home("Create Profile", "Create a new profile on Hyaenidae", nav_state, {
|
|
<script src="/toolkit/@file_input_js.name"></script>
|
|
<script src="/toolkit/@button_js.name"></script>
|
|
}, {
|
|
@:card(&Card::full_width().dark(nav_state.dark()), {
|
|
<form method="POST" action="/profiles/create/icon" enctype="multipart/form-data">
|
|
@:card_title({ Add an Icon })
|
|
@:card_body({
|
|
<p>
|
|
This icon will be displayed on your profile, and next to submissions
|
|
or comments you create.
|
|
</p>
|
|
})
|
|
@if let Some(error) = error {
|
|
@:card_body({
|
|
<p>@error</p>
|
|
})
|
|
}
|
|
@:card_body({
|
|
@:file_input(icon_input)
|
|
})
|
|
@:card_body({
|
|
@:button_group(&[
|
|
&Button::primary("Next").dark(nav_state.dark()),
|
|
Button::outline("Back").href("/profiles/create/bio").dark(nav_state.dark()),
|
|
Button::primary_outline("Skip").href("/profiles/create/banner").dark(nav_state.dark()),
|
|
Button::primary_outline("Skip All").href("/profiles/create/done").dark(nav_state.dark()),
|
|
])
|
|
})
|
|
</form>
|
|
})
|
|
@:card(&Card::full_width().dark(nav_state.dark()), {
|
|
@:card_title({ Preview })
|
|
@:view(profile, nav_state.dark())
|
|
})
|
|
})
|
|
|