Hugely refactor the HTML
This commit is contained in:
parent
9a014af75a
commit
a403c1b1b3
|
@ -4,13 +4,17 @@ use file_service::{FileHandle, FileInfo, ReadFileError};
|
||||||
|
|
||||||
pub fn auth(_message: Option<String>) -> build_html::HtmlPage {
|
pub fn auth(_message: Option<String>) -> build_html::HtmlPage {
|
||||||
build_html::HtmlPage::new()
|
build_html::HtmlPage::new()
|
||||||
.with_title("Authentication")
|
.with_title("Sign In")
|
||||||
.with_stylesheet("/css")
|
.with_stylesheet("/css")
|
||||||
.with_container(
|
.with_container(
|
||||||
Container::new(ContainerType::Div)
|
Container::new(ContainerType::Div)
|
||||||
.with_attributes([("class", "authentication-page")])
|
.with_attributes([("class", "authentication-page")])
|
||||||
.with_container(
|
.with_container(auth_form()),
|
||||||
Container::new(ContainerType::Div)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn auth_form() -> Container {
|
||||||
|
Container::default()
|
||||||
.with_attributes([("class", "card authentication-form")])
|
.with_attributes([("class", "card authentication-form")])
|
||||||
.with_html(
|
.with_html(
|
||||||
Form::new()
|
Form::new()
|
||||||
|
@ -18,18 +22,17 @@ pub fn auth(_message: Option<String>) -> build_html::HtmlPage {
|
||||||
.with_method("post")
|
.with_method("post")
|
||||||
.with_container(
|
.with_container(
|
||||||
Container::new(ContainerType::Div)
|
Container::new(ContainerType::Div)
|
||||||
.with_attributes([("class", "authentication-form__label")])
|
|
||||||
.with_html(Label::new("for-token-input", "Authentication")),
|
|
||||||
)
|
|
||||||
.with_container(
|
|
||||||
Container::new(ContainerType::Div)
|
|
||||||
.with_attributes([("class", "authentication-form__input")])
|
|
||||||
.with_html(
|
.with_html(
|
||||||
Input::new("password", "password")
|
Input::new("password", "password")
|
||||||
.with_id("for-token-input")
|
.with_id("for-token-input")
|
||||||
.with_attributes([("size", "50")]),
|
.with_attributes([
|
||||||
),
|
("size", "50"),
|
||||||
),
|
("class", "authentication-form__input"),
|
||||||
|
]),
|
||||||
|
)
|
||||||
|
.with_html(
|
||||||
|
Button::new("Sign In")
|
||||||
|
.with_attributes([("class", "authentication-form__button")]),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue