mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Replace 10 more gt- classes with tw- (#29945)
Likely the biggest change of the tailwind refactors. Only thing of note is that `tw-flex-1` resolves to `flex: 1 1 0%` while our `gt-f1` was `flex: 1 1 0`, I don't think it will make any difference. Commands I've ran: ```sh perl -p -i -e 's#gt-vm#tw-align-middle#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-fw#tw-flex-wrap#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-f1#tw-flex-1#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-fc#tw-flex-col#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-sb#tw-justify-between#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-je#tw-justify-end#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-jc#tw-justify-center#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-ac#tw-content-center#g' web_src/js/**/* templates/**/* models/**/* tests/**/* perl -p -i -e 's#gt-df#tw-flex#g' web_src/js/**/* templates/**/* models/**/* tests/**/* perl -p -i -e 's#gt-dib#tw-inline-block#g' web_src/js/**/* templates/**/* models/**/* tests/**/* Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -12,11 +12,11 @@
|
||||
<p>
|
||||
{{ctx.Locale.Tr "repo.settings.default_branch_desc"}}
|
||||
</p>
|
||||
<form class="gt-df" action="{{.Link}}" method="post">
|
||||
<form class="tw-flex" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="default_branch">
|
||||
{{if not .Repository.IsEmpty}}
|
||||
<div class="ui dropdown selection search gt-f1 gt-mr-3 tw-max-w-96">
|
||||
<div class="ui dropdown selection search tw-flex-1 gt-mr-3 tw-max-w-96">
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
<input type="hidden" name="branch" value="{{.Repository.DefaultBranch}}">
|
||||
<div class="default text">{{.Repository.DefaultBranch}}</div>
|
||||
@@ -41,7 +41,7 @@
|
||||
<div class="ui attached segment">
|
||||
<div class="flex-list">
|
||||
{{range .ProtectedBranches}}
|
||||
<div class="flex-item gt-ac">
|
||||
<div class="flex-item tw-content-center">
|
||||
<div class="flex-item-main">
|
||||
<div class="flex-item-title">
|
||||
<div class="ui basic primary label">{{.RuleName}}</div>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<div class="ui attached segment">
|
||||
<div class="flex-list">
|
||||
{{range .Collaborators}}
|
||||
<div class="flex-item gt-ac">
|
||||
<div class="flex-item tw-content-center">
|
||||
<div class="flex-item-leading">
|
||||
<a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 32}}</a>
|
||||
</div>
|
||||
@@ -41,7 +41,7 @@
|
||||
<div class="ui bottom attached segment">
|
||||
<form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div id="search-user-box" class="ui search input gt-vm">
|
||||
<div id="search-user-box" class="ui search input tw-align-middle">
|
||||
<input class="prompt" name="collaborator" placeholder="{{ctx.Locale.Tr "search.team_kind"}}" autocomplete="off" autofocus required>
|
||||
</div>
|
||||
<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.add_collaborator"}}</button>
|
||||
@@ -89,7 +89,7 @@
|
||||
{{if $allowedToChangeTeams}}
|
||||
<form class="ui form" id="repo-collab-team-form" action="{{.Link}}/team" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div id="search-team-box" class="ui search input gt-vm" data-org-name="{{.OrgName}}">
|
||||
<div id="search-team-box" class="ui search input tw-align-middle" data-org-name="{{.OrgName}}">
|
||||
<input class="prompt" name="team" placeholder="{{ctx.Locale.Tr "search.team_kind"}}" autocomplete="off" autofocus required>
|
||||
</div>
|
||||
<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.add_team"}}</button>
|
||||
|
@@ -11,7 +11,7 @@
|
||||
{{range .Hooks}}
|
||||
<div class="item truncated-item-container">
|
||||
<span class="text {{if .IsActive}}green{{else}}grey{{end}} gt-mr-3">{{svg "octicon-dot-fill" 22}}</span>
|
||||
<span class="text truncate gt-f1 gt-mr-3">{{.Name}}</span>
|
||||
<span class="text truncate tw-flex-1 gt-mr-3">{{.Name}}</span>
|
||||
<a class="muted tw-float-right gt-p-3" href="{{$.RepoLink}}/settings/hooks/git/{{.Name|PathEscape}}">
|
||||
{{svg "octicon-pencil"}}
|
||||
</a>
|
||||
|
@@ -132,7 +132,7 @@
|
||||
<td>{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}</td>
|
||||
<td>{{DateTime "full" .PullMirror.UpdatedUnix}}</td>
|
||||
<td class="right aligned">
|
||||
<form method="post" class="gt-dib">
|
||||
<form method="post" class="tw-inline-block">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="mirror-sync">
|
||||
<button class="ui primary tiny button inline text-thin">{{ctx.Locale.Tr "repo.settings.sync_mirror"}}</button>
|
||||
@@ -230,13 +230,13 @@
|
||||
>
|
||||
{{svg "octicon-pencil" 14}}
|
||||
</button>
|
||||
<form method="post" class="gt-dib">
|
||||
<form method="post" class="tw-inline-block">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="push-mirror-sync">
|
||||
<input type="hidden" name="push_mirror_id" value="{{.ID}}">
|
||||
<button class="ui primary tiny button" data-tooltip-content="{{ctx.Locale.Tr "repo.settings.sync_mirror"}}">{{svg "octicon-sync" 14}}</button>
|
||||
</form>
|
||||
<form method="post" class="gt-dib">
|
||||
<form method="post" class="tw-inline-block">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<input type="hidden" name="action" value="push-mirror-remove">
|
||||
<input type="hidden" name="push_mirror_id" value="{{.ID}}">
|
||||
@@ -837,7 +837,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{{if not .Repository.IsMirror}}
|
||||
<div class="flex-item gt-ac">
|
||||
<div class="flex-item tw-content-center">
|
||||
<div class="flex-item-main">
|
||||
{{if .Repository.IsArchived}}
|
||||
<div class="flex-item-title">{{ctx.Locale.Tr "repo.settings.unarchive.header"}}</div>
|
||||
|
@@ -106,7 +106,7 @@
|
||||
</td>
|
||||
<td class="right aligned">
|
||||
<a class="ui tiny primary button" href="{{$.RepoLink}}/settings/tags/{{.ID}}">{{ctx.Locale.Tr "edit"}}</a>
|
||||
<form class="gt-dib" action="{{$.RepoLink}}/settings/tags/delete" method="post">
|
||||
<form class="tw-inline-block" action="{{$.RepoLink}}/settings/tags/delete" method="post">
|
||||
{{$.CsrfTokenHtml}}
|
||||
<input type="hidden" name="id" value="{{.ID}}">
|
||||
<button class="ui tiny red button">{{ctx.Locale.Tr "remove"}}</button>
|
||||
|
@@ -15,7 +15,7 @@
|
||||
{{range .Webhooks}}
|
||||
<div class="item truncated-item-container">
|
||||
<span class="text {{if eq .LastStatus 1}}green{{else if eq .LastStatus 2}}red{{else}}grey{{end}} gt-mr-3">{{svg "octicon-dot-fill" 22}}</span>
|
||||
<div class="text truncate gt-f1 gt-mr-3">
|
||||
<div class="text truncate tw-flex-1 gt-mr-3">
|
||||
<a title="{{.URL}}" href="{{$.BaseLink}}/{{.ID}}">{{.URL}}</a>
|
||||
</div>
|
||||
<a class="muted gt-p-3" href="{{$.BaseLink}}/{{.ID}}">{{svg "octicon-pencil"}}</a>
|
||||
|
@@ -17,7 +17,7 @@
|
||||
<div class="ui list">
|
||||
{{range .History}}
|
||||
<div class="item">
|
||||
<div class="flex-text-block gt-sb">
|
||||
<div class="flex-text-block tw-justify-between">
|
||||
<div class="flex-text-inline">
|
||||
{{if .IsSucceed}}
|
||||
<span class="text green">{{svg "octicon-check"}}</span>
|
||||
|
Reference in New Issue
Block a user