aboutsummaryrefslogtreecommitdiff
path: root/templates/repo_tree_dir.tmpl
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-07 21:18:28 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-07 21:18:51 +0800
commit5699c497a45e08e9e502974e8055d1291dde29dd (patch)
tree5f8c6555142ead9e1359f9e778e4f7375dd60069 /templates/repo_tree_dir.tmpl
parenthttp/templates: Minify templates (diff)
downloadforge-5699c497a45e08e9e502974e8055d1291dde29dd.tar.gz
forge-5699c497a45e08e9e502974e8055d1291dde29dd.tar.zst
forge-5699c497a45e08e9e502974e8055d1291dde29dd.zip
http/templates: Reduce whitespace
Diffstat (limited to '')
-rw-r--r--templates/repo_tree_dir.tmpl32
1 files changed, 16 insertions, 16 deletions
diff --git a/templates/repo_tree_dir.tmpl b/templates/repo_tree_dir.tmpl
index a62139c..12d1636 100644
--- a/templates/repo_tree_dir.tmpl
+++ b/templates/repo_tree_dir.tmpl
@@ -6,17 +6,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
- {{ template "head_common" . }}
- <title>/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} &ndash; {{ .repo_name }} &ndash; {{ template "group_path_plain" .group_path }} &ndash; {{ .global.forge_title }}</title>
+ {{- template "head_common" . -}}
+ <title>/{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }} &ndash; {{ .repo_name }} &ndash; {{ template "group_path_plain" .group_path }} &ndash; {{ .global.forge_title -}}</title>
</head>
<body class="repo-tree-dir">
- {{ template "header" . }}
+ {{- template "header" . -}}
<div class="padding-wrapper scroll">
<table id="file-tree" class="wide">
<thead>
<tr class="title-row">
<th colspan="3">
- /{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }}{{ if .ref_name }} on {{ .ref_name }}{{ end }}
+ /{{ .path_spec }}{{ if ne .path_spec "" }}/{{ end }}{{ if .ref_name }} on {{ .ref_name }}{{ end -}}
</th>
<tr>
<th scope="col">Mode</th>
@@ -26,16 +26,16 @@
</tr>
</thead>
<tbody>
- {{- $path_spec := .path_spec }}
- {{- $ref := .ref_name }}
- {{- $ref_type := .ref_type }}
- {{- range .files }}
+ {{- $path_spec := .path_spec -}}
+ {{- $ref := .ref_name -}}
+ {{- $ref_type := .ref_type -}}
+ {{- range .files -}}
<tr>
- <td class="file-mode">{{ .Mode }}</td>
- <td class="file-name"><a href="{{ .Name }}{{ if not .Is_file }}/{{ end }}{{ if $ref_type }}?{{ $ref_type }}={{ $ref }}{{ end }}">{{ .Name }}</a>{{ if not .Is_file }}/{{ end }}</td>
- <td class="file-size">{{ .Size }}</td>
+ <td class="file-mode">{{- .Mode -}}</td>
+ <td class="file-name"><a href="{{- .Name -}}{{- if not .Is_file -}}/{{- end -}}{{- if $ref_type -}}?{{- $ref_type -}}={{- $ref -}}{{- end -}}">{{- .Name -}}</a>{{- if not .Is_file -}}/{{- end -}}</td>
+ <td class="file-size">{{- .Size -}}</td>
</tr>
- {{- end }}
+ {{- end -}}
</tbody>
</table>
</div>
@@ -43,13 +43,13 @@
<div id="refs">
</div>
</div>
- {{ if .readme }}
+ {{- if .readme -}}
<div class="padding-wrapper" id="readme">
- {{ .readme -}}
+ {{- .readme -}}
</div>
- {{ end }}
+ {{- end -}}
<footer>
- {{ template "footer" . }}
+ {{- template "footer" . -}}
</footer>
</body>
</html>