improve error page

This commit is contained in:
Sam Rijs 2018-02-11 17:59:19 +11:00
parent 9f07308418
commit 3615e5982c
2 changed files with 7 additions and 4 deletions

View file

@ -121,7 +121,8 @@ impl Server {
match repo_path_result { match repo_path_result {
Err(err) => { Err(err) => {
error!(logger, "error: {}", err); error!(logger, "error: {}", err);
let mut response = views::html::error::render("Could not parse repository URL", ""); let mut response = views::html::error::render("Could not parse repository path",
"Please make sure to provide a valid repository path.");
response.set_status(StatusCode::BadRequest); response.set_status(StatusCode::BadRequest);
future::Either::A(future::ok(response)) future::Either::A(future::ok(response))
}, },

View file

@ -5,9 +5,11 @@ pub fn render(title: &str, descr: &str) -> Response {
super::render_html(title, html! { super::render_html(title, html! {
section class="hero is-light" { section class="hero is-light" {
div class="hero-head" (super::render_navbar()) div class="hero-head" (super::render_navbar())
div class="hero-body" { }
section class="section" {
div class="container" { div class="container" {
p class="title is-1" (title) div class="notification is-danger" {
p class="title is-3" (title)
p (descr) p (descr)
} }
} }