fix title tag and tree .. link
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmPl5G8ACgkQO3+8IhRO Y5iWtg//TXKPz1M+0B7OPA7UjgbN24UFKOvClQAYaFtFzbSTXYb5LgTxu8Oimyzf rh71N547PFcPcioF2D0lZ/OHtM4PZibb0jXZQO8keT7v4CVIZ4s8YQ1FCj6DHya7 0SmmL/vBi+dW3/E4L8WG/I7R6AHGzU2fyOlyUu+TKSCAY2cPGN6zWMU0RWklAmht uyTwhOR9SmLJo8P/Pi6RhZZoPlq45VrEFLXCV+504by0H8tYhM9PbHrahbrF3ku6 RbwxwzaRhHoMk/DX7aMlfR1ctkB1PAXsxNg2ix00cIckRtx4voE71IoFt+uyPXlx az8m/5nel67AO1byk8hMXaaLaLpnd48YL7Z6VuuOh0iCKmpCl7kM9Mm0HcofMfXl abuMWKsGsjwDpTwE4Bo4f8HnRAOrHazoGAgJNgn02VAPdZnF3pkQd/DVi64D43K3 JeLC8//78zJ3AfCWJ/yVcE06wu3Nnc/quF+YPc/uJwICW2hyFpWlDyfYqJurVsta +Ii0CNlmkb8tXiSR/cCbO6ZTqn+YjsfS70yaTb7/06RjhJFmjNYwIA278KGbgfoA Ms5jQmalni+wK2s92A/gdQ1NWm01N6DRSvM9WDYDIxK391HIket4H+453dyjmIV1 8aIflIKX1F0yLNJi2p+jnqcNIgyW5hyxFCduyzNMHks/Gmtr2FA= =r0j7 -----END PGP SIGNATURE-----
8 files changed,
22 insertions(+),
28 deletions(-)
M
routes/routes.go
→
routes/routes.go
@@ -187,6 +187,7 @@ data["name"] = name
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 @@ data["meta"] = d.c.Meta
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)
M
templates/file.html
→
templates/file.html
@@ -1,8 +1,6 @@
{{ define "file" }} <html> {{ template "head" . }} - <title>{{.name }} — {{ .path }}</title> - <body> {{ template "repoheader" . }} {{ template "nav" . }}
M
templates/head.html
→
templates/head.html
@@ -5,6 +5,26 @@ <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/static/style.css" type="text/css"> <link rel="stylesheet" href="https://cdn.icyphox.sh/fonts/inter.css" type="text/css"> <link rel="icon" type="image/png" size="32x32" href="/static/legit.png"> + {{ if .parent }} + <title>{{ .meta.Title }} — {{ .name }} ({{ .ref }}): {{ .parent }}/</title> + + {{ else if .path }} + <title>{{ .meta.Title }} — {{ .name }} ({{ .ref }}): {{ .path }}</title> + {{ else if .files }} + <title>{{ .meta.Title }} — {{ .name }} ({{ .ref }})</title> + {{ else if .commit }} + <title>{{ .meta.Title }} — {{ .name }}: {{ .commit.This }}</title> + {{ else if .branches }} + <title>{{ .meta.Title }} — {{ .name }}: refs</title> + {{ else if .commits }} + {{ if .log }} + <title>{{ .meta.Title }} — {{ .name }}: log</title> + {{ else }} + <title>{{ .meta.Title }} — {{ .name }}</title> + {{ end }} + {{ else }} + <title>{{ .meta.Title }}</title> + {{ end }} {{ if and .servername .gomod }} <meta name="go-import" content="{{ .servername}}/{{ .name }} git https://{{ .servername }}/{{ .name }}"> {{ end }}
M
templates/index.html
→
templates/index.html
@@ -1,12 +1,6 @@
{{ define "index" }} <html> {{ template "head" . }} - - <title> - {{ .meta.Title }} - </title> - - <body> <header> <h1>{{ .meta.Title }}</h1>
M
templates/log.html
→
templates/log.html
@@ -1,11 +1,6 @@
{{ define "log" }} <html> {{ template "head" . }} - - <title> - {{ .name }} — log - </title> - <body> {{ template "repoheader" . }} {{ template "nav" . }}
M
templates/refs.html
→
templates/refs.html
@@ -2,10 +2,6 @@ {{ define "refs" }}
<html> {{ template "head" . }} - <title> - {{ .name }} — refs - </title> - <body> {{ template "repoheader" . }} {{ template "nav" . }}
M
templates/repo.html
→
templates/repo.html
@@ -1,10 +1,5 @@
{{ define "repo" }} <html> - <title>{{ .name }} - {{ if .parent }} - — {{ .parent }} - {{ end }} - </title> {{ template "head" . }} <body> {{ template "repoheader" . }}
M
templates/tree.html
→
templates/tree.html
@@ -1,10 +1,5 @@
{{ define "tree" }} <html> - <title>{{ .name }} - {{ if .parent }} - — {{ .parent }} - {{ end }} - </title> {{ template "head" . }} <body> {{ template "repoheader" . }}