2021-01-06 08:21:37 +00:00
|
|
|
@use crate::{templates::{layout, profiles::view}, profiles::Profile};
|
|
|
|
@use hyaenidae_toolkit::{templates::{button_group, card, card_body, file_input}, Button, Card, FileInput};
|
|
|
|
|
|
|
|
@(banner_input: &FileInput, error: Option<String>, profile: &Profile)
|
|
|
|
|
|
|
|
@:layout("Create Profile", "Create a new profile on Hyaenidae", {}, {
|
2021-01-06 16:45:43 +00:00
|
|
|
@:card(&Card::full_width().classes(&["account-page"]), { Add a banner }, {
|
2021-01-06 08:21:37 +00:00
|
|
|
<form method="POST" action="/profiles/create/banner" enctype="multipart/form-data">
|
|
|
|
@:card_body({
|
|
|
|
<p>
|
|
|
|
This banner will be displayed on your profile behind your icon.
|
|
|
|
</p>
|
|
|
|
})
|
|
|
|
@if let Some(error) = error {
|
|
|
|
@:card_body({
|
|
|
|
<p>@error</p>
|
|
|
|
})
|
|
|
|
}
|
|
|
|
@:card_body({
|
|
|
|
@:file_input(banner_input)
|
|
|
|
})
|
|
|
|
@:card_body({
|
|
|
|
@:button_group(&[
|
|
|
|
&Button::primary("Next"),
|
|
|
|
Button::outline("Back").href("/profiles/create/icon"),
|
|
|
|
Button::primary_outline("Skip").href("/profiles/create/require-login"),
|
|
|
|
Button::primary_outline("Skip All").href("/profiles/create/done"),
|
|
|
|
])
|
|
|
|
})
|
|
|
|
</form>
|
|
|
|
})
|
|
|
|
@:card(&Card::full_width().classes(&["account-page"]), { Preview }, {
|
2021-01-07 05:42:08 +00:00
|
|
|
@:view("", profile)
|
2021-01-06 08:21:37 +00:00
|
|
|
})
|
|
|
|
})
|
|
|
|
|