Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace more gt- with tw- #29678

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion services/auth/source/oauth2/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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">`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does tailwind config scan "*.go" files?

This is the only use of "tw-object-contain"

Copy link
Member Author

@silverwind silverwind Mar 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, we need to fix that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

size,
size,
html.EscapeString(p.iconURL), html.EscapeString(p.DisplayName()),
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/commit_statuses.tmpl
Original file line number Diff line number Diff line change
@@ -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}}
Expand Down
8 changes: 4 additions & 4 deletions templates/repo/issue/view_content/comments.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand All @@ -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}}
Expand All @@ -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}}
Expand Down Expand Up @@ -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}}
Expand Down
12 changes: 6 additions & 6 deletions templates/repo/pulse.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions templates/shared/issuelist.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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)}}
Expand All @@ -36,15 +36,15 @@
{{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}}
</div>
{{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>
Expand Down
2 changes: 1 addition & 1 deletion templates/user/dashboard/issues.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion templates/user/dashboard/milestones.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
23 changes: 0 additions & 23 deletions web_src/css/helpers.css
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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; }
Expand Down
Loading