44 lines
1.7 KiB
HTML
44 lines
1.7 KiB
HTML
@use crate::{templates::{layouts::home, profiles::view}, profiles::Profile};
|
|
@use hyaenidae_accounts::LogoutState;
|
|
@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, logout: LogoutState)
|
|
|
|
@:home("Create Profile", "Create a new profile on Hyaenidae", &Some(logout), {
|
|
<script src="/toolkit/@file_input_js.name"></script>
|
|
<script src="/toolkit/@button_js.name"></script>
|
|
}, {
|
|
@:card(&Card::full_width().classes(&["account-page"]), {
|
|
<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"),
|
|
Button::outline("Back").href("/profiles/create/bio"),
|
|
Button::primary_outline("Skip").href("/profiles/create/banner"),
|
|
Button::primary_outline("Skip All").href("/profiles/create/done"),
|
|
])
|
|
})
|
|
</form>
|
|
})
|
|
@:card(&Card::full_width().classes(&["account-page"]), {
|
|
@:card_title({ Preview })
|
|
@:view("", profile)
|
|
})
|
|
})
|
|
|