diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2024-02-27 22:31:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-27 14:31:41 +0000 |
commit | 9a8c90ee18095d284192476834d5d23074d136f3 (patch) | |
tree | 6134bf357b2614e96b4fbe12ad54b87b5927e0aa | |
parent | 0900c1552b51c5d1d883bd3662e67891a5dac80d (diff) | |
download | gitea-9a8c90ee18095d284192476834d5d23074d136f3.tar.gz gitea-9a8c90ee18095d284192476834d5d23074d136f3.zip |
Use tailwind instead of `gt-[wh]-` helper classes (#29423)
Follow #29357
- Replace `gt-w-*` -> `tw-w-*` and remove `gt-w-*`
- Replace `gt-h-*` -> `tw-h-*` and remove `gt-h-*`
-rw-r--r-- | templates/admin/self_check.tmpl | 2 | ||||
-rw-r--r-- | templates/base/head_navbar.tmpl | 4 | ||||
-rw-r--r-- | templates/devtest/fomantic-modal.tmpl | 8 | ||||
-rw-r--r-- | templates/repo/diff/box.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/card.tmpl | 2 | ||||
-rw-r--r-- | templates/status/404.tmpl | 2 | ||||
-rw-r--r-- | web_src/css/helpers.css | 6 |
7 files changed, 10 insertions, 16 deletions
diff --git a/templates/admin/self_check.tmpl b/templates/admin/self_check.tmpl index 6bca01ec65..fafaf9242d 100644 --- a/templates/admin/self_check.tmpl +++ b/templates/admin/self_check.tmpl @@ -20,7 +20,7 @@ {{if .DatabaseCheckInconsistentCollationColumns}} <div class="ui red message"> {{ctx.Locale.Tr "admin.self_check.database_inconsistent_collation_columns" .DatabaseCheckResult.DatabaseCollation}} - <ul class="gt-w-full"> + <ul class="tw-w-full"> {{range .DatabaseCheckInconsistentCollationColumns}} <li>{{.}}</li> {{end}} diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index effe4dcea9..3797de0a0f 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -13,14 +13,14 @@ <!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column --> <div class="ui secondary menu item navbar-mobile-right"> {{if .IsSigned}} - <a id="mobile-notifications-icon" class="item gt-w-auto gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}"> + <a id="mobile-notifications-icon" class="item tw-w-auto gt-p-3" href="{{AppSubUrl}}/notifications" data-tooltip-content="{{ctx.Locale.Tr "notifications"}}" aria-label="{{ctx.Locale.Tr "notifications"}}"> <div class="gt-relative"> {{svg "octicon-bell"}} <span class="notification_count{{if not $notificationUnreadCount}} gt-hidden{{end}}">{{$notificationUnreadCount}}</span> </div> </a> {{end}} - <button class="item gt-w-auto ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle">{{svg "octicon-three-bars"}}</button> + <button class="item tw-w-auto ui icon mini button gt-p-3 gt-m-0" id="navbar-expand-toggle">{{svg "octicon-three-bars"}}</button> </div> <!-- navbar links non-mobile --> diff --git a/templates/devtest/fomantic-modal.tmpl b/templates/devtest/fomantic-modal.tmpl index eda169a043..0b4199a197 100644 --- a/templates/devtest/fomantic-modal.tmpl +++ b/templates/devtest/fomantic-modal.tmpl @@ -5,7 +5,7 @@ <div id="test-modal-form-1" class="ui mini modal"> <div class="header">Form dialog (layout 1)</div> <form class="content" method="post"> - <div class="ui input gt-w-full"><input name="user_input"></div> + <div class="ui input tw-w-full"><input name="user_input"></div> {{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}} </form> </div> @@ -14,7 +14,7 @@ <div class="header">Form dialog (layout 2)</div> <form method="post"> <div class="content"> - <div class="ui input gt-w-full"><input name="user_input"></div> + <div class="ui input tw-w-full"><input name="user_input"></div> {{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}} </div> </form> @@ -24,7 +24,7 @@ <div class="header">Form dialog (layout 3)</div> <form method="post"> <div class="content"> - <div class="ui input gt-w-full"><input name="user_input"></div> + <div class="ui input tw-w-full"><input name="user_input"></div> </div> {{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}} </form> @@ -33,7 +33,7 @@ <div id="test-modal-form-4" class="ui mini modal"> <div class="header">Form dialog (layout 4)</div> <div class="content"> - <div class="ui input gt-w-full"><input name="user_input"></div> + <div class="ui input tw-w-full"><input name="user_input"></div> </div> <form method="post"> {{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}} diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index b9a43a0612..c24500a149 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -203,7 +203,7 @@ {{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"> - <table class="chroma gt-w-full"> + <table class="chroma tw-w-full"> {{if $isImage}} {{template "repo/diff/image_diff" dict "file" . "root" $ "blobBase" $blobBase "blobHead" $blobHead "sniffedTypeBase" $sniffedTypeBase "sniffedTypeHead" $sniffedTypeHead}} {{else}} diff --git a/templates/repo/issue/card.tmpl b/templates/repo/issue/card.tmpl index 7fb3d82827..5e524079c8 100644 --- a/templates/repo/issue/card.tmpl +++ b/templates/repo/issue/card.tmpl @@ -6,7 +6,7 @@ {{end}} </div> {{end}} - <div class="content gt-p-0 gt-w-full"> + <div class="content gt-p-0 tw-w-full"> <div class="gt-df gt-items-start"> <div class="issue-card-icon"> {{template "shared/issueicon" .}} diff --git a/templates/status/404.tmpl b/templates/status/404.tmpl index a8cd3d3290..f1f1199665 100644 --- a/templates/status/404.tmpl +++ b/templates/status/404.tmpl @@ -1,5 +1,5 @@ {{template "base/head" .}} -<div role="main" aria-label="{{.Title}}" class="page-content ui container center gt-w-screen {{if .IsRepo}}repository{{end}}"> +<div role="main" aria-label="{{.Title}}" class="page-content ui container center tw-w-screen {{if .IsRepo}}repository{{end}}"> {{if .IsRepo}}{{template "repo/header" .}}{{end}} <div class="ui container center"> <p style="margin-top: 100px"><img src="{{AssetUrlPrefix}}/img/404.png" alt="404"></p> diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css index da94ebb486..3579c193b1 100644 --- a/web_src/css/helpers.css +++ b/web_src/css/helpers.css @@ -73,12 +73,6 @@ Gitea's private styles use `g-` prefix. .gt-overflow-x-scroll { overflow-x: scroll !important; } .gt-overflow-y-hidden { overflow-y: hidden !important; } -.gt-h-screen { height: 100vh !important; } -.gt-h-full { height: 100% !important; } -.gt-w-auto { width: auto !important; } -.gt-w-screen { width: 100vw !important; } -.gt-w-full { width: 100% !important; } - .gt-float-left { float: left !important; } .gt-float-right { float: right !important; } .gt-clear-both { clear: both !important; } |