mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-15 09:47:39 +08:00
faf5705d29
Move some components (description, license, release, language stats) to sidebar --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
60 lines
1.8 KiB
Handlebars
60 lines
1.8 KiB
Handlebars
<div class="flex-list">
|
|
{{if .LatestRelease}}
|
|
<div class="flex-item">
|
|
<div class="flex-item-main">
|
|
<div class="flex-item-title">
|
|
<a class="item muted" href="{{.Link}}/releases">
|
|
{{ctx.Locale.Tr "repo.releases"}}
|
|
<span class="ui small label">{{.NumReleases}}</span>
|
|
</a>
|
|
</div>
|
|
<div class="flex-item">
|
|
<div class="flex-item-icon">
|
|
{{svg "octicon-tag" 16}}
|
|
</div>
|
|
<div class="flex-item-main">
|
|
<div class="flex-item-header">
|
|
<div class="flex-item-title tw-gap-2">
|
|
<a class="gt-ellipsis muted" href="{{.LatestRelease.Link}}" title="{{.LatestRelease.Title}}">{{.LatestRelease.Title}}</a>
|
|
<span class="ui basic green label tw-h-100">{{ctx.Locale.Tr "latest"}}</span>
|
|
</div>
|
|
</div>
|
|
<div class="flex-item-body">
|
|
<span class="time">{{DateUtils.TimeSince .LatestRelease.CreatedUnix}}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
|
|
{{if and (not .IsEmptyRepo) .LanguageStats}}
|
|
<div class="flex-item">
|
|
<div class="flex-item-main">
|
|
<div class="flex-item-title">
|
|
{{ctx.Locale.Tr "repo.repo_lang"}}
|
|
</div>
|
|
|
|
<div class="flex-item-body">
|
|
<div class="language-stats">
|
|
{{range .LanguageStats}}
|
|
<div class="bar" style="width: {{.Percentage}}%; background-color: {{.Color}}" data-tooltip-placement="top" data-tooltip-content={{.Language}} data-tooltip-follow-cursor="horizontal"></div>
|
|
{{end}}
|
|
</div>
|
|
<div class="language-stats-details">
|
|
{{range .LanguageStats}}
|
|
<div class="item">
|
|
<i class="color-icon" style="background-color: {{.Color}}"></i>
|
|
<span class="tw-font-semibold">
|
|
{{Iif (eq .Language "other") (ctx.Locale.Tr "repo.language_other") .Language}}
|
|
</span>
|
|
{{.Percentage}}%
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|