aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-02-17 16:53:04 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-02-17 16:53:04 +0100
commit98ffc2688cb8cc31ffb1c24e0d07977e1b61bca7 (patch)
treeeafd82a89ab20cfbf257129c72ca8fdd65261ffc
parentee22fe4ee5fc422d9e245e322801c1842803dfd6 (diff)
Add tooltips, rename Root into Home
-rw-r--r--home.go11
-rw-r--r--root.go11
-rw-r--r--tmpl/root8
3 files changed, 15 insertions, 15 deletions
diff --git a/home.go b/home.go
new file mode 100644
index 0000000..490d8a3
--- /dev/null
+++ b/home.go
@@ -0,0 +1,11 @@
+package main
+
+import "net/http"
+
+func init() {
+ http.HandleFunc("/", homeHandler)
+}
+
+func homeHandler(w http.ResponseWriter, r *http.Request) {
+ http.Redirect(w, r, "/view/Home", http.StatusFound)
+}
diff --git a/root.go b/root.go
deleted file mode 100644
index b9b7e4d..0000000
--- a/root.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package main
-
-import "net/http"
-
-func init() {
- http.HandleFunc("/", rootHandler)
-}
-
-func rootHandler(w http.ResponseWriter, r *http.Request) {
- http.Redirect(w, r, "/view/Root", http.StatusFound)
-}
diff --git a/tmpl/root b/tmpl/root
index ee0fa9d..4d7aeb0 100644
--- a/tmpl/root
+++ b/tmpl/root
@@ -12,11 +12,11 @@
<header>
<h1>{{template "title" .}}</h1>
<nav>
- <a href="/"><i class="fa fa-home"></i></a>
- <a href="/index"><i class="fa fa-list"></i></a>
+ <a href="/" title="home"><i class="fa fa-home"></i></a>
+ <a href="/index" title="index"><i class="fa fa-list"></i></a>
{{with .Title}}
- <a href="/edit/{{.}}"><i class="fa fa-pencil"></i></a>
- <a href="/del/{{.}}"><i class="fa fa-trash"></i></a>
+ <a href="/edit/{{.}}" title="edit {{.}}"><i class="fa fa-pencil"></i></a>
+ <a href="/del/{{.}}" title="delete {{.}}"><i class="fa fa-trash"></i></a>
{{end}}
</nav>
</header>