hyaenidae/server/templates/accounts/login.rs.html

23 lines
897 B
HTML
Raw Normal View History

2021-01-28 22:55:42 +00:00
@use crate::templates::accounts::inputs::{text_input, password_input};
@use hyaenidae_accounts::LoginState;
@use hyaenidae_toolkit::{templates::{button_group, card, card_body, card_title, link}, Button, Card, Link};
2020-12-16 02:40:41 +00:00
@(card_config: &Card, state: &LoginState)
@:card(card_config, {
2020-12-16 02:40:41 +00:00
<form method="POST" action="@state.login_path()">
@:card_title({ Login })
2020-12-16 02:40:41 +00:00
@:card_body({
2021-01-10 01:46:31 +00:00
@:text_input("username", "Username", state.username(), state.username_error(), state.dark)
@:password_input("password", "Password", state.password(), None, state.dark)
2021-01-24 04:02:31 +00:00
@:link(&Link::current_tab(&state.register_path()), { I do not have an account })
2020-12-16 02:40:41 +00:00
})
@:card_body({
@:button_group(&[
2021-01-24 21:29:10 +00:00
Button::primary("Login"),
Button::primary_outline("Cancel").href(&state.home_path()),
2020-12-16 02:40:41 +00:00
])
})
</form>
})