1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Replace some gt- classes with tw- (#29570)

Replace 18 `gt-` prefixes with `tw-` with perl replacement. I manually
checked them all with `rg` afterwards.
This commit is contained in:
silverwind
2024-03-04 04:33:20 +01:00
committed by GitHub
parent fe6792dff3
commit a2e90014ec
41 changed files with 50 additions and 70 deletions

View File

@@ -72,7 +72,7 @@
<div class="gt-df gt-ac">
{{ctx.Locale.Tr "repo.branches"}}
</div>
<div class="gt-whitespace-nowrap">
<div class="tw-whitespace-nowrap">
<form class="ignore-dirty" method="get">
<div class="ui tiny search input">
<input name="q" placeholder="{{ctx.Locale.Tr "repo.branch.search"}}" value="{{.Keyword}}" autofocus>

View File

@@ -184,7 +184,7 @@
</div>
</div>
{{if .Commit.Signature}}
<div class="ui bottom attached message gt-text-left gt-df gt-ac gt-sb commit-header-row gt-fw gt-mb-0 {{$class}}">
<div class="ui bottom attached message tw-text-left gt-df gt-ac gt-sb commit-header-row gt-fw gt-mb-0 {{$class}}">
<div class="gt-df gt-ac">
{{if .Verification.Verified}}
{{if ne .Verification.SigningUser.ID 0}}

View File

@@ -13,7 +13,7 @@
{{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}}
<span class="shabox gt-df gt-ac gt-float-right">
<span class="shabox gt-df gt-ac tw-float-right">
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}}
{{$class := "ui sha label"}}
{{if .Signature}}

View File

@@ -8,7 +8,7 @@
{{ctx.Locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}}
{{end}}
</div>
<div class="commits-table-right gt-whitespace-nowrap">
<div class="commits-table-right tw-whitespace-nowrap">
{{if .PageIsCommits}}
<form class="ignore-dirty" action="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/search">
<div class="ui tiny search input">

View File

@@ -25,7 +25,7 @@
</div>
<div class="diff-detail-actions">
{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived) (not .DiffNotAvailable)}}
<div class="not-mobile gt-df gt-ac gt-fc gt-whitespace-nowrap gt-mr-2">
<div class="not-mobile gt-df gt-ac gt-fc tw-whitespace-nowrap gt-mr-2">
<label for="viewed-files-summary" id="viewed-files-summary-label" data-text-changed-template="{{ctx.Locale.Tr "repo.pulls.viewed_files_label"}}">
{{ctx.Locale.Tr "repo.pulls.viewed_files_label" .Diff.NumViewedFiles .Diff.NumFiles}}
</label>
@@ -202,7 +202,7 @@
</div>
{{if $showFileViewToggle}}
{{/* for image or CSV, it can have a horizontal scroll bar, there won't be review comment context menu (position absolute) which would be clipped by "overflow" */}}
<div id="diff-rendered-{{$file.NameHash}}" class="file-body file-code {{if $.IsSplitStyle}}code-diff-split{{else}}code-diff-unified{{end}} gt-overflow-x-scroll">
<div id="diff-rendered-{{$file.NameHash}}" class="file-body file-code {{if $.IsSplitStyle}}code-diff-split{{else}}code-diff-unified{{end}} tw-overflow-x-scroll">
<table class="chroma tw-w-full">
{{if $isImage}}
{{template "repo/diff/image_diff" dict "file" . "root" $ "blobBase" $blobBase "blobHead" $blobHead "sniffedTypeBase" $sniffedTypeBase "sniffedTypeHead" $sniffedTypeHead}}

View File

@@ -27,7 +27,7 @@
<div class="field footer gt-mx-3">
<span class="markup-info">{{svg "octicon-markup"}} {{ctx.Locale.Tr "repo.diff.comment.markdown_info"}}</span>
<div class="gt-text-right">
<div class="tw-text-right">
{{if $.reply}}
<button class="ui submit primary tiny button btn-reply" type="submit">{{ctx.Locale.Tr "repo.diff.comment.reply"}}</button>
<input type="hidden" name="reply" value="{{$.reply}}">

View File

@@ -208,7 +208,7 @@
<button class="ui button primary show-form">{{ctx.Locale.Tr "repo.pulls.new"}}</button>
</div>
{{else if .Repository.IsArchived}}
<div class="ui warning message gt-text-center">
<div class="ui warning message tw-text-center">
{{if .Repository.ArchivedUnix.IsZero}}
{{ctx.Locale.Tr "repo.archive.title"}}
{{else}}

View File

@@ -6,7 +6,7 @@
<div class="sixteen wide column content">
{{template "base/alert" .}}
{{if .Repository.IsArchived}}
<div class="ui warning message gt-text-center">
<div class="ui warning message tw-text-center">
{{if .Repository.ArchivedUnix.IsZero}}
{{ctx.Locale.Tr "repo.archive.title"}}
{{else}}

View File

