diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-07 21:18:28 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-07 21:18:51 +0800 |
commit | 5699c497a45e08e9e502974e8055d1291dde29dd (patch) | |
tree | 5f8c6555142ead9e1359f9e778e4f7375dd60069 /templates/repo_contrib_one.tmpl | |
parent | http/templates: Minify templates (diff) | |
download | forge-5699c497a45e08e9e502974e8055d1291dde29dd.tar.gz forge-5699c497a45e08e9e502974e8055d1291dde29dd.tar.zst forge-5699c497a45e08e9e502974e8055d1291dde29dd.zip |
http/templates: Reduce whitespace
Diffstat (limited to '')
-rw-r--r-- | templates/repo_contrib_one.tmpl | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/templates/repo_contrib_one.tmpl b/templates/repo_contrib_one.tmpl index 88bc2fc..cb53558 100644 --- a/templates/repo_contrib_one.tmpl +++ b/templates/repo_contrib_one.tmpl @@ -6,11 +6,11 @@ <!DOCTYPE html> <html lang="en"> <head> - {{ template "head_common" . }} - <title>Merge requests – {{ .repo_name }} – {{ template "group_path_plain" .group_path }} – {{ .global.forge_title }}</title> + {{- template "head_common" . -}} + <title>Merge requests – {{ .repo_name }} – {{ template "group_path_plain" .group_path }} – {{ .global.forge_title -}}</title> </head> <body class="repo-contrib-one"> - {{ template "header" . }} + {{- template "header" . -}} <div class="padding-wrapper"> <table id="mr-info-table"> <thead> @@ -21,70 +21,70 @@ <tbody> <tr> <th scope="row">ID</th> - <td>{{ .mr_id }}</td> + <td>{{- .mr_id -}}</td> </tr> <tr> <th scope="row">Status</th> - <td>{{ .mr_status }}</td> + <td>{{- .mr_status -}}</td> </tr> <tr> <th scope="row">Title</th> - <td>{{ .mr_title }}</td> + <td>{{- .mr_title -}}</td> </tr> <tr> <th scope="row">Source ref</th> - <td>{{ .mr_source_ref }}</td> + <td>{{- .mr_source_ref -}}</td> </tr> <tr> <th scope="row">Destination branch</th> - <td>{{ .mr_destination_branch }}</td> + <td>{{- .mr_destination_branch -}}</td> </tr> <tr> <th scope="row">Merge base</th> - <td>{{ .merge_base.ID.String }}</td> + <td>{{- .merge_base.ID.String -}}</td> </tr> </tbody> </table> </div> <div class="padding-wrapper"> - {{ $merge_base := .merge_base }} - {{ $source_commit := .source_commit }} - {{ range .file_patches }} + {{- $merge_base := .merge_base -}} + {{- $source_commit := .source_commit -}} + {{- range .file_patches -}} <div class="file-patch toggle-on-wrapper"> - <input type="checkbox" id="toggle-{{ .From.Hash }}{{ .To.Hash }}" class="file-toggle toggle-on-toggle"> - <label for="toggle-{{ .From.Hash }}{{ .To.Hash }}" class="file-header toggle-on-header"> + <input type="checkbox" id="toggle-{{- .From.Hash -}}{{- .To.Hash -}}" class="file-toggle toggle-on-toggle"> + <label for="toggle-{{- .From.Hash -}}{{- .To.Hash -}}" class="file-header toggle-on-header"> <div> - {{ if eq .From.Path "" }} + {{- if eq .From.Path "" -}} --- /dev/null - {{ else }} - --- a/<a href="../../tree/{{ .From.Path }}?commit={{ $merge_base.Hash }}">{{ .From.Path }}</a> {{ .From.Mode }} - {{ end }} + {{- else -}} + --- a/<a href="../../tree/{{- .From.Path -}}?commit={{- $merge_base.Hash -}}">{{- .From.Path -}}</a> {{ .From.Mode -}} + {{- end -}} <br /> - {{ if eq .To.Path "" }} + {{- if eq .To.Path "" -}} +++ /dev/null - {{ else }} - +++ b/<a href="../../tree/{{ .To.Path }}?commit={{ $source_commit.Hash }}">{{ .To.Path }}</a> {{ .To.Mode }} - {{ end }} + {{- else -}} + +++ b/<a href="../../tree/{{- .To.Path -}}?commit={{- $source_commit.Hash -}}">{{- .To.Path -}}</a> {{ .To.Mode -}} + {{- end -}} </div> </label> <div class="file-content toggle-on-content scroll"> - {{ range .Chunks }} - {{ if eq .Operation 0 }} + {{- range .Chunks -}} + {{- if eq .Operation 0 -}} <pre class="chunk chunk-unchanged">{{ .Content }}</pre> - {{ else if eq .Operation 1 }} + {{- else if eq .Operation 1 -}} <pre class="chunk chunk-addition">{{ .Content }}</pre> - {{ else if eq .Operation 2 }} + {{- else if eq .Operation 2 -}} <pre class="chunk chunk-deletion">{{ .Content }}</pre> - {{ else }} + {{- else -}} <pre class="chunk chunk-unknown">{{ .Content }}</pre> - {{ end }} - {{ end }} + {{- end -}} + {{- end -}} </div> </div> - {{ end }} + {{- end -}} </div> <footer> - {{ template "footer" . }} + {{- template "footer" . -}} </footer> </body> </html> |