mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-23 05:42:33 +09:00
Purpose: 1. Make the whole code base have unified "item" layout 2. Clarify our "list" styles: "flex-relaxed-list", "flex-divided-list" 3. Prepare to replace legacy "ui relaxed list" * https://github.com/go-gitea/gitea/pull/37445#discussion_r3144458865 4. Prepare for refactoring the "pull merge box", it needs the "flex-divided-list" * related to "Refactor pull request view (*)" like #37451 5. Fix legacy abuses of "flex-list", e.g.: repo home sidebar
48 lines
1.6 KiB
Handlebars
48 lines
1.6 KiB
Handlebars
<div class="repo-home-sidebar-bottom flex-relaxed-list">
|
|
{{if .LatestRelease}}
|
|
<div class="divider"></div>
|
|
<div class="repo-home-sidebar-header">
|
|
<a class="item muted" href="{{.RepoLink}}/releases">
|
|
{{ctx.Locale.Tr "repo.releases"}}
|
|
</a>
|
|
<span class="ui small label">{{.NumReleases}}</span>
|
|
</div>
|
|
<div class="flex-relaxed-list">
|
|
<div class="flex-text-block">
|
|
<div>{{svg "octicon-tag"}}</div>
|
|
<a class="gt-ellipsis muted" href="{{.LatestRelease.Link}}" title="{{.LatestRelease.Title}}">{{.LatestRelease.Title}}</a>
|
|
<div class="tw-shrink-0">
|
|
{{template "repo/release/label" (dict "Release" .LatestRelease "IsLatest" true)}}
|
|
</div>
|
|
</div>
|
|
<div class="tw-ml-[24px]">{{DateUtils.TimeSince .LatestRelease.CreatedUnix}}</div>
|
|
</div>
|
|
{{end}}
|
|
|
|
{{if and (not .IsEmptyRepo) .LanguageStats}}
|
|
<div class="divider"></div>
|
|
<div class="repo-home-sidebar-header">
|
|
{{ctx.Locale.Tr "repo.repo_lang"}}
|
|
</div>
|
|
|
|
<div>
|
|
<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>
|
|
<strong class="tw-font-semibold">
|
|
{{Iif (eq .Language "other") (ctx.Locale.Tr "repo.language_other") .Language}}
|
|
</strong>
|
|
{{.Percentage}}%
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|