@@ -93,7 +93,7 @@
<div class="header">
{{ctx.Locale.Tr "repo.already_forked" .Name}}
</div>
<div class="content gt-text-left">
<div class="content tw-text-left">
<div class="ui list">
{{range $.UserAndOrgForks}}
<div class="ui item gt-py-3">

View File

@@ -41,7 +41,7 @@
<input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}">
{{range .Topics}}
{{/* keey the same layout as Fomantic UI generated labels */}}
<a class="ui label transition visible gt-cursor-default gt-dib" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a>
<a class="ui label transition visible tw-cursor-default gt-dib" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a>
{{end}}
<div class="text"></div>
</div>
@@ -53,7 +53,7 @@
</div>
{{end}}
{{if .Repository.IsArchived}}
<div class="ui warning message gt-text-center">
<div class="ui warning message tw-text-center">
{{if .Repository.ArchivedUnix.IsZero}}
{{ctx.Locale.Tr "repo.archive.title"}}
{{else}}

View File

@@ -6,7 +6,7 @@
{{if .PinnedIssues}}
<div id="issue-pins" {{if .IsRepoAdmin}}data-is-repo-admin{{end}}>
{{range .PinnedIssues}}
<div class="issue-card gt-word-break {{if $.IsRepoAdmin}}gt-cursor-grab{{end}}" data-move-url="{{$.Link}}/move_pin" data-issue-id="{{.ID}}">
<div class="issue-card gt-word-break {{if $.IsRepoAdmin}}tw-cursor-grab{{end}}" data-move-url="{{$.Link}}/move_pin" data-issue-id="{{.ID}}">
{{template "repo/issue/card" (dict "Issue" . "Page" $ "isPinnedIssueCard" true)}}
</div>
{{end}}

View File

@@ -39,7 +39,7 @@
<textarea name="content">{{.content}}</textarea>
</div>
<div class="divider"></div>
<div class="gt-text-right">
<div class="tw-text-right">
{{if .PageIsEditMilestone}}
<a class="ui primary basic button" href="{{.RepoLink}}/milestones">
{{ctx.Locale.Tr "repo.milestones.cancel"}}

View File

@@ -114,7 +114,7 @@
</div>
</div>
{{else if .Repository.IsArchived}}
<div class="ui warning message gt-text-center">
<div class="ui warning message tw-text-center">
{{if .Issue.IsPull}}
{{ctx.Locale.Tr "repo.archive.pull.nocomment"}}
{{else}}
@@ -124,7 +124,7 @@
{{end}}
{{else}} {{/* not .IsSigned */}}
{{if .Repository.IsArchived}}
<div class="ui warning message gt-text-center">
<div class="ui warning message tw-text-center">
{{if .Issue.IsPull}}
{{ctx.Locale.Tr "repo.archive.pull.nocomment"}}
{{else}}

View File

@@ -562,7 +562,7 @@
{{end}}
</span>
{{if and .IsForcePush $.Issue.PullRequest.BaseRepo.Name}}
<span class="gt-float-right comparebox">
<span class="tw-float-right comparebox">
<a href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow" class="ui compare label">{{ctx.Locale.Tr "repo.issues.force_push_compare"}}</a>
</span>
{{end}}

View File

@@ -1,7 +1,7 @@
{{if and .comment.Time (.ctxData.Repository.IsTimetrackerEnabled ctx)}} {{/* compatibility with time comments made before v1.14 */}}
{{if (not .comment.Time.Deleted)}}
{{if (or .ctxData.IsAdmin (and .ctxData.IsSigned (eq .ctxData.SignedUserID .comment.PosterID)))}}
<span class="gt-float-right">
<span class="tw-float-right">
<div class="ui mini modal issue-delete-time-modal" data-id="{{.comment.Time.ID}}">
<form method="post" class="delete-time-form" action="{{.ctxData.RepoLink}}/issues/{{.ctxData.Issue.Index}}/times/{{.comment.TimeID}}/delete">
{{.ctxData.CsrfTokenHtml}}

View File

@@ -16,10 +16,10 @@
{{svg (printf "gitea-%s" .Name) 184}}
{{end}}
<div class="content">
<div class="header gt-text-center">
<div class="header tw-text-center">
{{.Title}}
</div>
<div class="description gt-text-center">
<div class="description tw-text-center">
{{ctx.Locale.Tr (printf "repo.migrate.%s.description" .Name)}}
</div>
</div>

View File

@@ -64,7 +64,7 @@
<div class="flex-text-inline gt-f1">
<input name="attachment-edit-{{.UUID}}" class="attachment_edit" required value="{{.Name}}">
<input name="attachment-del-{{.UUID}}" type="hidden" value="false">
<span class="ui text grey gt-whitespace-nowrap">{{.Size | FileSize}}</span>
<span class="ui text grey tw-whitespace-nowrap">{{.Size | FileSize}}</span>
<span data-tooltip-content="{{ctx.Locale.Tr "repo.release.download_count" (ctx.Locale.PrettyNumber .DownloadCount)}}">
{{svg "octicon-info"}}
</span>

View File

