code.gitea.io/gitea@v1.22.3/templates/repo/sub_menu.tmpl (about) 1 {{if and (not .HideRepoInfo) (not .IsBlame)}} 2 <div class="ui segments repository-summary tw-mt-1 tw-mb-0"> 3 <div class="ui segment sub-menu repository-menu"> 4 {{if and (.Permission.CanRead ctx.Consts.RepoUnitTypeCode) (not .IsEmptyRepo)}} 5 <a class="item muted {{if .PageIsCommits}}active{{end}}" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}"> 6 {{svg "octicon-history"}} <b>{{ctx.Locale.PrettyNumber .CommitsCount}}</b> {{ctx.Locale.TrN .CommitsCount "repo.commit" "repo.commits"}} 7 </a> 8 <a class="item muted {{if .PageIsBranches}}active{{end}}" href="{{.RepoLink}}/branches"> 9 {{svg "octicon-git-branch"}} <b>{{ctx.Locale.PrettyNumber .BranchesCount}}</b> {{ctx.Locale.TrN .BranchesCount "repo.branch" "repo.branches"}} 10 </a> 11 {{if $.Permission.CanRead ctx.Consts.RepoUnitTypeCode}} 12 <a class="item muted {{if .PageIsTagList}}active{{end}}" href="{{.RepoLink}}/tags"> 13 {{svg "octicon-tag"}} <b>{{ctx.Locale.PrettyNumber .NumTags}}</b> {{ctx.Locale.TrN .NumTags "repo.tag" "repo.tags"}} 14 </a> 15 {{end}} 16 <span class="item not-mobile" {{if not (eq .Repository.Size 0)}}data-tooltip-content="{{.Repository.SizeDetailsString}}"{{end}}> 17 {{$fileSizeFormatted := FileSize .Repository.Size}}{{/* the formatted string is always "{val} {unit}" */}} 18 {{$fileSizeFields := StringUtils.Split $fileSizeFormatted " "}} 19 {{svg "octicon-database"}} <b>{{ctx.Locale.PrettyNumber (index $fileSizeFields 0)}}</b> {{index $fileSizeFields 1}} 20 </span> 21 {{end}} 22 </div> 23 {{if and (.Permission.CanRead ctx.Consts.RepoUnitTypeCode) (not .IsEmptyRepo) .LanguageStats}} 24 <div class="ui segment sub-menu language-stats-details tw-hidden"> 25 {{range .LanguageStats}} 26 <div class="item"> 27 <i class="color-icon" style="background-color: {{.Color}}"></i> 28 <span class="tw-font-semibold"> 29 {{if eq .Language "other"}} 30 {{ctx.Locale.Tr "repo.language_other"}} 31 {{else}} 32 {{.Language}} 33 {{end}} 34 </span> 35 {{.Percentage}}% 36 </div> 37 {{end}} 38 </div> 39 <a class="ui segment language-stats show-panel toggle" data-panel=".repository-summary > .sub-menu"> 40 {{range .LanguageStats}} 41 <div class="bar" style="width: {{.Percentage}}%; background-color: {{.Color}}" data-tooltip-placement="top" data-tooltip-content={{.Language}} data-tooltip-follow-cursor="horizontal"></div> 42 {{end}} 43 </a> 44 {{end}} 45 </div> 46 {{end}}