templates: add title tags
This commit is contained in:
parent
5ea7cae973
commit
7fe98772b0
5 changed files with 14 additions and 0 deletions
|
@ -173,6 +173,7 @@ func (d *deps) FileContent(w http.ResponseWriter, r *http.Request) {
|
|||
data["name"] = name
|
||||
data["ref"] = ref
|
||||
data["desc"] = getDescription(path)
|
||||
data["path"] = treePath
|
||||
|
||||
d.showFile(contents, data, w)
|
||||
return
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{{ define "file" }}
|
||||
<html>
|
||||
{{ template "head" . }}
|
||||
<title>{{.name }} — {{ .path }}</title>
|
||||
|
||||
{{ template "repoheader" . }}
|
||||
<body>
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
<html>
|
||||
{{ template "head" . }}
|
||||
|
||||
<title>
|
||||
{{ .meta.Title }}
|
||||
</title>
|
||||
|
||||
<header>
|
||||
<h1>{{ .meta.Title }}</h1>
|
||||
<h2>{{ .meta.Description }}</h2>
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
<html>
|
||||
{{ template "head" . }}
|
||||
|
||||
<title>
|
||||
{{ .name }} — log
|
||||
</title>
|
||||
|
||||
{{ template "repoheader" . }}
|
||||
<body>
|
||||
{{ template "nav" . }}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
<html>
|
||||
{{ template "head" . }}
|
||||
|
||||
<title>
|
||||
{{ .name }} — refs
|
||||
</title>
|
||||
|
||||
{{ template "repoheader" . }}
|
||||
<body>
|
||||
{{ template "nav" . }}
|
||||
|
|
Loading…
Reference in a new issue