1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

Make repo size style matches others (commits/branches/tags) (#24408)

The "unit" part shouldn't have bold style.
This commit is contained in:
wxiaoguang
2023-04-29 05:23:19 +08:00
committed by GitHub
parent bc784a705b
commit bc4e06109d
4 changed files with 20 additions and 1 deletions

View File

@@ -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>