aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-03-08 22:02:05 +0100
committerGitHub <noreply@github.com>2024-03-08 22:02:05 +0100
commit82e102f8b09faf1ac2786ccad36d4a20fcb392b8 (patch)
tree34bf3845d05cd52bebaa16a7254bbf9f4301c169
parent0c273f12e0b5d6dc2b80e2e6b51b2deaf15608b1 (diff)
downloadgitea-82e102f8b09faf1ac2786ccad36d4a20fcb392b8.tar.gz
gitea-82e102f8b09faf1ac2786ccad36d4a20fcb392b8.zip
Replace more gt- with tw- (#29678)
This will conclude the trivial class replacements.
-rw-r--r--services/auth/source/oauth2/providers.go2
-rw-r--r--templates/repo/commit_statuses.tmpl2
-rw-r--r--templates/repo/issue/view_content/comments.tmpl8
-rw-r--r--templates/repo/pulse.tmpl12
-rw-r--r--templates/shared/issuelist.tmpl6
-rw-r--r--templates/user/dashboard/issues.tmpl2
-rw-r--r--templates/user/dashboard/milestones.tmpl2
-rw-r--r--web_src/css/helpers.css23
8 files changed, 17 insertions, 40 deletions
diff --git a/services/auth/source/oauth2/providers.go b/services/auth/source/oauth2/providers.go
index ac32647839..c3edae4ab6 100644
--- a/services/auth/source/oauth2/providers.go
+++ b/services/auth/source/oauth2/providers.go
@@ -59,7 +59,7 @@ func (p *AuthSourceProvider) DisplayName() string {
func (p *AuthSourceProvider) IconHTML(size int) template.HTML {
if p.iconURL != "" {
- img := fmt.Sprintf(`<img class="gt-object-contain gt-mr-3" width="%d" height="%d" src="%s" alt="%s">`,
+ img := fmt.Sprintf(`<img class="tw-object-contain gt-mr-3" width="%d" height="%d" src="%s" alt="%s">`,
size,
size,
html.EscapeString(p.iconURL), html.EscapeString(p.DisplayName()),
diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl
index 74c20a6a2c..b035e74c2f 100644
--- a/templates/repo/commit_statuses.tmpl
+++ b/templates/repo/commit_statuses.tmpl
@@ -1,6 +1,6 @@
{{if .Statuses}}
{{if and (eq (len .Statuses) 1) .Status.TargetURL}}
- <a class="gt-vm {{.AdditionalClasses}} gt-no-underline" data-tippy="commit-statuses" href="{{.Status.TargetURL}}">
+ <a class="gt-vm {{.AdditionalClasses}} tw-no-underline" data-tippy="commit-statuses" href="{{.Status.TargetURL}}">
{{template "repo/commit_status" .Status}}
</a>
{{else}}
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index 86cb716bb3..8bbcb1a54a 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -80,7 +80,7 @@
</div>
{{else if eq .Type 1}}
<div class="timeline-item event" id="{{.HashTag}}">
- <span class="badge gt-bg-green gt-text-white">{{svg "octicon-dot-fill"}}</span>
+ <span class="badge tw-bg-green tw-text-white">{{svg "octicon-dot-fill"}}</span>
{{if not .OriginalAuthor}}
{{template "shared/user/avatarlink" dict "user" .Poster}}
{{end}}
@@ -95,7 +95,7 @@
</div>
{{else if eq .Type 2}}
<div class="timeline-item event" id="{{.HashTag}}">
- <span class="badge gt-bg-red gt-text-white">{{svg "octicon-circle-slash"}}</span>
+ <span class="badge tw-bg-red tw-text-white">{{svg "octicon-circle-slash"}}</span>
{{if not .OriginalAuthor}}
{{template "shared/user/avatarlink" dict "user" .Poster}}
{{end}}
@@ -110,7 +110,7 @@
</div>
{{else if eq .Type 28}}
<div class="timeline-item event" id="{{.HashTag}}">
- <span class="badge gt-bg-purple gt-text-white">{{svg "octicon-git-merge"}}</span>
+ <span class="badge tw-bg-purple tw-text-white">{{svg "octicon-git-merge"}}</span>
{{if not .OriginalAuthor}}
{{template "shared/user/avatarlink" dict "user" .Poster}}
{{end}}
@@ -379,7 +379,7 @@
{{ctx.AvatarUtils.Avatar .Poster 40}}
</a>
{{end}}
- <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>
+ <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>
<span class="text grey muted-links">
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
{{if eq .Review.Type 1}}
diff --git a/templates/repo/pulse.tmpl b/templates/repo/pulse.tmpl
index e6a59ea8c6..5943ae0434 100644
--- a/templates/repo/pulse.tmpl
+++ b/templates/repo/pulse.tmpl
@@ -108,7 +108,7 @@
{{end}}
{{if gt .Activity.PublishedReleaseCount 0}}
- <h4 class="divider divider-text gt-normal-case" id="published-releases">
+ <h4 class="divider divider-text tw-normal-case" id="published-releases">
{{svg "octicon-tag" 16 "gt-mr-3"}}
{{ctx.Locale.Tr "repo.activity.title.releases_published_by"
(ctx.Locale.TrN .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n" .Activity.PublishedReleaseCount)
@@ -130,7 +130,7 @@
{{end}}
{{if gt .Activity.MergedPRCount 0}}
- <h4 class="divider divider-text gt-normal-case" id="merged-pull-requests">
+ <h4 class="divider divider-text tw-normal-case" id="merged-pull-requests">
{{svg "octicon-git-pull-request" 16 "gt-mr-3"}}
{{ctx.Locale.Tr "repo.activity.title.prs_merged_by"
(ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.MergedPRCount)
@@ -149,7 +149,7 @@
{{end}}
{{if gt .Activity.OpenedPRCount 0}}
- <h4 class="divider divider-text gt-normal-case" id="proposed-pull-requests">
+ <h4 class="divider divider-text tw-normal-case" id="proposed-pull-requests">
{{svg "octicon-git-branch" 16 "gt-mr-3"}}
{{ctx.Locale.Tr "repo.activity.title.prs_opened_by"
(ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.OpenedPRCount)
@@ -168,7 +168,7 @@
{{end}}
{{if gt .Activity.ClosedIssueCount 0}}
- <h4 class="divider divider-text gt-normal-case" id="closed-issues">
+ <h4 class="divider divider-text tw-normal-case" id="closed-issues">
{{svg "octicon-issue-closed" 16 "gt-mr-3"}}
{{ctx.Locale.Tr "repo.activity.title.issues_closed_from"
(ctx.Locale.TrN .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.ClosedIssueCount)
@@ -187,7 +187,7 @@
{{end}}
{{if gt .Activity.OpenedIssueCount 0}}
- <h4 class="divider divider-text gt-normal-case" id="new-issues">
+ <h4 class="divider divider-text tw-normal-case" id="new-issues">
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
{{ctx.Locale.Tr "repo.activity.title.issues_created_by"
(ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.OpenedIssueCount)
@@ -206,7 +206,7 @@
{{end}}
{{if gt .Activity.UnresolvedIssueCount 0}}
- <h4 class="divider divider-text gt-normal-case" id="unresolved-conversations" data-tooltip-content="{{ctx.Locale.Tr "repo.activity.unresolved_conv_desc"}}">
+ <h4 class="divider divider-text tw-normal-case" id="unresolved-conversations" data-tooltip-content="{{ctx.Locale.Tr "repo.activity.unresolved_conv_desc"}}">
{{svg "octicon-comment-discussion" 16 "gt-mr-3"}}
{{ctx.Locale.TrN .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n" .Activity.UnresolvedIssueCount}}
</h4>
diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl
index e8a0079c1c..a90188297f 100644
--- a/templates/shared/issuelist.tmpl
+++ b/templates/shared/issuelist.tmpl
@@ -13,7 +13,7 @@
<div class="flex-item-main">
<div class="flex-item-header">
<div class="flex-item-title">
- <a class="gt-no-underline issue-title" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">{{RenderEmoji $.Context .Title | RenderCodeBlock}}</a>
+ <a class="tw-no-underline issue-title" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">{{RenderEmoji $.Context .Title | RenderCodeBlock}}</a>
{{if .IsPull}}
{{if (index $.CommitStatuses .PullRequest.ID)}}
{{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (index $.CommitStatuses .PullRequest.ID)}}
@@ -36,7 +36,7 @@
{{if .Assignees}}
<div class="text grey">
{{range .Assignees}}
- <a class="ui assignee gt-no-underline" href="{{.HomeLink}}" data-tooltip-content="{{.GetDisplayName}}">
+ <a class="ui assignee tw-no-underline" href="{{.HomeLink}}" data-tooltip-content="{{.GetDisplayName}}">
{{ctx.AvatarUtils.Avatar . 20}}
</a>
{{end}}
@@ -44,7 +44,7 @@
{{end}}
{{if .NumComments}}
<div class="text grey">
- <a class="gt-no-underline muted flex-text-block" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
+ <a class="tw-no-underline muted flex-text-block" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
{{svg "octicon-comment" 16}}{{.NumComments}}
</a>
</div>
diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl
index fd5960c31e..7b7023cfaa 100644
--- a/templates/user/dashboard/issues.tmpl
+++ b/templates/user/dashboard/issues.tmpl
@@ -4,7 +4,7 @@
<div class="ui container">
<div class="flex-container">
<div class="flex-container-nav">
- <div class="ui secondary vertical filter menu gt-bg-transparent">
+ <div class="ui secondary vertical filter menu tw-bg-transparent">
<a class="{{if eq .ViewType "your_repositories"}}active{{end}} item" href="{{.Link}}?type=your_repositories&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
{{ctx.Locale.Tr "home.issues.in_your_repos"}}
<strong>{{CountFmt .IssueStats.YourRepositoriesCount}}</strong>
diff --git a/templates/user/dashboard/milestones.tmpl b/templates/user/dashboard/milestones.tmpl
index 737a0f7e2b..7cde02291b 100644
--- a/templates/user/dashboard/milestones.tmpl
+++ b/templates/user/dashboard/milestones.tmpl
@@ -4,7 +4,7 @@
<div class="ui container">
<div class="flex-container">
<div class="flex-container-nav">
- <div class="ui secondary vertical filter menu gt-bg-transparent">
+ <div class="ui secondary vertical filter menu tw-bg-transparent">
<div class="item">
{{ctx.Locale.Tr "home.issues.in_your_repos"}}
<strong>{{.Total}}</strong>
diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css
index dad0f9b127..860722823a 100644
--- a/web_src/css/helpers.css
+++ b/web_src/css/helpers.css
@@ -46,12 +46,6 @@ Gitea's private styles use `g-` prefix.
text-overflow: ellipsis;
}
-/* below class names match Tailwind CSS */
-.gt-object-contain { object-fit: contain !important; }
-.gt-no-underline { text-decoration-line: none !important; }
-.gt-normal-case { text-transform: none !important; }
-.gt-italic { font-style: italic !important; }
-
.gt-font-light { font-weight: var(--font-weight-light) !important; }
.gt-font-normal { font-weight: var(--font-weight-normal) !important; }
.gt-font-medium { font-weight: var(--font-weight-medium) !important; }
@@ -70,23 +64,6 @@ Gitea's private styles use `g-` prefix.
.gt-border-secondary-left { border-left: 1px solid var(--color-secondary) !important; }
.gt-border-secondary-right { border-right: 1px solid var(--color-secondary) !important; }
-.gt-bg-red { background: var(--color-red) !important; }
-.gt-bg-orange { background: var(--color-orange) !important; }
-.gt-bg-yellow { background: var(--color-yellow) !important; }
-.gt-bg-olive { background: var(--color-olive) !important; }
-.gt-bg-green { background: var(--color-green) !important; }
-.gt-bg-teal { background: var(--color-teal) !important; }
-.gt-bg-blue { background: var(--color-blue) !important; }
-.gt-bg-violet { background: var(--color-violet) !important; }
-.gt-bg-purple { background: var(--color-purple) !important; }
-.gt-bg-pink { background: var(--color-pink) !important; }
-.gt-bg-brown { background: var(--color-brown) !important; }
-.gt-bg-grey { background: var(--color-grey) !important; }
-.gt-bg-gold { background: var(--color-gold) !important; }
-.gt-bg-transparent { background: transparent !important; }
-
-.gt-text-white { color: var(--color-white) !important; }
-
.interact-fg { color: inherit !important; }
.interact-fg:hover { color: var(--color-primary) !important; }
.interact-fg:active { color: var(--color-primary-active) !important; }