aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-04-29 05:23:19 +0800
committerGitHub <noreply@github.com>2023-04-28 17:23:19 -0400
commitbc4e06109dae33edc0a9a918f244563f05a1a353 (patch)
tree6fd2e68d8d3b874576fdd6a2c7a4a4681bef6c98 /templates
parentbc784a705bc5a49ddb3ceffe1ef1205fd15f0c08 (diff)
downloadgitea-bc4e06109dae33edc0a9a918f244563f05a1a353.tar.gz
gitea-bc4e06109dae33edc0a9a918f244563f05a1a353.zip
Make repo size style matches others (commits/branches/tags) (#24408)
The "unit" part shouldn't have bold style.
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/sub_menu.tmpl4
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl
index 2be7d47a1c..def6beccb9 100644
--- a/templates/repo/sub_menu.tmpl
+++ b/templates/repo/sub_menu.tmpl
@@ -15,7 +15,9 @@
</div>
{{end}}
<div class="item">
- <span>{{svg "octicon-database"}} <b>{{FileSize .Repository.Size}}</b></span>
+ {{$fileSizeFormatted := FileSize .Repository.Size}}{{/* the formatted string is always "{val} {unit}" */}}
+ {{$fileSizeFields := StringUtils.Split $fileSizeFormatted " "}}
+ <span>{{svg "octicon-database"}} <b>{{.locale.PrettyNumber (index $fileSizeFields 0)}}</b> {{index $fileSizeFields 1}}</span>
</div>
{{end}}
</div>