Skip to content

Commit 82e102f

Browse files
authored
Replace more gt- with tw- (#29678)
This will conclude the trivial class replacements.
1 parent 0c273f1 commit 82e102f

File tree

8 files changed

+17
-40
lines changed

8 files changed

+17
-40
lines changed

services/auth/source/oauth2/providers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (p *AuthSourceProvider) DisplayName() string {
5959

6060
func (p *AuthSourceProvider) IconHTML(size int) template.HTML {
6161
if p.iconURL != "" {
62-
img := fmt.Sprintf(`<img class="gt-object-contain gt-mr-3" width="%d" height="%d" src="%s" alt="%s">`,
62+
img := fmt.Sprintf(`<img class="tw-object-contain gt-mr-3" width="%d" height="%d" src="%s" alt="%s">`,
6363
size,
6464
size,
6565
html.EscapeString(p.iconURL), html.EscapeString(p.DisplayName()),

templates/repo/commit_statuses.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{if .Statuses}}
22
{{if and (eq (len .Statuses) 1) .Status.TargetURL}}
3-
<a class="gt-vm {{.AdditionalClasses}} gt-no-underline" data-tippy="commit-statuses" href="{{.Status.TargetURL}}">
3+
<a class="gt-vm {{.AdditionalClasses}} tw-no-underline" data-tippy="commit-statuses" href="{{.Status.TargetURL}}">
44
{{template "repo/commit_status" .Status}}
55
</a>
66
{{else}}

templates/repo/issue/view_content/comments.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
</div>
8181
{{else if eq .Type 1}}
8282
<div class="timeline-item event" id="{{.HashTag}}">
83-
<span class="badge gt-bg-green gt-text-white">{{svg "octicon-dot-fill"}}</span>
83+
<span class="badge tw-bg-green tw-text-white">{{svg "octicon-dot-fill"}}</span>
8484
{{if not .OriginalAuthor}}
8585
{{template "shared/user/avatarlink" dict "user" .Poster}}
8686
{{end}}
@@ -95,7 +95,7 @@
9595
</div>
9696
{{else if eq .Type 2}}
9797
<div class="timeline-item event" id="{{.HashTag}}">
98-
<span class="badge gt-bg-red gt-text-white">{{svg "octicon-circle-slash"}}</span>
98+
<span class="badge tw-bg-red tw-text-white">{{svg "octicon-circle-slash"}}</span>
9999
{{if not .OriginalAuthor}}
100100
{{template "shared/user/avatarlink" dict "user" .Poster}}
101101
{{end}}
@@ -110,7 +110,7 @@
110110
</div>
111111
{{else if eq .Type 28}}
112112
<div class="timeline-item event" id="{{.HashTag}}">
113-
<span class="badge gt-bg-purple gt-text-white">{{svg "octicon-git-merge"}}</span>
113+
<span class="badge tw-bg-purple tw-text-white">{{svg "octicon-git-merge"}}</span>
114114
{{if not .OriginalAuthor}}
115115
{{template "shared/user/avatarlink" dict "user" .Poster}}
116116
{{end}}
@@ -379,7 +379,7 @@
379379
{{ctx.AvatarUtils.Avatar .Poster 40}}
380380
</a>
381381
{{end}}
382-
<span class="badge{{if eq .Review.Type 1}} gt-bg-green gt-text-white{{else if eq .Review.Type 3}} gt-bg-red gt-text-white{{end}}">{{svg (printf "octicon-%s" .Review.Type.Icon)}}</span>
382+
<span class="badge{{if eq .Review.Type 1}} tw-bg-green tw-text-white{{else if eq .Review.Type 3}} tw-bg-red tw-text-white{{end}}">{{svg (printf "octicon-%s" .Review.Type.Icon)}}</span>
383383
<span class="text grey muted-links">
384384
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
385385
{{if eq .Review.Type 1}}

templates/repo/pulse.tmpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
{{end}}
109109

110110
{{if gt .Activity.PublishedReleaseCount 0}}
111-
<h4 class="divider divider-text gt-normal-case" id="published-releases">
111+
<h4 class="divider divider-text tw-normal-case" id="published-releases">
112112
{{svg "octicon-tag" 16 "gt-mr-3"}}
113113
{{ctx.Locale.Tr "repo.activity.title.releases_published_by"
114114
(ctx.Locale.TrN .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n" .Activity.PublishedReleaseCount)
@@ -130,7 +130,7 @@
130130
{{end}}
131131

132132
{{if gt .Activity.MergedPRCount 0}}
133-
<h4 class="divider divider-text gt-normal-case" id="merged-pull-requests">
133+
<h4 class="divider divider-text tw-normal-case" id="merged-pull-requests">
134134
{{svg "octicon-git-pull-request" 16 "gt-mr-3"}}
135135
{{ctx.Locale.Tr "repo.activity.title.prs_merged_by"
136136
(ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.MergedPRCount)
@@ -149,7 +149,7 @@
149149
{{end}}
150150

151151
{{if gt .Activity.OpenedPRCount 0}}
152-
<h4 class="divider divider-text gt-normal-case" id="proposed-pull-requests">
152+
<h4 class="divider divider-text tw-normal-case" id="proposed-pull-requests">
153153
{{svg "octicon-git-branch" 16 "gt-mr-3"}}
154154
{{ctx.Locale.Tr "repo.activity.title.prs_opened_by"
155155
(ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.OpenedPRCount)
@@ -168,7 +168,7 @@
168168
{{end}}
169169

170170
{{if gt .Activity.ClosedIssueCount 0}}
171-
<h4 class="divider divider-text gt-normal-case" id="closed-issues">
171+
<h4 class="divider divider-text tw-normal-case" id="closed-issues">
172172
{{svg "octicon-issue-closed" 16 "gt-mr-3"}}
173173
{{ctx.Locale.Tr "repo.activity.title.issues_closed_from"
174174
(ctx.Locale.TrN .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.ClosedIssueCount)
@@ -187,7 +187,7 @@
187187
{{end}}
188188

189189
{{if gt .Activity.OpenedIssueCount 0}}
190-
<h4 class="divider divider-text gt-normal-case" id="new-issues">
190+
<h4 class="divider divider-text tw-normal-case" id="new-issues">
191191
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
192192
{{ctx.Locale.Tr "repo.activity.title.issues_created_by"
193193
(ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.OpenedIssueCount)
@@ -206,7 +206,7 @@
206206
{{end}}
207207

208208
{{if gt .Activity.UnresolvedIssueCount 0}}
209-
<h4 class="divider divider-text gt-normal-case" id="unresolved-conversations" data-tooltip-content="{{ctx.Locale.Tr "repo.activity.unresolved_conv_desc"}}">
209+
<h4 class="divider divider-text tw-normal-case" id="unresolved-conversations" data-tooltip-content="{{ctx.Locale.Tr "repo.activity.unresolved_conv_desc"}}">
210210
{{svg "octicon-comment-discussion" 16 "gt-mr-3"}}
211211
{{ctx.Locale.TrN .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n" .Activity.UnresolvedIssueCount}}
212212
</h4>

templates/shared/issuelist.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<div class="flex-item-main">
1414
<div class="flex-item-header">
1515
<div class="flex-item-title">
16-
<a class="gt-no-underline issue-title" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">{{RenderEmoji $.Context .Title | RenderCodeBlock}}</a>
16+
<a class="tw-no-underline issue-title" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">{{RenderEmoji $.Context .Title | RenderCodeBlock}}</a>
1717
{{if .IsPull}}
1818
{{if (index $.CommitStatuses .PullRequest.ID)}}
1919
{{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (index $.CommitStatuses .PullRequest.ID)}}
@@ -36,15 +36,15 @@
3636
{{if .Assignees}}
3737
<div class="text grey">
3838
{{range .Assignees}}
39-
<a class="ui assignee gt-no-underline" href="{{.HomeLink}}" data-tooltip-content="{{.GetDisplayName}}">
39+
<a class="ui assignee tw-no-underline" href="{{.HomeLink}}" data-tooltip-content="{{.GetDisplayName}}">
4040
{{ctx.AvatarUtils.Avatar . 20}}
4141
</a>
4242
{{end}}
4343
</div>
4444
{{end}}
4545
{{if .NumComments}}
4646
<div class="text grey">
47-
<a class="gt-no-underline muted flex-text-block" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
47+
<a class="tw-no-underline muted flex-text-block" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
4848
{{svg "octicon-comment" 16}}{{.NumComments}}
4949
</a>
5050
</div>

templates/user/dashboard/issues.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="ui container">
55
<div class="flex-container">
66
<div class="flex-container-nav">
7-
<div class="ui secondary vertical filter menu gt-bg-transparent">
7+
<div class="ui secondary vertical filter menu tw-bg-transparent">
88
<a class="{{if eq .ViewType "your_repositories"}}active{{end}} item" href="{{.Link}}?type=your_repositories&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
99
{{ctx.Locale.Tr "home.issues.in_your_repos"}}
1010
<strong>{{CountFmt .IssueStats.YourRepositoriesCount}}</strong>

templates/user/dashboard/milestones.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="ui container">
55
<div class="flex-container">
66
<div class="flex-container-nav">
7-
<div class="ui secondary vertical filter menu gt-bg-transparent">
7+
<div class="ui secondary vertical filter menu tw-bg-transparent">
88
<div class="item">
99
{{ctx.Locale.Tr "home.issues.in_your_repos"}}
1010
<strong>{{.Total}}</strong>

web_src/css/helpers.css

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ Gitea's private styles use `g-` prefix.
4646
text-overflow: ellipsis;
4747
}
4848

49-
/* below class names match Tailwind CSS */
50-
.gt-object-contain { object-fit: contain !important; }
51-
.gt-no-underline { text-decoration-line: none !important; }
52-
.gt-normal-case { text-transform: none !important; }
53-
.gt-italic { font-style: italic !important; }
54-
5549
.gt-font-light { font-weight: var(--font-weight-light) !important; }
5650
.gt-font-normal { font-weight: var(--font-weight-normal) !important; }
5751
.gt-font-medium { font-weight: var(--font-weight-medium) !important; }
@@ -70,23 +64,6 @@ Gitea's private styles use `g-` prefix.
7064
.gt-border-secondary-left { border-left: 1px solid var(--color-secondary) !important; }
7165
.gt-border-secondary-right { border-right: 1px solid var(--color-secondary) !important; }
7266

73-
.gt-bg-red { background: var(--color-red) !important; }
74-
.gt-bg-orange { background: var(--color-orange) !important; }
75-
.gt-bg-yellow { background: var(--color-yellow) !important; }
76-
.gt-bg-olive { background: var(--color-olive) !important; }
77-
.gt-bg-green { background: var(--color-green) !important; }
78-
.gt-bg-teal { background: var(--color-teal) !important; }
79-
.gt-bg-blue { background: var(--color-blue) !important; }
80-
.gt-bg-violet { background: var(--color-violet) !important; }
81-
.gt-bg-purple { background: var(--color-purple) !important; }
82-
.gt-bg-pink { background: var(--color-pink) !important; }
83-
.gt-bg-brown { background: var(--color-brown) !important; }
84-
.gt-bg-grey { background: var(--color-grey) !important; }
85-
.gt-bg-gold { background: var(--color-gold) !important; }
86-
.gt-bg-transparent { background: transparent !important; }
87-
88-
.gt-text-white { color: var(--color-white) !important; }
89-
9067
.interact-fg { color: inherit !important; }
9168
.interact-fg:hover { color: var(--color-primary) !important; }
9269
.interact-fg:active { color: var(--color-primary-active) !important; }

0 commit comments

Comments
 (0)