aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-02-17 07:37:49 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-02-17 07:37:49 +0100
commit5b69df21d033c2454b9c93ea520b0fcb5c128e1c (patch)
tree6ec7956e21a7a1bfc19df073f44353cde6fa0f12
parent525ef61eca5f36f6a6993fe9ec238efbdefb386e (diff)
Move style out of template
-rw-r--r--assets/static/style.css23
-rw-r--r--static.go8
-rw-r--r--tmpl/root35
3 files changed, 36 insertions, 30 deletions
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 @@
<html>
<head>
<title>{{template "title" .}}</title>
- <link href='http://fonts.googleapis.com/css?family=Abel' rel='stylesheet' type='text/css'>
- <link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
- <link href='http://fonts.googleapis.com/css?family=Anonymous+Pro' rel='stylesheet' type='text/css'>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
-
- <style>
- 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;
- }
- </style>
+ <link rel='stylesheet' type='text/css' href='http://fonts.googleapis.com/css?family=Abel'>
+ <link rel='stylesheet' type='text/css' href='http://fonts.googleapis.com/css?family=Raleway'>
+ <link rel='stylesheet' type='text/css' href='http://fonts.googleapis.com/css?family=Anonymous+Pro'>
+ <link rel='stylesheet' type='text/css' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'>
+ <link rel='stylesheet' type='text/css' href='/static/style.css'>
</head>
<body>
<section>