diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2024-02-21 22:14:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-21 22:14:37 +0800 |
commit | e6e50696b83164805bec83a1b20c95a85a4dd7e5 (patch) | |
tree | 4055d70e88fcda3908568017cf3ae5c2f4279b51 | |
parent | 79217ea63c1f77de7ca79813ae45950724e63d02 (diff) | |
download | gitea-e6e50696b83164805bec83a1b20c95a85a4dd7e5.tar.gz gitea-e6e50696b83164805bec83a1b20c95a85a4dd7e5.zip |
Revert #28753 because UI broken. (#29293)
Revert #29255
Revert #28753
-rw-r--r-- | templates/user/auth/signin_inner.tmpl | 11 | ||||
-rw-r--r-- | templates/user/auth/signin_openid.tmpl | 6 | ||||
-rw-r--r-- | templates/user/auth/signup_inner.tmpl | 14 | ||||
-rw-r--r-- | web_src/css/form.css | 4 | ||||
-rw-r--r-- | web_src/css/helpers.css | 1 |
5 files changed, 23 insertions, 13 deletions
diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl index a0aea5cb9b..40e54ec8fa 100644 --- a/templates/user/auth/signin_inner.tmpl +++ b/templates/user/auth/signin_inner.tmpl @@ -9,20 +9,21 @@ {{end}} </h4> <div class="ui attached segment"> - <form class="ui form gt-max-width-36rem gt-m-auto" action="{{.SignInLink}}" method="post"> + <form class="ui form" action="{{.SignInLink}}" method="post"> {{.CsrfTokenHtml}} <div class="required inline field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}"> <label for="user_name">{{ctx.Locale.Tr "home.uname_holder"}}</label> - <input id="user_name" class="gt-w-full" type="text" name="user_name" value="{{.user_name}}" autofocus required> + <input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required> </div> {{if or (not .DisablePassword) .LinkAccountMode}} <div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}"> <label for="password">{{ctx.Locale.Tr "password"}}</label> - <input id="password" class="gt-w-full" name="password" type="password" value="{{.password}}" autocomplete="current-password" required> + <input id="password" name="password" type="password" value="{{.password}}" autocomplete="current-password" required> </div> {{end}} {{if not .LinkAccountMode}} <div class="inline field"> + <label></label> <div class="ui checkbox"> <label>{{ctx.Locale.Tr "auth.remember_me"}}</label> <input name="remember" type="checkbox"> @@ -33,6 +34,7 @@ {{template "user/auth/captcha" .}} <div class="inline field"> + <label></label> <button class="ui primary button"> {{if .LinkAccountMode}} {{ctx.Locale.Tr "auth.oauth_signin_submit"}} @@ -45,6 +47,7 @@ {{if .ShowRegistrationButton}} <div class="inline field"> + <label></label> <a href="{{AppSubUrl}}/user/sign_up">{{ctx.Locale.Tr "auth.sign_up_now" | Str2html}}</a> </div> {{end}} @@ -57,7 +60,7 @@ <div class="gt-df gt-fc gt-jc"> <div id="oauth2-login-navigator-inner" class="gt-df gt-fc gt-fw gt-ac gt-gap-3"> {{range $provider := .OAuth2Providers}} - <a class="{{$provider.Name}} ui button gt-df gt-ac gt-jc gt-py-3 gt-w-full oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}"> + <a class="{{$provider.Name}} ui button gt-df gt-ac gt-jc gt-py-3 oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}"> {{$provider.IconHTML 28}} {{ctx.Locale.Tr "sign_in_with_provider" $provider.DisplayName}} </a> diff --git a/templates/user/auth/signin_openid.tmpl b/templates/user/auth/signin_openid.tmpl index a138ea0b8d..0428026aa8 100644 --- a/templates/user/auth/signin_openid.tmpl +++ b/templates/user/auth/signin_openid.tmpl @@ -8,7 +8,7 @@ OpenID </h4> <div class="ui attached segment"> - <form class="ui form gt-m-auto" action="{{.Link}}" method="post"> + <form class="ui form" action="{{.Link}}" method="post"> {{.CsrfTokenHtml}} <div class="inline field"> {{ctx.Locale.Tr "auth.openid_signin_desc"}} @@ -18,15 +18,17 @@ {{svg "fontawesome-openid"}} OpenID URI </label> - <input id="openid" class="gt-w-full" name="openid" value="{{.openid}}" autofocus required> + <input id="openid" name="openid" value="{{.openid}}" autofocus required> </div> <div class="inline field"> + <label></label> <div class="ui checkbox"> <label>{{ctx.Locale.Tr "auth.remember_me"}}</label> <input name="remember" type="checkbox"> </div> </div> <div class="inline field"> + <label></label> <button class="ui primary button">{{ctx.Locale.Tr "sign_in"}}</button> </div> </form> diff --git a/templates/user/auth/signup_inner.tmpl b/templates/user/auth/signup_inner.tmpl index 65ce98c31a..e930bd3d15 100644 --- a/templates/user/auth/signup_inner.tmpl +++ b/templates/user/auth/signup_inner.tmpl @@ -7,7 +7,7 @@ {{end}} </h4> <div class="ui attached segment"> - <form class="ui form gt-max-width-36rem gt-m-auto" action="{{.SignUpLink}}" method="post"> + <form class="ui form" action="{{.SignUpLink}}" method="post"> {{.CsrfTokenHtml}} {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}} {{template "base/alert" .}} @@ -17,27 +17,28 @@ {{else}} <div class="required inline field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}"> <label for="user_name">{{ctx.Locale.Tr "username"}}</label> - <input id="user_name" class="gt-w-full" type="text" name="user_name" value="{{.user_name}}" autofocus required> + <input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required> </div> <div class="required inline field {{if .Err_Email}}error{{end}}"> <label for="email">{{ctx.Locale.Tr "email"}}</label> - <input id="email" class="gt-w-full" name="email" type="email" value="{{.email}}" required> + <input id="email" name="email" type="email" value="{{.email}}" required> </div> {{if not .DisablePassword}} <div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}"> <label for="password">{{ctx.Locale.Tr "password"}}</label> - <input id="password" class="gt-w-full" name="password" type="password" value="{{.password}}" autocomplete="new-password" required> + <input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required> </div> <div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}"> <label for="retype">{{ctx.Locale.Tr "re_type"}}</label> - <input id="retype" class="gt-w-full" name="retype" type="password" value="{{.retype}}" autocomplete="new-password" required> + <input id="retype" name="retype" type="password" value="{{.retype}}" autocomplete="new-password" required> </div> {{end}} {{template "user/auth/captcha" .}} <div class="inline field"> + <label></label> <button class="ui primary button"> {{if .LinkAccountMode}} {{ctx.Locale.Tr "auth.oauth_signup_submit"}} @@ -49,6 +50,7 @@ {{if not .LinkAccountMode}} <div class="inline field"> + <label></label> <a href="{{AppSubUrl}}/user/login">{{ctx.Locale.Tr "auth.register_helper_msg"}}</a> </div> {{end}} @@ -62,7 +64,7 @@ <div class="gt-df gt-fc gt-jc"> <div id="oauth2-login-navigator-inner" class="gt-df gt-fc gt-fw gt-ac gt-gap-3"> {{range $provider := .OAuth2Providers}} - <a class="{{$provider.Name}} ui button gt-df gt-ac gt-jc gt-py-3 gt-w-full oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}"> + <a class="{{$provider.Name}} ui button gt-df gt-ac gt-jc gt-py-3 oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}"> {{$provider.IconHTML 28}} {{ctx.Locale.Tr "sign_in_with_provider" $provider.DisplayName}} </a> diff --git a/web_src/css/form.css b/web_src/css/form.css index a5288c9309..e4efa34948 100644 --- a/web_src/css/form.css +++ b/web_src/css/form.css @@ -242,6 +242,8 @@ textarea:focus, .user.activate form, .user.forgot.password form, .user.reset.password form, +.user.link-account form, +.user.signin form, .user.signup form { margin: auto; width: 700px !important; @@ -276,6 +278,8 @@ textarea:focus, .user.activate form .inline.field > label, .user.forgot.password form .inline.field > label, .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 { text-align: right; width: 250px !important; diff --git a/web_src/css/helpers.css b/web_src/css/helpers.css index c7d8abb1d4..da94ebb486 100644 --- a/web_src/css/helpers.css +++ b/web_src/css/helpers.css @@ -48,7 +48,6 @@ Gitea's private styles use `g-` prefix. .gt-max-width-12rem { max-width: 12rem !important; } .gt-max-width-24rem { max-width: 24rem !important; } -.gt-max-width-36rem { max-width: 36rem !important; } /* below class names match Tailwind CSS */ .gt-break-all { word-break: break-all !important; } |