You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sub_menu.tmpl 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {{if and (not .HideRepoInfo) (not .IsBlame)}}
  2. <div class="ui segments repository-summary{{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats}} repository-summary-language-stats{{end}} mt-2 mb-0">
  3. <div class="ui segment sub-menu repository-menu">
  4. <div class="ui two horizontal center link list">
  5. {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}}
  6. <div class="item{{if .PageIsCommits}} active{{end}}">
  7. <a class="ui" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}">{{svg "octicon-history"}} <b>{{JsPrettyNumber .CommitsCount}}</b> {{.locale.TrN .CommitsCount "repo.commit" "repo.commits"}}</a>
  8. </div>
  9. <div class="item{{if .PageIsBranches}} active{{end}}">
  10. <a class="ui" href="{{.RepoLink}}/branches">{{svg "octicon-git-branch"}} <b>{{.BranchesCount}}</b> {{.locale.TrN .BranchesCount "repo.branch" "repo.branches"}}</a>
  11. </div>
  12. {{if $.Permission.CanRead $.UnitTypeCode}}
  13. <div class="item">
  14. <a class="ui" href="{{.RepoLink}}/tags">{{svg "octicon-tag"}} <b>{{.NumTags}}</b> {{.locale.TrN .NumTags "repo.tag" "repo.tags"}}</a>
  15. </div>
  16. {{end}}
  17. <div class="item">
  18. <span class="ui">{{svg "octicon-database"}} <b>{{FileSize .Repository.Size}}</b></span>
  19. </div>
  20. {{end}}
  21. </div>
  22. </div>
  23. {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats}}
  24. <div class="ui segment sub-menu language-stats-details" style="display: none">
  25. <div class="ui horizontal center link list">
  26. {{range .LanguageStats}}
  27. <div class="item df ac jc">
  28. <i class="color-icon mr-3" style="background-color: {{.Color}}"></i>
  29. <span class="bold mr-3">
  30. {{if eq .Language "other"}}
  31. {{$.locale.Tr "repo.language_other"}}
  32. {{else}}
  33. {{.Language}}
  34. {{end}}
  35. </span>
  36. {{.Percentage}}%
  37. </div>
  38. {{end}}
  39. </div>
  40. </div>
  41. <a class="ui segment language-stats">
  42. {{range .LanguageStats}}
  43. <div class="bar tooltip" style="width: {{.Percentage}}%; background-color: {{.Color}}" data-placement="top" data-content={{.Language}}>&nbsp;</div>
  44. {{end}}
  45. </a>
  46. {{end}}
  47. </div>
  48. {{end}}