From 7386392b8cd08e73e4f5fa6080e8f4fcf20831f6 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 27 Jul 2024 08:00:00 +0800 Subject: Some more HTML sanities --- templates/tree.html | 55 +++++++++++++++++++++++------------------------------ 1 file changed, 24 insertions(+), 31 deletions(-) (limited to 'templates/tree.html') diff --git a/templates/tree.html b/templates/tree.html index 6e48dc1..6634a5c 100644 --- a/templates/tree.html +++ b/templates/tree.html @@ -1,54 +1,47 @@ {{ define "tree" }} - -{{ template "head" . }} - - {{ template "repoheader" . }} + {{ template "head" . }} + {{ template "repoheader" . }} {{ template "nav" . }}
{{ $repo := .name }} {{ $ref := .ref }} {{ $parent := .parent }} -
{{ if $parent }} -
-
-
..
+
..
{{ end }} {{ range .files }} - {{ if not .IsFile }} -
{{ .Mode }}
-
{{ .Size }}
-
- {{ if $parent }} - {{ .Name }}/ - {{ else }} - {{ .Name }}/ + {{ if not .IsFile }} +
{{ .Mode }}
+
{{ .Size }}
+
+ {{ if $parent }} + {{ .Name }}/ + {{ else }} + {{ .Name }}/ + {{ end }} +
{{ end }} -
- {{ end }} {{ end }} {{ range .files }} - {{ if .IsFile }} -
{{ .Mode }}
-
{{ .Size }}
-
- {{ if $parent }} - {{ .Name }} - {{ else }} - {{ .Name }} + {{ if .IsFile }} +
{{ .Mode }}
+
{{ .Size }}
+
+ {{ if $parent }} + {{ .Name }} + {{ else }} + {{ .Name }} + {{ end }} +
{{ end }} -
- {{ end }} {{ end }}
-
-					{{- if .readme }}{{ .readme }}{{- end -}}
-				
+
{{- if .readme }}{{ .readme }}{{- end -}}
-- cgit v1.2.3