mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-29 03:38:52 +03:00
Replace more gt- with tw- (#29678)
This will conclude the trivial class replacements. (cherry picked from commit 82e102f8b09faf1ac2786ccad36d4a20fcb392b8)
This commit is contained in:
parent
e731e0c346
commit
0802784744
8 changed files with 17 additions and 40 deletions
|
@ -59,7 +59,7 @@ func (p *AuthSourceProvider) DisplayName() string {
|
||||||
|
|
||||||
func (p *AuthSourceProvider) IconHTML(size int) template.HTML {
|
func (p *AuthSourceProvider) IconHTML(size int) template.HTML {
|
||||||
if p.iconURL != "" {
|
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,
|
||||||
size,
|
size,
|
||||||
html.EscapeString(p.iconURL), html.EscapeString(p.DisplayName()),
|
html.EscapeString(p.iconURL), html.EscapeString(p.DisplayName()),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{if .Statuses}}
|
{{if .Statuses}}
|
||||||
{{if and (eq (len .Statuses) 1) .Status.TargetURL}}
|
{{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}}
|
{{template "repo/commit_status" .Status}}
|
||||||
</a>
|
</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{else if eq .Type 1}}
|
{{else if eq .Type 1}}
|
||||||
<div class="timeline-item event" id="{{.HashTag}}">
|
<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}}
|
{{if not .OriginalAuthor}}
|
||||||
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{else if eq .Type 2}}
|
{{else if eq .Type 2}}
|
||||||
<div class="timeline-item event" id="{{.HashTag}}">
|
<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}}
|
{{if not .OriginalAuthor}}
|
||||||
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{else if eq .Type 28}}
|
{{else if eq .Type 28}}
|
||||||
<div class="timeline-item event" id="{{.HashTag}}">
|
<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}}
|
{{if not .OriginalAuthor}}
|
||||||
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -383,7 +383,7 @@
|
||||||
{{ctx.AvatarUtils.Avatar .Poster 40}}
|
{{ctx.AvatarUtils.Avatar .Poster 40}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{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">
|
<span class="text grey muted-links">
|
||||||
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
{{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}}
|
||||||
{{if eq .Review.Type 1}}
|
{{if eq .Review.Type 1}}
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if gt .Activity.PublishedReleaseCount 0}}
|
{{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"}}
|
{{svg "octicon-tag" 16 "gt-mr-3"}}
|
||||||
{{ctx.Locale.Tr "repo.activity.title.releases_published_by"
|
{{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)
|
(ctx.Locale.TrN .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n" .Activity.PublishedReleaseCount)
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if gt .Activity.MergedPRCount 0}}
|
{{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"}}
|
{{svg "octicon-git-pull-request" 16 "gt-mr-3"}}
|
||||||
{{ctx.Locale.Tr "repo.activity.title.prs_merged_by"
|
{{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)
|
(ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.MergedPRCount)
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if gt .Activity.OpenedPRCount 0}}
|
{{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"}}
|
{{svg "octicon-git-branch" 16 "gt-mr-3"}}
|
||||||
{{ctx.Locale.Tr "repo.activity.title.prs_opened_by"
|
{{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)
|
(ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.OpenedPRCount)
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if gt .Activity.ClosedIssueCount 0}}
|
{{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"}}
|
{{svg "octicon-issue-closed" 16 "gt-mr-3"}}
|
||||||
{{ctx.Locale.Tr "repo.activity.title.issues_closed_from"
|
{{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)
|
(ctx.Locale.TrN .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.ClosedIssueCount)
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if gt .Activity.OpenedIssueCount 0}}
|
{{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"}}
|
{{svg "octicon-issue-opened" 16 "gt-mr-3"}}
|
||||||
{{ctx.Locale.Tr "repo.activity.title.issues_created_by"
|
{{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)
|
(ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.OpenedIssueCount)
|
||||||
|
@ -206,7 +206,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if gt .Activity.UnresolvedIssueCount 0}}
|
{{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"}}
|
{{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}}
|
{{ctx.Locale.TrN .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n" .Activity.UnresolvedIssueCount}}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<div class="flex-item-main">
|
<div class="flex-item-main">
|
||||||
<div class="flex-item-header">
|
<div class="flex-item-header">
|
||||||
<div class="flex-item-title">
|
<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 .IsPull}}
|
||||||
{{if (index $.CommitStatuses .PullRequest.ID)}}
|
{{if (index $.CommitStatuses .PullRequest.ID)}}
|
||||||
{{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (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}}
|
{{if .Assignees}}
|
||||||
<div class="text grey">
|
<div class="text grey">
|
||||||
{{range .Assignees}}
|
{{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}}
|
{{ctx.AvatarUtils.Avatar . 20}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .NumComments}}
|
{{if .NumComments}}
|
||||||
<div class="text grey">
|
<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}}
|
{{svg "octicon-comment" 16}}{{.NumComments}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="flex-container">
|
<div class="flex-container">
|
||||||
<div class="flex-container-nav">
|
<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}}">
|
<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"}}
|
{{ctx.Locale.Tr "home.issues.in_your_repos"}}
|
||||||
<strong>{{CountFmt .IssueStats.YourRepositoriesCount}}</strong>
|
<strong>{{CountFmt .IssueStats.YourRepositoriesCount}}</strong>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="flex-container">
|
<div class="flex-container">
|
||||||
<div class="flex-container-nav">
|
<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">
|
<div class="item">
|
||||||
{{ctx.Locale.Tr "home.issues.in_your_repos"}}
|
{{ctx.Locale.Tr "home.issues.in_your_repos"}}
|
||||||
<strong>{{.Total}}</strong>
|
<strong>{{.Total}}</strong>
|
||||||
|
|
|
@ -46,12 +46,6 @@ Gitea's private styles use `g-` prefix.
|
||||||
text-overflow: ellipsis;
|
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-light { font-weight: var(--font-weight-light) !important; }
|
||||||
.gt-font-normal { font-weight: var(--font-weight-normal) !important; }
|
.gt-font-normal { font-weight: var(--font-weight-normal) !important; }
|
||||||
.gt-font-medium { font-weight: var(--font-weight-medium) !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-left { border-left: 1px solid var(--color-secondary) !important; }
|
||||||
.gt-border-secondary-right { border-right: 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 { color: inherit !important; }
|
||||||
.interact-fg:hover { color: var(--color-primary) !important; }
|
.interact-fg:hover { color: var(--color-primary) !important; }
|
||||||
.interact-fg:active { color: var(--color-primary-active) !important; }
|
.interact-fg:active { color: var(--color-primary-active) !important; }
|
||||||
|
|
Loading…
Reference in a new issue