summaryrefslogtreecommitdiffstats
path: root/templates/repo/diff
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-03-24 15:31:35 +0100
committerGitHub <noreply@github.com>2024-03-24 14:31:35 +0000
commit90a4f9a49eecc4b672df0c29f5034be25244191c (patch)
tree3bb1a79ce8a51ef93c2e19b806b1cf7d07530a4d /templates/repo/diff
parent2d281704de8c5b67592dd7f9362620927230ef2b (diff)
downloadgitea-90a4f9a49eecc4b672df0c29f5034be25244191c.tar.gz
gitea-90a4f9a49eecc4b672df0c29f5034be25244191c.zip
Migrate `gap` helpers to tailwind (#30034)
Commands ran: ```sh perl -p -i -e 's#gt-gap-0#tw-gap-0#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-1#tw-gap-0.5#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-2#tw-gap-1#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-3#tw-gap-2#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-4#tw-gap-4#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-5#tw-gap-8#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-x-0#tw-gap-x-0#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-x-1#tw-gap-x-0.5#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-x-2#tw-gap-x-1#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-x-3#tw-gap-x-2#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-x-4#tw-gap-x-4#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-x-5#tw-gap-x-8#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-y-0#tw-gap-y-0#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-y-1#tw-gap-y-0.5#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-y-2#tw-gap-y-1#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-y-3#tw-gap-y-2#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-y-4#tw-gap-y-4#g' web_src/js/**/* templates/**/* perl -p -i -e 's#gt-gap-y-5#tw-gap-y-8#g' web_src/js/**/* templates/**/*
Diffstat (limited to 'templates/repo/diff')
-rw-r--r--templates/repo/diff/box.tmpl6
-rw-r--r--templates/repo/diff/conversation.tmpl4
2 files changed, 5 insertions, 5 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index 51c0aae007..9fd8593c53 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -1,7 +1,7 @@
{{$showFileTree := (and (not .DiffNotAvailable) (gt .Diff.NumFiles 1))}}
<div>
<div class="diff-detail-box diff-box">
- <div class="tw-flex tw-items-center tw-flex-wrap gt-gap-3 gt-ml-1">
+ <div class="tw-flex tw-items-center tw-flex-wrap tw-gap-2 gt-ml-1">
{{if $showFileTree}}
<button class="diff-toggle-file-tree-button not-mobile btn interact-fg" data-show-text="{{ctx.Locale.Tr "repo.diff.show_file_tree"}}" data-hide-text="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}">
{{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}}
@@ -111,7 +111,7 @@
{{$isReviewFile := and $.IsSigned $.PageIsPullFiles (not $.IsArchived) $.IsShowingAllCommits}}
<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} gt-mt-0" 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 header tw-font-normal tw-flex tw-items-center tw-justify-between tw-flex-wrap">
- <div class="diff-file-name tw-flex tw-items-center gt-gap-2 tw-flex-wrap">
+ <div class="diff-file-name tw-flex tw-items-center tw-gap-1 tw-flex-wrap">
<button class="fold-file btn interact-bg gt-p-2{{if not $isExpandable}} tw-invisible{{end}}">
{{if $file.ShouldBeHidden}}
{{svg "octicon-chevron-right" 18}}
@@ -144,7 +144,7 @@
<span class="gt-ml-4 gt-mono">{{ctx.Locale.Tr ($file.ModeTranslationKey $file.Mode)}}</span>
{{end}}
</div>
- <div class="diff-file-header-actions tw-flex tw-items-center gt-gap-2 tw-flex-wrap">
+ <div class="diff-file-header-actions tw-flex tw-items-center tw-gap-1 tw-flex-wrap">
{{if $showFileViewToggle}}
<div class="ui compact icon buttons">
<button class="ui tiny basic button file-view-toggle" data-toggle-selector="#diff-source-{{$file.NameHash}}" data-tooltip-content="{{ctx.Locale.Tr "repo.file_view_source"}}">{{svg "octicon-code"}}</button>
diff --git a/templates/repo/diff/conversation.tmpl b/templates/repo/diff/conversation.tmpl
index 85bfe4923a..e689deb1bf 100644
--- a/templates/repo/diff/conversation.tmpl
+++ b/templates/repo/diff/conversation.tmpl
@@ -9,7 +9,7 @@
<div class="conversation-holder" data-path="{{$comment.TreePath}}" data-side="{{if lt $comment.Line 0}}left{{else}}right{{end}}" data-idx="{{$comment.UnsignedLine}}">
{{if $resolved}}
<div class="ui attached header resolved-placeholder tw-flex tw-items-center tw-justify-between">
- <div class="ui grey text tw-flex tw-items-center tw-flex-wrap gt-gap-2">
+ <div class="ui grey text tw-flex tw-items-center tw-flex-wrap tw-gap-1">
{{svg "octicon-check" 16 "icon gt-mr-2"}}
<b>{{$resolveDoer.Name}}</b> {{ctx.Locale.Tr "repo.issues.review.resolved_by"}}
{{if $invalid}}
@@ -22,7 +22,7 @@
</a>
{{end}}
</div>
- <div class="tw-flex tw-items-center gt-gap-3">
+ <div class="tw-flex tw-items-center tw-gap-2">
<button id="show-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="ui tiny labeled button show-outdated tw-flex tw-items-center">
{{svg "octicon-unfold" 16 "gt-mr-3"}}
{{ctx.Locale.Tr "repo.issues.review.show_resolved"}}