diff options
author | yp05327 <576951401@qq.com> | 2023-08-22 18:20:09 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-22 09:20:09 +0000 |
commit | 75689b8973ccf149b39f9b883fe312ca993ba6bc (patch) | |
tree | 6083e8fb706138ebe9dd888f3c88e5556d08c861 /templates | |
parent | c052f762667b6173944517df77b7d416f2b16c5e (diff) | |
download | gitea-75689b8973ccf149b39f9b883fe312ca993ba6bc.tar.gz gitea-75689b8973ccf149b39f9b883fe312ca993ba6bc.zip |
Improve repo sub menu (#26531)
Before:

After:

Icons are not in the middle of the line.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/sub_menu.tmpl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/sub_menu.tmpl b/templates/repo/sub_menu.tmpl index 27b707d332..da5f37fa05 100644 --- a/templates/repo/sub_menu.tmpl +++ b/templates/repo/sub_menu.tmpl @@ -4,20 +4,20 @@ <div class="ui two horizontal center list"> {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}} <div class="item{{if .PageIsCommits}} active{{end}}"> - <a href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}">{{svg "octicon-history"}} <b>{{.locale.PrettyNumber .CommitsCount}}</b> {{.locale.TrN .CommitsCount "repo.commit" "repo.commits"}}</a> + <a class="flex-text-inline" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}">{{svg "octicon-history"}} <b>{{.locale.PrettyNumber .CommitsCount}}</b> {{.locale.TrN .CommitsCount "repo.commit" "repo.commits"}}</a> </div> <div class="item{{if .PageIsBranches}} active{{end}}"> - <a href="{{.RepoLink}}/branches">{{svg "octicon-git-branch"}} <b>{{.locale.PrettyNumber .BranchesCount}}</b> {{.locale.TrN .BranchesCount "repo.branch" "repo.branches"}}</a> + <a class="flex-text-inline" href="{{.RepoLink}}/branches">{{svg "octicon-git-branch"}} <b>{{.locale.PrettyNumber .BranchesCount}}</b> {{.locale.TrN .BranchesCount "repo.branch" "repo.branches"}}</a> </div> {{if $.Permission.CanRead $.UnitTypeCode}} <div class="item{{if .PageIsTagList}} active{{end}}"> - <a href="{{.RepoLink}}/tags">{{svg "octicon-tag"}} <b>{{.locale.PrettyNumber .NumTags}}</b> {{.locale.TrN .NumTags "repo.tag" "repo.tags"}}</a> + <a class="flex-text-inline" href="{{.RepoLink}}/tags">{{svg "octicon-tag"}} <b>{{.locale.PrettyNumber .NumTags}}</b> {{.locale.TrN .NumTags "repo.tag" "repo.tags"}}</a> </div> {{end}} <div class="item" {{if not (eq .Repository.Size 0)}}data-tooltip-content="{{.Repository.SizeDetailsString}}"{{end}}> {{$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> + <span class="flex-text-inline">{{svg "octicon-database"}} <b>{{.locale.PrettyNumber (index $fileSizeFields 0)}}</b> {{index $fileSizeFields 1}}</span> </div> {{end}} </div> |