diff options
author | zeripath <art27@cantab.net> | 2023-02-13 17:59:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 17:59:59 +0000 |
commit | 51383ec0841ec2562e5c4a9dadd4fef82974dd5c (patch) | |
tree | ca77ae07a74536297ded91b51e6a1eb6d55047d9 /templates/repo/diff | |
parent | 00b18ab42fdd49a437249f57c0b9086fd0ee1d03 (diff) | |
download | gitea-51383ec0841ec2562e5c4a9dadd4fef82974dd5c.tar.gz gitea-51383ec0841ec2562e5c4a9dadd4fef82974dd5c.zip |
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>
Diffstat (limited to 'templates/repo/diff')
-rw-r--r-- | templates/repo/diff/blob_excerpt.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/diff/box.tmpl | 42 | ||||
-rw-r--r-- | templates/repo/diff/comment_form.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/diff/comments.tmpl | 8 | ||||
-rw-r--r-- | templates/repo/diff/compare.tmpl | 12 | ||||
-rw-r--r-- | templates/repo/diff/conversation.tmpl | 20 | ||||
-rw-r--r-- | templates/repo/diff/image_diff.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/diff/new_review.tmpl | 8 | ||||
-rw-r--r-- | templates/repo/diff/section_split.tmpl | 8 | ||||
-rw-r--r-- | templates/repo/diff/section_unified.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/diff/stats.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/diff/whitespace_dropdown.tmpl | 16 |
12 files changed, 64 insertions, 64 deletions
diff --git a/templates/repo/diff/blob_excerpt.tmpl b/templates/repo/diff/blob_excerpt.tmpl index 402435c467..f4f7732c50 100644 --- a/templates/repo/diff/blob_excerpt.tmpl +++ b/templates/repo/diff/blob_excerpt.tmpl @@ -25,7 +25,7 @@ {{$inlineDiff := $.section.GetComputedInlineDiffFor $line $.locale}} <td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$.FileNameHash}}L{{$line.LeftIdx}}{{end}}"></span></td> <td class="blob-excerpt lines-escape lines-escape-old">{{if and $line.LeftIdx $inlineDiff.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.locale}}"></a>{{end}}</td> - <td class="blob-excerpt lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="mono" data-type-marker=""></span>{{end}}</td> + <td class="blob-excerpt lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="gt-mono" data-type-marker=""></span>{{end}}</td> <td class="blob-excerpt lines-code lines-code-old halfwidth">{{/* */}}{{if $line.LeftIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.locale}}{{else}}{{/* */}}<code class="code-inner"></code>{{/* @@ -33,7 +33,7 @@ */}}</td> <td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$.FileNameHash}}R{{$line.RightIdx}}{{end}}"></span></td> <td class="blob-excerpt lines-escape lines-escape-new">{{if and $line.RightIdx $inlineDiff.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.locale}}"></a>{{end}}</td> - <td class="blob-excerpt lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="mono" data-type-marker=""></span>{{end}}</td> + <td class="blob-excerpt lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="gt-mono" data-type-marker=""></span>{{end}}</td> <td class="blob-excerpt lines-code lines-code-new halfwidth">{{/* */}}{{if $line.RightIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.locale}}{{else}}{{/* */}}<code class="code-inner"></code>{{/* @@ -69,7 +69,7 @@ {{end}} {{$inlineDiff := $.section.GetComputedInlineDiffFor $line $.locale}} <td class="blob-excerpt lines-escape">{{if $inlineDiff.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.locale}}"></a>{{end}}</td> - <td class="blob-excerpt lines-type-marker"><span class="mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td> + <td class="blob-excerpt lines-type-marker"><span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td> <td class="blob-excerpt lines-code{{if (not $line.RightIdx)}} lines-code-old{{end}}"><code {{if $inlineDiff.EscapeStatus.Escaped}}class="code-inner has-escaped" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.locale}}"{{else}}class="code-inner"{{end}}>{{$inlineDiff.Content}}</code></td> </tr> {{end}} diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 4bc211f931..319fdb58f8 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -13,21 +13,21 @@ <h4>{{.locale.Tr "repo.diff.data_not_available"}}</h4> {{else}} <div> - <div class="diff-detail-box diff-box sticky df sb ac fw"> - <div class="df ac fw"> - <a class="diff-toggle-file-tree-button muted df ac"> + <div class="diff-detail-box diff-box sticky gt-df gt-sb gt-ac gt-fw"> + <div class="gt-df gt-ac gt-fw"> + <a class="diff-toggle-file-tree-button muted gt-df gt-ac"> {{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}} {{svg "octicon-sidebar-collapse" 20 "icon hide"}} {{svg "octicon-sidebar-expand" 20 "icon"}} </a> - <div class="diff-detail-stats df ac ml-3"> - {{svg "octicon-diff" 16 "mr-2"}}{{.locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}} + <div class="diff-detail-stats gt-df gt-ac gt-ml-3"> + {{svg "octicon-diff" 16 "gt-mr-2"}}{{.locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}} </div> </div> - <div class="diff-detail-actions df ac"> + <div class="diff-detail-actions gt-df gt-ac"> {{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}} - <progress id="viewed-files-summary" class="mr-2" value="{{.Diff.NumViewedFiles}}" max="{{.Diff.NumFiles}}"></progress> - <label for="viewed-files-summary" id="viewed-files-summary-label" class="mr-3" data-text-changed-template="{{.locale.Tr "repo.pulls.viewed_files_label"}}"> + <progress id="viewed-files-summary" class="gt-mr-2" value="{{.Diff.NumViewedFiles}}" max="{{.Diff.NumFiles}}"></progress> + <label for="viewed-files-summary" id="viewed-files-summary-label" class="gt-mr-3" data-text-changed-template="{{.locale.Tr "repo.pulls.viewed_files_label"}}"> {{.locale.Tr "repo.pulls.viewed_files_label" .Diff.NumViewedFiles .Diff.NumFiles}} </label> {{end}} @@ -77,34 +77,34 @@ {{$isCsv := (call $.IsCsvFile $file)}} {{$showFileViewToggle := or $isImage (and (not $file.IsIncomplete) $isCsv)}} {{$isExpandable := or (gt $file.Addition 0) (gt $file.Deletion 0) $file.IsBin}} - <div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} mt-3" id="diff-{{$file.NameHash}}" data-old-filename="{{$file.OldName}}" data-new-filename="{{$file.Name}}" {{if or ($file.ShouldBeHidden) (not $isExpandable)}}data-folded="true"{{end}}> - <h4 class="diff-file-header sticky-2nd-row ui top attached normal header df ac sb"> - <div class="df ac"> - <a role="button" class="fold-file muted mr-2" {{if not $isExpandable}}style="visibility: hidden"{{end}}> + <div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} gt-mt-3" id="diff-{{$file.NameHash}}" data-old-filename="{{$file.OldName}}" data-new-filename="{{$file.Name}}" {{if or ($file.ShouldBeHidden) (not $isExpandable)}}data-folded="true"{{end}}> + <h4 class="diff-file-header sticky-2nd-row ui top attached normal header gt-df gt-ac gt-sb"> + <div class="gt-df gt-ac"> + <a role="button" class="fold-file muted gt-mr-2" {{if not $isExpandable}}style="visibility: hidden"{{end}}> {{if $file.ShouldBeHidden}} {{svg "octicon-chevron-right" 18}} {{else}} {{svg "octicon-chevron-down" 18}} {{end}} </a> - <div class="bold df ac mono"> + <div class="gt-bold gt-df gt-ac gt-mono"> {{if $file.IsBin}} - <span class="ml-1 mr-3"> + <span class="gt-ml-1 gt-mr-3"> {{$.locale.Tr "repo.diff.bin"}} </span> {{else}} {{template "repo/diff/stats" dict "file" . "root" $}} {{end}} </div> - <span class="file mono"><a class="muted" href="#diff-{{$file.NameHash}}">{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}</a>{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}}</span> + <span class="file gt-mono"><a class="muted" href="#diff-{{$file.NameHash}}">{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}</a>{{if .IsLFSFile}} ({{$.locale.Tr "repo.stored_lfs"}}){{end}}</span> {{if $file.IsGenerated}} - <span class="ui label ml-3">{{$.locale.Tr "repo.diff.generated"}}</span> + <span class="ui label gt-ml-3">{{$.locale.Tr "repo.diff.generated"}}</span> {{end}} {{if $file.IsVendored}} - <span class="ui label ml-3">{{$.locale.Tr "repo.diff.vendored"}}</span> + <span class="ui label gt-ml-3">{{$.locale.Tr "repo.diff.vendored"}}</span> {{end}} </div> - <div class="diff-file-header-actions df ac"> + <div class="diff-file-header-actions gt-df gt-ac"> {{if $showFileViewToggle}} <div class="ui compact icon buttons"> <span class="ui tiny basic button tooltip file-view-toggle" data-toggle-selector="#diff-source-{{$file.NameHash}}" data-content="{{$.locale.Tr "repo.file_view_source"}}" data-position="bottom center">{{svg "octicon-code"}}</span> @@ -162,7 +162,7 @@ </div> {{if $showFileViewToggle}} <div id="diff-rendered-{{$file.NameHash}}" class="file-body file-code {{if $.IsSplitStyle}} code-diff-split{{else}} code-diff-unified{{end}}"> - <table class="chroma w-100"> + <table class="chroma gt-w-100"> {{if $isImage}} {{template "repo/diff/image_diff" dict "file" . "root" $ "blobBase" $blobBase "blobHead" $blobHead}} {{else}} @@ -176,8 +176,8 @@ {{end}} {{if .Diff.IsIncomplete}} - <div class="diff-file-box diff-box file-content mt-3" id="diff-incomplete"> - <h4 class="ui top attached normal header df ac sb"> + <div class="diff-file-box diff-box file-content gt-mt-3" id="diff-incomplete"> + <h4 class="ui top attached normal header gt-df gt-ac gt-sb"> {{$.locale.Tr "repo.diff.too_many_files"}} <a class="ui basic tiny button" id="diff-show-more-files" data-href="{{$.Link}}?skip-to={{.Diff.End}}&file-only=true">{{.locale.Tr "repo.diff.show_more"}}</a> </h4> diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl index f51e840721..2ce0612e63 100644 --- a/templates/repo/diff/comment_form.tmpl +++ b/templates/repo/diff/comment_form.tmpl @@ -21,7 +21,7 @@ {{.locale.Tr "loading"}} </div> </div> - <div class="field footer mx-3"> + <div class="field footer gt-mx-3"> <span class="markup-info">{{svg "octicon-markup"}} {{$.root.locale.Tr "repo.diff.comment.markdown_info"}}</span> <div class="ui right"> {{if $.reply}} diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl index 8fc51e62f2..c5cdf75085 100644 --- a/templates/repo/diff/comments.tmpl +++ b/templates/repo/diff/comments.tmpl @@ -8,10 +8,10 @@ {{template "shared/user/avatarlink" .Poster}} {{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 $.root.Repository.GetOriginalURLHostname)}} {{.OriginalAuthor}} </span> @@ -30,7 +30,7 @@ </span> {{end}} </div> - <div class="comment-header-right actions df ac"> + <div class="comment-header-right actions gt-df gt-ac"> {{if and .Review}} {{if eq .Review.Type 0}} <div class="ui label basic small yellow pending-label tooltip" data-content="{{$.root.locale.Tr "repo.issues.review.pending.tooltip" ($.root.locale.Tr "repo.diff.review") ($.root.locale.Tr "repo.diff.review.approve") ($.root.locale.Tr "repo.diff.review.comment") ($.root.locale.Tr "repo.diff.review.reject")}}"> diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl index 1010863b79..97ef7c2da8 100644 --- a/templates/repo/diff/compare.tmpl +++ b/templates/repo/diff/compare.tmpl @@ -49,7 +49,7 @@ </div> <div class="menu"> <div class="ui icon search input"> - <i class="icon df ac jc m-0">{{svg "octicon-filter" 16}}</i> + <i class="icon gt-df gt-ac gt-jc gt-m-0">{{svg "octicon-filter" 16}}</i> <input name="search" placeholder="{{.locale.Tr "repo.filter_branch_and_tag"}}..."> </div> <div class="header"> @@ -57,12 +57,12 @@ <div class="two column row"> <a class="reference column" href="#" data-target=".base-branch-list"> <span class="text black"> - {{svg "octicon-git-branch" 16 "mr-2"}}{{.locale.Tr "repo.branches"}} + {{svg "octicon-git-branch" 16 "gt-mr-2"}}{{.locale.Tr "repo.branches"}} </span> </a> <a class="reference column" href="#" data-target=".base-tag-list"> <span class="text black"> - {{svg "octicon-tag" 16 "mr-2"}}{{.locale.Tr "repo.tags"}} + {{svg "octicon-tag" 16 "gt-mr-2"}}{{.locale.Tr "repo.tags"}} </span> </a> </div> @@ -118,7 +118,7 @@ </div> <div class="menu"> <div class="ui icon search input"> - <i class="icon df ac jc m-0">{{svg "octicon-filter" 16}}</i> + <i class="icon gt-df gt-ac gt-jc gt-m-0">{{svg "octicon-filter" 16}}</i> <input name="search" placeholder="{{.locale.Tr "repo.filter_branch_and_tag"}}..."> </div> <div class="header"> @@ -126,12 +126,12 @@ <div class="two column row"> <a class="reference column" href="#" data-target=".head-branch-list"> <span class="text black"> - {{svg "octicon-git-branch" 16 "mr-2"}}{{.locale.Tr "repo.branches"}} + {{svg "octicon-git-branch" 16 "gt-mr-2"}}{{.locale.Tr "repo.branches"}} </span> </a> <a class="reference column" href="#" data-target=".head-tag-list"> <span class="text black"> - {{svg "octicon-tag" 16 "mr-2"}}{{.locale.Tr "repo.tags"}} + {{svg "octicon-tag" 16 "gt-mr-2"}}{{.locale.Tr "repo.tags"}} </span> </a> </div> diff --git a/templates/repo/diff/conversation.tmpl b/templates/repo/diff/conversation.tmpl index 204a2146f8..b6d577ee5a 100644 --- a/templates/repo/diff/conversation.tmpl +++ b/templates/repo/diff/conversation.tmpl @@ -3,18 +3,18 @@ {{$isNotPending := (not (eq (index .comments 0).Review.Type 0))}} <div class="conversation-holder" data-path="{{(index .comments 0).TreePath}}" data-side="{{if lt (index .comments 0).Line 0}}left{{else}}right{{end}}" data-idx="{{(index .comments 0).UnsignedLine}}"> {{if $resolved}} - <div class="ui attached header resolved-placeholder df ac sb"> + <div class="ui attached header resolved-placeholder gt-df gt-ac gt-sb"> <div class="ui grey text"> - {{svg "octicon-check" 16 "icon mr-2"}} + {{svg "octicon-check" 16 "icon gt-mr-2"}} <b>{{$resolveDoer.Name}}</b> {{$.locale.Tr "repo.issues.review.resolved_by"}} </div> <div> - <button id="show-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="ui tiny right labeled button show-outdated df ac"> - {{svg "octicon-unfold" 16 "mr-3"}} + <button id="show-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="ui tiny right labeled button show-outdated gt-df gt-ac"> + {{svg "octicon-unfold" 16 "gt-mr-3"}} {{$.locale.Tr "repo.issues.review.show_resolved"}} </button> - <button id="hide-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated df ac"> - {{svg "octicon-fold" 16 "mr-3"}} + <button id="hide-outdated-{{(index .comments 0).ID}}" data-comment="{{(index .comments 0).ID}}" class="hide ui tiny right labeled button hide-outdated gt-df gt-ac"> + {{svg "octicon-fold" 16 "gt-mr-3"}} {{$.locale.Tr "repo.issues.review.hide_resolved"}} </button> </div> @@ -26,8 +26,8 @@ {{template "repo/diff/comments" dict "root" $ "comments" .comments}} </ui> </div> - <div class="df je js-small ac fw mt-3"> - <div class="ui buttons mr-2"> + <div class="gt-df gt-je gt-js-small gt-ac gt-fw gt-mt-3"> + <div class="ui buttons gt-mr-2"> <button class="ui icon tiny basic button previous-conversation"> {{svg "octicon-arrow-up" 12 "icon"}} {{$.locale.Tr "repo.issues.previous"}} </button> @@ -45,8 +45,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> diff --git a/templates/repo/diff/image_diff.tmpl b/templates/repo/diff/image_diff.tmpl index 4b95c8d85f..d068a12d13 100644 --- a/templates/repo/diff/image_diff.tmpl +++ b/templates/repo/diff/image_diff.tmpl @@ -74,7 +74,7 @@ </div> {{end}} </div> - <div class="ui active centered inline loader mb-4"></div> + <div class="ui active centered inline loader gt-mb-4"></div> </div> </td> </tr> diff --git a/templates/repo/diff/new_review.tmpl b/templates/repo/diff/new_review.tmpl index 60ebb61fb9..8586cd6a56 100644 --- a/templates/repo/diff/new_review.tmpl +++ b/templates/repo/diff/new_review.tmpl @@ -1,5 +1,5 @@ <div class="ui top right pointing dropdown custom" id="review-box"> - <div class="ui tiny green button btn-review ml-2 mr-0"> + <div class="ui tiny green button btn-review gt-ml-2 gt-mr-0"> {{.locale.Tr "repo.diff.review"}} <span class="ui small label review-comments-counter" data-pending-comment-number="{{.PendingCodeCommentNumber}}">{{.PendingCodeCommentNumber}}</span> {{svg "octicon-triangle-down" 14 "dropdown icon"}} @@ -9,9 +9,9 @@ <form class="ui form" action="{{.Link}}/reviews/submit" method="post"> {{.CsrfTokenHtml}} <input type="hidden" name="commit_id" value="{{.AfterCommitID}}"/> - <div class="header df ac pb-3"> - <div class="f1">{{$.locale.Tr "repo.diff.review.header"}}</div> - <a class="muted close px-3">{{svg "octicon-x" 16}}</a> + <div class="header gt-df gt-ac gt-pb-3"> + <div class="gt-f1">{{$.locale.Tr "repo.diff.review.header"}}</div> + <a class="muted close gt-px-3">{{svg "octicon-x" 16}}</a> </div> <div class="ui field"> <textarea name="content" tabindex="0" rows="2" placeholder="{{$.locale.Tr "repo.diff.review.placeholder"}}"></textarea> diff --git a/templates/repo/diff/section_split.tmpl b/templates/repo/diff/section_split.tmpl index 24302e536f..c4b5ad042c 100644 --- a/templates/repo/diff/section_split.tmpl +++ b/templates/repo/diff/section_split.tmpl @@ -32,7 +32,7 @@ {{- $rightDiff := ""}}{{if $match.RightIdx}}{{$rightDiff = $section.GetComputedInlineDiffFor $match $.root.locale}}{{end}} <td class="lines-num lines-num-old del-code" data-line-num="{{$line.LeftIdx}}"><span rel="diff-{{$file.NameHash}}L{{$line.LeftIdx}}"></span></td> <td class="lines-escape del-code lines-escape-old">{{if $line.LeftIdx}}{{if $leftDiff.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{template "repo/diff/escape_title" dict "diff" $leftDiff "locale" $.root.locale}}"></a>{{end}}{{end}}</td> - <td class="lines-type-marker lines-type-marker-old del-code"><span class="mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td> + <td class="lines-type-marker lines-type-marker-old del-code"><span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td> <td class="lines-code lines-code-old halfwidth del-code">{{/* */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/* */}}<a class="ui primary button add-code-comment add-code-comment-left{{if (not $line.CanComment)}} invisible{{end}}" data-side="left" data-idx="{{$line.LeftIdx}}">{{/* @@ -47,7 +47,7 @@ */}}</td> <td class="lines-num lines-num-new add-code" data-line-num="{{if $match.RightIdx}}{{$match.RightIdx}}{{end}}"><span rel="{{if $match.RightIdx}}diff-{{$file.NameHash}}R{{$match.RightIdx}}{{end}}"></span></td> <td class="lines-escape add-code lines-escape-new">{{if $match.RightIdx}}{{if $rightDiff.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{template "repo/diff/escape_title" dict "diff" $rightDiff "locale" $.root.locale}}"></a>{{end}}{{end}}</td> - <td class="lines-type-marker lines-type-marker-new add-code">{{if $match.RightIdx}}<span class="mono" data-type-marker="{{$match.GetLineTypeMarker}}"></span>{{end}}</td> + <td class="lines-type-marker lines-type-marker-new add-code">{{if $match.RightIdx}}<span class="gt-mono" data-type-marker="{{$match.GetLineTypeMarker}}"></span>{{end}}</td> <td class="lines-code lines-code-new halfwidth add-code">{{/* */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/* */}}<a class="ui primary button add-code-comment add-code-comment-right{{if (not $match.CanComment)}} invisible{{end}}" data-side="right" data-idx="{{$match.RightIdx}}">{{/* @@ -64,7 +64,7 @@ {{$inlineDiff := $section.GetComputedInlineDiffFor $line $.root.locale}} <td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$file.NameHash}}L{{$line.LeftIdx}}{{end}}"></span></td> <td class="lines-escape lines-escape-old">{{if $line.LeftIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.root.locale}}"></a>{{end}}{{end}}</td> - <td class="lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td> + <td class="lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td> <td class="lines-code lines-code-old halfwidth">{{/* */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 2))}}{{/* */}}<a class="ui primary button add-code-comment add-code-comment-left{{if (not $line.CanComment)}} invisible{{end}}" data-side="left" data-idx="{{$line.LeftIdx}}">{{/* @@ -79,7 +79,7 @@ */}}</td> <td class="lines-num lines-num-new" data-line-num="{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}"><span rel="{{if $line.RightIdx}}diff-{{$file.NameHash}}R{{$line.RightIdx}}{{end}}"></span></td> <td class="lines-escape lines-escape-new">{{if $line.RightIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.root.locale}}"></a>{{end}}{{end}}</td> - <td class="lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td> + <td class="lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span>{{end}}</td> <td class="lines-code lines-code-new halfwidth">{{/* */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 3))}}{{/* */}}<a class="ui primary button add-code-comment add-code-comment-right{{if (not $line.CanComment)}} invisible{{end}}" data-side="right" data-idx="{{$line.RightIdx}}">{{/* diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl index e83b1f779c..63cd510221 100644 --- a/templates/repo/diff/section_unified.tmpl +++ b/templates/repo/diff/section_unified.tmpl @@ -27,7 +27,7 @@ {{end}} {{$inlineDiff := $section.GetComputedInlineDiffFor $line $.root.locale -}} <td class="lines-escape">{{if $inlineDiff.EscapeStatus.Escaped}}<a href="" class="toggle-escape-button" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff "locale" $.root.locale}}"></a>{{end}}</td> - <td class="lines-type-marker"><span class="mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td> + <td class="lines-type-marker"><span class="gt-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td> {{if eq .GetType 4}} <td class="chroma lines-code blob-hunk">{{/* */}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.root.locale}}{{/* diff --git a/templates/repo/diff/stats.tmpl b/templates/repo/diff/stats.tmpl index fd1cb019a1..ac6e45a7e4 100644 --- a/templates/repo/diff/stats.tmpl +++ b/templates/repo/diff/stats.tmpl @@ -1,4 +1,4 @@ {{Add .file.Addition .file.Deletion}} -<span class="diff-stats-bar tooltip mx-3" data-content="{{.root.locale.Tr "repo.diff.stats_desc_file" (Add .file.Addition .file.Deletion) .file.Addition .file.Deletion | Str2html}}"> +<span class="diff-stats-bar tooltip gt-mx-3" data-content="{{.root.locale.Tr "repo.diff.stats_desc_file" (Add .file.Addition .file.Deletion) .file.Addition .file.Deletion | Str2html}}"> <div class="diff-stats-add-bar" style="width: {{DiffStatsWidth .file.Addition .file.Deletion}}%"></div> </span> diff --git a/templates/repo/diff/whitespace_dropdown.tmpl b/templates/repo/diff/whitespace_dropdown.tmpl index 47a5ab5533..cacfb20a27 100644 --- a/templates/repo/diff/whitespace_dropdown.tmpl +++ b/templates/repo/diff/whitespace_dropdown.tmpl @@ -3,26 +3,26 @@ {{svg "octicon-triangle-down" 14 "dropdown icon"}} <div class="menu"> <a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=show-all"> - <label class="pointer-events-none"> - <input class="mr-3 pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "show-all"}} checked{{end}}> + <label class="gt-pointer-events-none"> + <input class="gt-mr-3 gt-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "show-all"}} checked{{end}}> {{.locale.Tr "repo.diff.whitespace_show_everything"}} </label> </a> <a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-all"> - <label class="pointer-events-none"> - <input class="mr-3 pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-all"}} checked{{end}}> + <label class="gt-pointer-events-none"> + <input class="gt-mr-3 gt-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-all"}} checked{{end}}> {{.locale.Tr "repo.diff.whitespace_ignore_all_whitespace"}} <label> </a> <a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-change"> - <label class="pointer-events-none"> - <input class="mr-3 pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-change"}} checked{{end}}> + <label class="gt-pointer-events-none"> + <input class="gt-mr-3 gt-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-change"}} checked{{end}}> {{.locale.Tr "repo.diff.whitespace_ignore_amount_changes"}} </label> </a> <a class="item" href="?style={{if .IsSplitStyle}}split{{else}}unified{{end}}&whitespace=ignore-eol"> - <label class="pointer-events-none"> - <input class="mr-3 pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-eol"}} checked{{end}}> + <label class="gt-pointer-events-none"> + <input class="gt-mr-3 gt-pointer-events-none" type="radio"{{if eq .WhitespaceBehavior "ignore-eol"}} checked{{end}}> {{.locale.Tr "repo.diff.whitespace_ignore_at_eol"}} </label> </a> |