gitea

Development moved to Codeberg

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