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

Move helpers to be prefixed with gt- (#22879)

As discussed in #22847 the helpers in helpers.less need to have a
separate prefix as they are causing conflicts with fomantic styles

This will allow us to have the `.gt-hidden { display:none !important; }`
style that is needed to for the reverted PR.

Of note in doing this I have noticed that there was already a conflict
with at least one chroma style which this PR now avoids.

I've also added in the `gt-hidden` style that matches the tailwind one
and switched the code that needed it to use that.

Signed-off-by: Andrew Thornton <art27@cantab.net>

---------

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
zeripath
2023-02-13 17:59:59 +00:00
committed by GitHub
parent 00b18ab42f
commit 51383ec084
137 changed files with 901 additions and 900 deletions

View File

@@ -22,10 +22,10 @@
</a>
{{end}}
<div class="content comment-container">
<div class="ui top attached header comment-header df ac sb">
<div class="comment-header-left df ac">
<div class="ui top attached header comment-header gt-df gt-ac gt-sb">
<div class="comment-header-left gt-df gt-ac">
{{if .OriginalAuthor}}
<span class="text black bold mr-2">
<span class="text black gt-bold gt-mr-2">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}}
</span>
@@ -47,7 +47,7 @@
</span>
{{end}}
</div>
<div class="comment-header-right actions df ac">
<div class="comment-header-right actions gt-df gt-ac">
{{if (.ShowRole.HasRole "Poster")}}
<div class="ui basic label">
{{$.locale.Tr "repo.issues.poster"}}
@@ -93,7 +93,7 @@
</div>
{{else if eq .Type 1}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge bg-green text-white">{{svg "octicon-dot-fill"}}</span>
<span class="badge gt-bg-green gt-text-white">{{svg "octicon-dot-fill"}}</span>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
@@ -106,7 +106,7 @@
</div>
{{else if eq .Type 2}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge bg-red text-white">{{svg "octicon-circle-slash"}}</span>
<span class="badge gt-bg-red gt-text-white">{{svg "octicon-circle-slash"}}</span>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
@@ -119,7 +119,7 @@
</div>
{{else if eq .Type 28}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge bg-purple text-white">{{svg "octicon-git-merge"}}</span>
<span class="badge gt-bg-purple gt-text-white">{{svg "octicon-git-merge"}}</span>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
@@ -372,7 +372,7 @@
{{avatar .Poster}}
</a>
{{end}}
<span class="badge{{if eq .Review.Type 1}} bg-green text-white{{else if eq .Review.Type 3}} bg-red text-white{{end}}">{{svg (printf "octicon-%s" .Review.Type.Icon)}}</span>
<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="text grey muted-links">
{{if .OriginalAuthor}}
<span class="text black">
@@ -402,11 +402,11 @@
{{if .Content}}
<div class="timeline-item comment" id="{{.HashTag}}">
<div class="content comment-container">
<div class="ui top attached header comment-header df ac sb">
<div class="comment-header-left df ac">
<div class="ui top attached header comment-header gt-df gt-ac gt-sb">
<div class="comment-header-left gt-df gt-ac">
<span class="text grey muted-links">
{{if .OriginalAuthor}}
<span class="text black bold">
<span class="text black gt-bold">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}}
</span>
@@ -419,7 +419,7 @@
{{$.locale.Tr "repo.issues.review.left_comment" | Safe}}
</span>
</div>
<div class="comment-header-right actions df ac">
<div class="comment-header-right actions gt-df gt-ac">
{{if (.ShowRole.HasRole "Poster")}}
<div class="ui basic label">
{{$.locale.Tr "repo.issues.poster"}}
@@ -470,31 +470,31 @@
{{range $filename, $lines := .Review.CodeComments}}
{{range $line, $comms := $lines}}
<div class="ui segments">
<div class="ui segment py-3 df ac sb">
<div class="ui segment gt-py-3 gt-df gt-ac gt-sb">
{{$invalid := (index $comms 0).Invalidated}}
{{$resolved := (index $comms 0).IsResolved}}
{{$resolveDoer := (index $comms 0).ResolveDoer}}
{{$isNotPending := (not (eq (index $comms 0).Review.Type 0))}}
<div class="df ac">
<a href="{{(index $comms 0).CodeCommentLink}}" class="file-comment ml-3 word-break">{{$filename}}</a>
<div class="gt-df gt-ac">
<a href="{{(index $comms 0).CodeCommentLink}}" class="file-comment gt-ml-3 gt-word-break">{{$filename}}</a>
{{if $invalid}}
<span class="ui label basic small ml-3">
<span class="ui label basic small gt-ml-3">
{{$.locale.Tr "repo.issues.review.outdated"}}
</span>
{{end}}
</div>
<div>
{{if or $invalid $resolved}}
<button id="show-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if not $resolved}}hide {{end}}ui compact right labeled button show-outdated df ac">
{{svg "octicon-unfold" 16 "mr-3"}}
<button id="show-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if not $resolved}}hide {{end}}ui compact right labeled button show-outdated gt-df gt-ac">
{{svg "octicon-unfold" 16 "gt-mr-3"}}
{{if $resolved}}
{{$.locale.Tr "repo.issues.review.show_resolved"}}
{{else}}
{{$.locale.Tr "repo.issues.review.show_outdated"}}
{{end}}
</button>
<button id="hide-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if $resolved}}hide {{end}}ui compact right labeled button hide-outdated df ac">
{{svg "octicon-fold" 16 "mr-3"}}
<button id="hide-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if $resolved}}hide {{end}}ui compact right labeled button hide-outdated gt-df gt-ac">
{{svg "octicon-fold" 16 "gt-mr-3"}}
{{if $resolved}}
{{$.locale.Tr "repo.issues.review.hide_resolved"}}
{{else}}
@@ -520,13 +520,13 @@
</div>
{{end}}
<div id="code-comments-{{(index $comms 0).ID}}" class="comment-code-cloud ui segment{{if $resolved}} hide{{end}}">
<div class="ui comments mb-0">
<div class="ui comments gt-mb-0">
{{range $comms}}
{{$createdSubStr:= TimeSinceUnix .CreatedUnix $.locale}}
<div class="comment code-comment pb-4" id="{{.HashTag}}">
<div class="comment code-comment gt-pb-4" id="{{.HashTag}}">
<div class="content">
<div class="header comment-header">
<div class="comment-header-left df ac">
<div class="comment-header-left gt-df gt-ac">
{{if not .OriginalAuthor}}
<a class="avatar">
{{avatar .Poster}}
@@ -534,7 +534,7 @@
{{end}}
<span class="text grey muted-links">
{{if .OriginalAuthor}}
<span class="text black bold">
<span class="text black gt-bold">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
{{.OriginalAuthor}}
</span>
@@ -546,7 +546,7 @@
{{$.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdSubStr | Safe}}
</span>
</div>
<div class="comment-header-right actions df ac">
<div class="comment-header-right actions gt-df gt-ac">
{{if (.ShowRole.HasRole "Poster")}}
<div class="ui basic label">
{{$.locale.Tr "repo.issues.poster"}}
@@ -589,11 +589,11 @@
</div>
{{end}}
</div>
<div class="code-comment-buttons df ac fw mt-3 mb-2 mx-3">
<div class="f1">
<div class="code-comment-buttons gt-df gt-ac gt-fw gt-mt-3 gt-mb-2 gt-mx-3">
<div class="gt-f1">
{{if $resolved}}
<div class="ui grey text">
{{svg "octicon-check" 16 "mr-2"}}
{{svg "octicon-check" 16 "gt-mr-2"}}
<b>{{$resolveDoer.Name}}</b> {{$.locale.Tr "repo.issues.review.resolved_by"}}
</div>
{{end}}
@@ -609,8 +609,8 @@
</button>
{{end}}
{{if and $.SignedUserID (not $.Repository.IsArchived)}}
<button class="comment-form-reply ui green tiny labeled icon button ml-2 mr-0">
{{svg "octicon-reply" 16 "reply icon mr-2"}}{{$.locale.Tr "repo.diff.comment.reply"}}
<button class="comment-form-reply ui green tiny labeled icon button gt-ml-2 gt-mr-0">
{{svg "octicon-reply" 16 "reply icon gt-mr-2"}}{{$.locale.Tr "repo.diff.comment.reply"}}
</button>
{{end}}
</div>