diff options
author | Feuerfuchs <git@feuerfuchs.dev> | 2019-06-20 18:19:29 +0200 |
---|---|---|
committer | Feuerfuchs <git@feuerfuchs.dev> | 2019-06-20 18:19:29 +0200 |
commit | e37b0d73683639f2c07f13938af4a7d7e778d519 (patch) | |
tree | c86e24aa98d233253fcb7c621acf0a55b20496e6 | |
parent | Add navigation header (diff) | |
download | gopherproxy-e37b0d73683639f2c07f13938af4a7d7e778d519.tar.gz gopherproxy-e37b0d73683639f2c07f13938af4a7d7e778d519.tar.bz2 gopherproxy-e37b0d73683639f2c07f13938af4a7d7e778d519.zip |
Fix: Hide resource type for home page, too
-rw-r--r-- | template.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/template.go b/template.go index b1dbaf1..f369fb9 100644 --- a/template.go +++ b/template.go | |||
@@ -17,7 +17,7 @@ var tpltext = `<!doctype html> | |||
17 | {{- $uriParts := split .URI "/" -}} | 17 | {{- $uriParts := split .URI "/" -}} |
18 | {{- $uriLast := $uriParts | last -}} | 18 | {{- $uriLast := $uriParts | last -}} |
19 | {{- $uriParts = $uriParts | pop -}} | 19 | {{- $uriParts = $uriParts | pop -}} |
20 | {{- if eq $uriLast "" -}} | 20 | {{- if or (eq (len $uriParts) 1) (eq $uriLast "") -}} |
21 | {{- $uriLast = $uriParts | last -}} | 21 | {{- $uriLast = $uriParts | last -}} |
22 | {{- $uriParts = $uriParts | pop -}} | 22 | {{- $uriParts = $uriParts | pop -}} |
23 | {{- end -}} | 23 | {{- end -}} |