diff --git a/routes/routes.go b/routes/routes.go
index 3c82bdb..f1b1286 100644
--- a/routes/routes.go
+++ b/routes/routes.go
@@ -187,6 +187,7 @@ func (d *deps) RepoTree(w http.ResponseWriter, r *http.Request) {
data["ref"] = ref
data["parent"] = treePath
data["desc"] = getDescription(path)
+ data["dotdot"] = filepath.Dir(treePath)
d.listFiles(files, data, w)
return
@@ -249,7 +250,7 @@ func (d *deps) Log(w http.ResponseWriter, r *http.Request) {
data["name"] = name
data["ref"] = ref
data["desc"] = getDescription(path)
- data["dotdot"] = filepath.Dir(path)
+ data["log"] = true
if err := d.t.ExecuteTemplate(w, "log", data); err != nil {
log.Println(err)
diff --git a/templates/file.html b/templates/file.html
index 208f653..f015974 100644
--- a/templates/file.html
+++ b/templates/file.html
@@ -1,8 +1,6 @@
{{ define "file" }}
{{ template "head" . }}
-
{{.name }} — {{ .path }}
-
{{ template "repoheader" . }}
{{ template "nav" . }}
diff --git a/templates/head.html b/templates/head.html
index 8ad9023..8332abd 100644
--- a/templates/head.html
+++ b/templates/head.html
@@ -4,6 +4,26 @@
+ {{ if .parent }}
+ {{ .meta.Title }} — {{ .name }} ({{ .ref }}): {{ .parent }}/
+
+ {{ else if .path }}
+ {{ .meta.Title }} — {{ .name }} ({{ .ref }}): {{ .path }}
+ {{ else if .files }}
+ {{ .meta.Title }} — {{ .name }} ({{ .ref }})
+ {{ else if .commit }}
+ {{ .meta.Title }} — {{ .name }}: {{ .commit.This }}
+ {{ else if .branches }}
+ {{ .meta.Title }} — {{ .name }}: refs
+ {{ else if .commits }}
+ {{ if .log }}
+ {{ .meta.Title }} — {{ .name }}: log
+ {{ else }}
+ {{ .meta.Title }} — {{ .name }}
+ {{ end }}
+ {{ else }}
+ {{ .meta.Title }}
+ {{ end }}
{{ if and .servername .gomod }}
{{ end }}
diff --git a/templates/index.html b/templates/index.html
index ae1109c..163d6a4 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,12 +1,6 @@
{{ define "index" }}
{{ template "head" . }}
-
-
- {{ .meta.Title }}
-
-
-
{{ .meta.Title }}
diff --git a/templates/log.html b/templates/log.html
index 372518a..9c783aa 100644
--- a/templates/log.html
+++ b/templates/log.html
@@ -1,11 +1,6 @@
{{ define "log" }}
{{ template "head" . }}
-
-
- {{ .name }} — log
-
-
{{ template "repoheader" . }}
{{ template "nav" . }}
diff --git a/templates/refs.html b/templates/refs.html
index 541ef4c..a7f6a9c 100644
--- a/templates/refs.html
+++ b/templates/refs.html
@@ -2,10 +2,6 @@
{{ template "head" . }}
-
- {{ .name }} — refs
-
-
{{ template "repoheader" . }}
{{ template "nav" . }}
diff --git a/templates/repo.html b/templates/repo.html
index 99b718f..7401ca4 100644
--- a/templates/repo.html
+++ b/templates/repo.html
@@ -1,10 +1,5 @@
{{ define "repo" }}
- {{ .name }}
- {{ if .parent }}
- — {{ .parent }}
- {{ end }}
-
{{ template "head" . }}
{{ template "repoheader" . }}
diff --git a/templates/tree.html b/templates/tree.html
index be285c0..c5fb38f 100644
--- a/templates/tree.html
+++ b/templates/tree.html
@@ -1,10 +1,5 @@
{{ define "tree" }}
- {{ .name }}
- {{ if .parent }}
- — {{ .parent }}
- {{ end }}
-
{{ template "head" . }}
{{ template "repoheader" . }}