summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorKjetil Orbekk <kjetil.orbekk@gmail.com>2017-06-17 16:55:09 -0400
committerKjetil Orbekk <kjetil.orbekk@gmail.com>2017-06-17 16:55:09 -0400
commit651bfc36a8aa5a83c9143e62859623ef35f31c7f (patch)
tree01df98dc9a92950958a3e626f0ed68fbe4357227 /src/render
parent72844ca385bf7c503826cf6b684c8fa724973064 (diff)
Add login page (not done).
Diffstat (limited to 'src/render')
-rw-r--r--src/render/mod.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/render/mod.rs b/src/render/mod.rs
index 3b63a68..a824bd6 100644
--- a/src/render/mod.rs
+++ b/src/render/mod.rs
@@ -32,6 +32,20 @@ fn render_in_page<'a>(content: Box<RenderBox + 'a>) -> String {
}).into_string().unwrap()
}
+pub fn login_page() -> String {
+ render_in_page(box_html! {
+ h1 { : "Log in" }
+ form(method="post") {
+ p { : "Username" }
+ input(type="text", name="username") {}
+ p { : "Password" }
+ input(type="text", name="password") {}
+ p {}
+ input(type="submit", value="Log in") {}
+ }
+ })
+}
+
fn unit_table<'a>(units: &'a [&unit::Unit]) -> Box<RenderBox + 'a> {
fn render_unit<'a>(unit: &'a unit::Unit) -> Box<RenderBox + 'a> {
box_html! {