aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 a80f1c2..d9b533c 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>