1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-26 12:18:36 +00:00

Add whitespace removal inside template curly brackes (#20853)

This commit is contained in:
silverwind
2022-08-25 23:55:52 +02:00
committed by GitHub
parent 27ac65a124
commit 6c4688e1b1
30 changed files with 110 additions and 102 deletions

View File

@@ -1,4 +1,4 @@
<div class="ui segments repository-summary{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats }} repository-summary-language-stats{{end}} mt-2 mb-0">
<div class="ui segments repository-summary{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats}} repository-summary-language-stats{{end}} mt-2 mb-0">
<div class="ui segment sub-menu repository-menu">
<div class="ui two horizontal center link list">
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}}
@@ -19,27 +19,27 @@
{{end}}
</div>
</div>
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats }}
{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats}}
<div class="ui segment sub-menu language-stats-details" style="display: none">
<div class="ui horizontal center link list">
{{range .LanguageStats}}
<div class="item df ac jc">
<i class="color-icon mr-3" style="background-color: {{ .Color }}"></i>
<i class="color-icon mr-3" style="background-color: {{.Color}}"></i>
<span class="bold mr-3">
{{if eq .Language "other" }}
{{ $.locale.Tr "repo.language_other" }}
{{if eq .Language "other"}}
{{$.locale.Tr "repo.language_other"}}
{{else}}
{{ .Language }}
{{.Language}}
{{end}}
</span>
{{ .Percentage }}%
{{.Percentage}}%
</div>
{{end}}
</div>
</div>
<a class="ui segment language-stats">
{{range .LanguageStats}}
<div class="bar" style="width: {{ .Percentage }}%; background-color: {{ .Color }}">&nbsp;</div>
<div class="bar" style="width: {{.Percentage}}%; background-color: {{.Color}}">&nbsp;</div>
{{end}}
</a>
{{end}}