hyaenidae/server/templates/submissions/create.rs.html
asonix 5f0682ee22 Make mobile nav not require page refresh when JS enabled
Make top bar stick to top of screen
Make wide view show rows of 4
Improve notification page styles, text
Add button js to more pages
2021-01-15 22:50:15 -06:00

28 lines
941 B
HTML

@use crate::templates::{button_js, file_js};
@use crate::{templates::layouts::home, nav::NavState};
@use hyaenidae_toolkit::{templates::{button_group, card, card_body, card_title, file_input}, Button, Card, FileInput};
@(file: &FileInput, error: Option<String>, nav_state: &NavState)
@:home("Create Submission", "Upload a file", nav_state, {
@:button_js()
@:file_js()
}, {
@:card(&Card::full_width().dark(nav_state.dark()), {
<form method="POST" action="/submissions/create" enctype="multipart/form-data">
@:card_title({ Select a file to post })
@if let Some(error) = error {
@:card_body({ @error })
}
@:card_body({
@:file_input(file)
})
@:card_body({
@:button_group(&[
&Button::primary("Next").dark(nav_state.dark()),
])
})
</form>
})
})