From 5b69df21d033c2454b9c93ea520b0fcb5c128e1c Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 17 Feb 2016 07:37:49 +0100 Subject: Move style out of template --- assets/static/style.css | 23 +++++++++++++++++++++++ static.go | 8 ++++++++ tmpl/root | 35 +++++------------------------------ 3 files changed, 36 insertions(+), 30 deletions(-) create mode 100644 assets/static/style.css create mode 100644 static.go diff --git a/assets/static/style.css b/assets/static/style.css new file mode 100644 index 0000000..3b3f2c8 --- /dev/null +++ b/assets/static/style.css @@ -0,0 +1,23 @@ +body { + font-family: 'Abel', sans-serif; + margin: 5% 10%; +} +h1, h4 { + font-family: 'Raleway', sans-serif; +} +h1 { + color: #F50; +} +pre { + font-family: 'Anonymous Pro', monospace; +} +a { + color: #05A; + text-decoration: none; +} +nav { + float: right; +} +nav a { + padding: 1ex; +} diff --git a/static.go b/static.go new file mode 100644 index 0000000..11f0fc6 --- /dev/null +++ b/static.go @@ -0,0 +1,8 @@ +package main + +import "net/http" + +func init() { + //http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static")))) + http.Handle("/static/", http.FileServer(http.Dir("assets"))) +} diff --git a/tmpl/root b/tmpl/root index 250f751..0cfa22c 100644 --- a/tmpl/root +++ b/tmpl/root @@ -3,36 +3,11 @@ {{template "title" .}} - - - - - - + + + + +
-- cgit v1.2.3