This commit is contained in:
Frank Denis 2016-11-14 12:28:15 +01:00
parent 390204f479
commit 59e79d5259
1 changed files with 5 additions and 5 deletions

View File

@ -94,8 +94,8 @@ impl WebService {
let html = html!{ let html = html!{
head { head {
title { : "iptoasn lookup" } title { : "iptoasn lookup" }
meta(name="viewport", content="width=device-widthinitial-scale=1") { } meta(name="viewport", content="width=device-widthinitial-scale=1");
link(rel="stylesheet", href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css", integrity="sha384-AysaV+vQoT3kOAXZkl02PThvDr8HYKPZhNT5h/CXfBThSRXQ6jW5DO2ekP5ViFdi", crossorigin="anonymous") { } link(rel="stylesheet", href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css", integrity="sha384-AysaV+vQoT3kOAXZkl02PThvDr8HYKPZhNT5h/CXfBThSRXQ6jW5DO2ekP5ViFdi", crossorigin="anonymous");
style { style {
: "body { margin: 1em 4em }" : "body { margin: 1em 4em }"
} }
@ -107,8 +107,8 @@ impl WebService {
table { table {
tr { tr {
th { : "Announced" } th { : "Announced" }
td { : format_args!("{}", map.get("announced") td { : format_args!("{}", if map.get("announced")
.unwrap().as_bool().unwrap()) } .unwrap().as_bool().unwrap() { "Yes" } else { "No" }) }
} }
@ if map.get("announced").unwrap().as_bool().unwrap() == true { @ if map.get("announced").unwrap().as_bool().unwrap() == true {
tr { tr {
@ -142,7 +142,7 @@ impl WebService {
} }
.into_string() .into_string()
.unwrap(); .unwrap();
let html = format!("<!doctype html>\n<html>\n{}</html>", html); let html = format!("<!DOCTYPE html>\n<html>{}</html>", html);
Ok(Response::with((status::Ok, mime_html, cache_header, html))) Ok(Response::with((status::Ok, mime_html, cache_header, html)))
} }