mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-05 14:45:28 +01:00
## Summary Replace combinations of `tw-flex tw-items-center` (with optional `tw-gap-*`) with semantic `flex-text-block` or `flex-text-inline` classes across 15 template files. This follows the refactoring direction outlined in #35015 ("Refactor legacy `tw-flex tw-items-center tw-gap-xx` to `flex-text-block` or `flex-text-inline`"). ## Changes ### Replacement rules applied: - `tw-flex tw-items-center tw-gap-2` → `flex-text-block` (both have `gap: 0.5rem`) - `tw-flex tw-items-center tw-gap-1` → `flex-text-inline` (both have `gap: 0.25rem`) - `tw-flex tw-items-center` (no explicit gap) → `flex-text-block` where the element is block-level and children benefit from the default gap - `tw-flex tw-items-center` (inline context, e.g. `<a>`, `<span>`) → `flex-text-inline` ### Files modified (15): - `templates/admin/config.tmpl` — config page dt elements - `templates/admin/repo/unadopted.tmpl` — unadopted repo list items - `templates/base/head_navbar.tmpl` — active stopwatch popup - `templates/org/header.tmpl` — org header action buttons - `templates/org/home.tmpl` — member/team count links - `templates/org/settings/labels.tmpl` — labels page header - `templates/repo/branch/list.tmpl` — branch list header - `templates/repo/commits_table.tmpl` — commits table header - `templates/repo/diff/box.tmpl` — diff detail box - `templates/repo/diff/new_review.tmpl` — review form header - `templates/repo/issue/card.tmpl` — issue card unpin button - `templates/repo/issue/view_content/attachments.tmpl` — attachment file size - `templates/repo/migrate/migrate.tmpl` — migration service cards - `templates/shared/user/org_profile_avatar.tmpl` — org profile header - `templates/webhook/new.tmpl` — webhook type dropdown text ### What was NOT changed: - Elements with `tw-justify-between` or `tw-justify-center` (these need additional classes) - Elements whose children use explicit margins (`tw-mr-*`, `tw-ml-*`) that would conflict with the gap from flex-text classes - Fomantic UI form elements with special layout requirements ## Notes - This PR was created with AI assistance (Claude). All changes were reviewed individually to ensure semantic correctness and zero unintended visual changes. - No functional changes — purely CSS class refactoring. Closes: part of #35015 Signed-off-by: xiaox315 <xiaox315@users.noreply.github.com> Co-authored-by: xiaox315 <xiaox315@users.noreply.github.com>
33 lines
1.6 KiB
Handlebars
33 lines
1.6 KiB
Handlebars
<div class="ui container tw-flex">
|
|
{{ctx.AvatarUtils.Avatar .Org 100 "org-avatar"}}
|
|
<div id="org-info" class="tw-flex tw-flex-col tw-flex-1 tw-break-anywhere">
|
|
<div class="ui header">
|
|
{{.Org.DisplayName}}
|
|
<span class="org-visibility">
|
|
{{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}
|
|
{{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}}
|
|
</span>
|
|
<span class="flex-text-inline tw-ml-auto tw-text-16 tw-whitespace-nowrap">
|
|
{{if .EnableFeed}}
|
|
<a class="ui basic label button tw-mr-0" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">
|
|
{{svg "octicon-rss" 24}}
|
|
</a>
|
|
{{end}}
|
|
{{if .IsSigned}}
|
|
{{template "org/follow_unfollow" .}}
|
|
{{end}}
|
|
</span>
|
|
</div>
|
|
{{if .RenderedDescription}}<div class="render-content markup">{{.RenderedDescription}}</div>{{end}}
|
|
<div class="tw-text-text-light meta tw-mt-1">
|
|
{{if .Org.Location}}<div class="flex-text-block">{{svg "octicon-location"}} <span>{{.Org.Location}}</span></div>{{end}}
|
|
{{if .Org.Website}}<div class="flex-text-block">{{svg "octicon-link"}} <a class="muted" target="_blank" rel="me" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
|
|
{{if .IsSigned}}
|
|
{{if .Org.Email}}<div class="flex-text-block">{{svg "octicon-mail"}} <a class="muted" href="mailto:{{.Org.Email}}">{{.Org.Email}}</a></div>{{end}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{template "org/menu" .}}
|