@@ -1,7 +1,7 @@
{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings edit")}}
<div class="repo-setting-content">
{{if .Repository.IsArchived}}
<div class="ui warning message gt-text-center">
<div class="ui warning message tw-text-center">
{{ctx.Locale.Tr "repo.settings.archive.branchsettings_unavailable"}}
</div>
{{else}}

View File

@@ -12,7 +12,7 @@
<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>
<a class="muted gt-float-right gt-p-3" href="{{$.RepoLink}}/settings/hooks/git/{{.Name|PathEscape}}">
<a class="muted tw-float-right gt-p-3" href="{{$.RepoLink}}/settings/hooks/git/{{.Name|PathEscape}}">
{{svg "octicon-pencil"}}
</a>
</div>

View File

@@ -44,7 +44,7 @@
<td>{{if .InRepo}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
<td>{{if .Exists}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
<td>{{if .Accessible}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
<td class="gt-text-right">
<td class="tw-text-right">
<a class="ui primary button" href="{{$.LFSFilesLink}}/find?oid={{.Oid}}&size={{.Size}}&sha={{.SHA}}">{{ctx.Locale.Tr "repo.settings.lfs_findcommits"}}</a>
</td>
</tr>

View File

@@ -80,7 +80,7 @@
</h4>
<div class="ui attached segment">
{{if .Repository.IsArchived}}
<div class="ui warning message gt-text-center">
<div class="ui warning message tw-text-center">
{{ctx.Locale.Tr "repo.settings.archive.mirrors_unavailable"}}
</div>
{{else}}

View File

@@ -1,7 +1,7 @@
{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings edit")}}
<div class="repo-setting-content">
{{if .Repository.IsArchived}}
<div class="ui warning message gt-text-center">
<div class="ui warning message tw-text-center">
{{ctx.Locale.Tr "repo.settings.archive.tagsettings_unavailable"}}
</div>
{{else}}

View File

@@ -1,6 +1,6 @@
{{if .EscapeStatus}}
{{if .EscapeStatus.HasInvisible}}
<div class="ui warning message unicode-escape-prompt gt-text-left">
<div class="ui warning message unicode-escape-prompt tw-text-left">
<button class="btn close icon hide-panel" data-panel-closest=".message">{{svg "octicon-x" 16 "close inside"}}</button>
<div class="header">
{{ctx.Locale.Tr "repo.invisible_runes_header"}}
@@ -11,7 +11,7 @@
{{end}}
</div>
{{else if .EscapeStatus.HasAmbiguous}}
<div class="ui warning message unicode-escape-prompt gt-text-left">
<div class="ui warning message unicode-escape-prompt tw-text-left">
<button class="btn close icon hide-panel" data-panel-closest=".message">{{svg "octicon-x" 16 "close inside"}}</button>
<div class="header">
{{ctx.Locale.Tr "repo.ambiguous_runes_header"}}

View File

@@ -1,12 +1,12 @@
<div {{if .ReadmeInList}}id="readme" {{end}}class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
{{- if .FileError}}
<div class="ui error message">
<div class="text left gt-whitespace-pre">{{.FileError}}</div>
<div class="text left tw-whitespace-pre">{{.FileError}}</div>
</div>
{{end}}
{{- if .FileWarning}}
<div class="ui warning message">
<div class="text left gt-whitespace-pre">{{.FileWarning}}</div>
<div class="text left tw-whitespace-pre">{{.FileWarning}}</div>
</div>
{{end}}

View File

@@ -79,19 +79,19 @@
{{if .sidebarPresent}}
<div class="markup wiki-content-sidebar">
{{if and .CanWriteWiki (not .Repository.IsMirror)}}
<a class="gt-float-right muted" href="{{.RepoLink}}/wiki/_Sidebar?action=_edit" aria-label="{{ctx.Locale.Tr "repo.wiki.edit_page_button"}}">{{svg "octicon-pencil"}}</a>
<a class="tw-float-right muted" href="{{.RepoLink}}/wiki/_Sidebar?action=_edit" aria-label="{{ctx.Locale.Tr "repo.wiki.edit_page_button"}}">{{svg "octicon-pencil"}}</a>
{{end}}
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .sidebarEscapeStatus "root" $}}
{{.sidebarContent | SafeHTML}}
</div>
{{end}}
<div class="gt-clear-both"></div>
<div class="tw-clear-both"></div>
{{if .footerPresent}}
<div class="markup wiki-content-footer">
{{if and .CanWriteWiki (not .Repository.IsMirror)}}
<a class="gt-float-right muted" href="{{.RepoLink}}/wiki/_Footer?action=_edit" aria-label="{{ctx.Locale.Tr "repo.wiki.edit_page_button"}}">{{svg "octicon-pencil"}}</a>
<a class="tw-float-right muted" href="{{.RepoLink}}/wiki/_Footer?action=_edit" aria-label="{{ctx.Locale.Tr "repo.wiki.edit_page_button"}}">{{svg "octicon-pencil"}}</a>
{{end}}
{{template "repo/unicode_escape_prompt" dict "footerEscapeStatus" .sidebarEscapeStatus "root" $}}
{{.footerContent | SafeHTML}}