From ee9e83b230981437acf8c331e93a41cdc95af443 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Fri, 25 Aug 2023 14:47:59 +0800 Subject: [PATCH] Remove incorrect CSS helper classes (#26712) --- templates/repo/diff/conversation.tmpl | 2 +- templates/user/auth/captcha.tmpl | 10 +++++----- web_src/css/form.css | 26 +++++++++++++------------- web_src/css/helpers.css | 6 ------ web_src/css/org.css | 6 ++---- 5 files changed, 21 insertions(+), 29 deletions(-) diff --git a/templates/repo/diff/conversation.tmpl b/templates/repo/diff/conversation.tmpl index ce344794e..639dd9cd0 100644 --- a/templates/repo/diff/conversation.tmpl +++ b/templates/repo/diff/conversation.tmpl @@ -37,7 +37,7 @@ {{template "repo/diff/comments" dict "root" $ "comments" .comments}} -
+
{{else if eq .CaptchaType "mcaptcha"}} -
- {{.locale.Tr "captcha"}} -
-
+
+ +
+
{{else if eq .CaptchaType "cfturnstile"}} -
+
{{end}}{{end}} diff --git a/web_src/css/form.css b/web_src/css/form.css index 9527ef9d4..1bd192095 100644 --- a/web_src/css/form.css +++ b/web_src/css/form.css @@ -179,8 +179,7 @@ textarea:focus, #create-page-form form .header { padding-left: 280px !important; } - #create-page-form form .inline.field > label, - #create-page-form form .inline.field.captcha-field > span { + #create-page-form form .inline.field > label { text-align: right; width: 250px !important; word-wrap: break-word; @@ -206,6 +205,13 @@ textarea:focus, } } +.m-captcha-style { + width: 100%; + height: 5em; + vertical-align: middle; + display: inline-block; +} + @media (min-width: 768px) { .g-recaptcha-style, .h-captcha-style { @@ -219,6 +225,9 @@ textarea:focus, width: 302px !important; height: 76px !important; } + .m-captcha-style { + width: 50%; + } } @media (max-height: 575px) { @@ -271,13 +280,7 @@ textarea:focus, .user.reset.password form .inline.field > label, .user.link-account form .inline.field > label, .user.signin form .inline.field > label, - .user.signup form .inline.field > label, - .user.activate form .inline.field.captcha-field > span, - .user.forgot.password form .inline.field.captcha-field > span, - .user.reset.password form .inline.field.captcha-field > span, - .user.link-account form .inline.field.captcha-field > span, - .user.signin form .inline.field.captcha-field > span, - .user.signup form .inline.field.captcha-field > span { + .user.signup form .inline.field > label { text-align: right; width: 250px !important; word-wrap: break-word; @@ -421,10 +424,7 @@ textarea:focus, } .repository.new.repo form .inline.field > label, .repository.new.migrate form .inline.field > label, - .repository.new.fork form .inline.field > label, - .repository.new.repo form .inline.field.captcha-field > span, - .repository.new.migrate form .inline.field.captcha-field > span, - .repository.new.fork form .inline.field.captcha-field > span { + .repository.new.fork form .inline.field > label { text-align: right; width: 250px !important; word-wrap: break-word; diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css index 35b5d3c97..17a89ebfb 100644 --- a/web_src/css/helpers.css +++ b/web_src/css/helpers.css @@ -273,12 +273,6 @@ Gitea's private styles use `g-` prefix. .gt-font-17 { font-size: 17px !important } .gt-font-18 { font-size: 18px !important } -@media (max-width: 767.98px) { - .gt-db-small { display: block !important; } - .gt-w-100-small { width: 100% !important; } - .gt-js-small { justify-content: flex-start !important; } -} - /* gt-hidden must be placed after all other "display: xxx !important" classes to win the chance do not use: diff --git a/web_src/css/org.css b/web_src/css/org.css index 4bb3b0cd5..061d30bef 100644 --- a/web_src/css/org.css +++ b/web_src/css/org.css @@ -13,8 +13,7 @@ #create-page-form form .header { padding-left: 280px !important; } - #create-page-form form .inline.field > label, - #create-page-form form .inline.field.captcha-field > span { + #create-page-form form .inline.field > label { text-align: right; width: 250px !important; word-wrap: break-word; @@ -59,8 +58,7 @@ .organization.new.org form .header { padding-left: 280px !important; } - .organization.new.org form .inline.field > label, - .organization.new.org form .inline.field.captcha-field > span { + .organization.new.org form .inline.field > label { text-align: right; width: 250px !important; word-wrap: break-word;