dark style, footer, homepage

This commit is contained in:
Damjan Georgievski 2018-07-22 06:55:58 +02:00
parent 481a984277
commit 01f0001594
3 changed files with 8 additions and 3 deletions

View file

@ -1,9 +1,10 @@
[package]
name = "http-server"
version = "0.6.0"
version = "0.7.0"
authors = ["Damjan Georgievski <gdamjan@gmail.com>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/gdamjan/http-server-rs"
[dependencies]
actix-web = "0.7"

View file

@ -1,4 +1,6 @@
body {background-color: white}
body {background-color: #282f34; color: #aeb9a6; font-family:monospace; font-size:10.5pt;}
a { color: #adad9d; }
footer a {color: darkgray; text-decoration: none;}
h1 {margin-bottom: 0}
table td:nth-child(2) {text-align:right}
table {
@ -7,6 +9,6 @@ table {
padding: 0.5em 0;
border-top: 1px;
border-bottom: 1px;
border-color: #aaa;
border-color: #444;
border-style: solid none;
}

View file

@ -60,6 +60,8 @@ fn handle_directory<'a, 'b>(
writeln!(body, "</tr>").unwrap();
}
writeln!(body, "</table>").unwrap();
writeln!(body, r#"<footer><a href="{}">{} {}</a></footer>"#,
env!("CARGO_PKG_HOMEPAGE"), env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION")).unwrap();
let mut html = String::new();
writeln!(html, "<!DOCTYPE html>").unwrap();