mirror of https://github.com/go-gitea/gitea
Refactor login page (#31530)
As requested in https://github.com/go-gitea/gitea/pull/31504#issuecomment-2196196646. This PR refactor the login page: ![Screenshot from 2024-07-04 19-23-10](https://github.com/go-gitea/gitea/assets/6918444/c45700f4-6747-473c-bdee-2156718a7953) ![Screenshot from 2024-07-04 19-23-21](https://github.com/go-gitea/gitea/assets/6918444/b1bf71cf-85f9-4517-a409-cc6d72e6af8f) ![Screenshot from 2024-06-30 09-35-20](https://github.com/go-gitea/gitea/assets/6918444/728cc37e-0cca-4883-afec-a43663d2c666) # Changes - [x] use separate box for passkey login and go to registration - [x] move forgot passoword next to password label - [x] fix password required label `*` and padding - [x] remove tabs from login page --------- Co-authored-by: silverwind <me@silverwind.io>pull/28086/head^2
parent
b88e5fc72d
commit
9c00dda33a
@ -0,0 +1,29 @@ |
||||
{{if or .OAuth2Providers .EnableOpenIDSignIn}} |
||||
<div class="divider divider-text"> |
||||
{{ctx.Locale.Tr "sign_in_or"}} |
||||
</div> |
||||
<div id="oauth2-login-navigator" class="tw-py-1"> |
||||
<div class="tw-flex tw-flex-col tw-justify-center"> |
||||
<div id="oauth2-login-navigator-inner" class="tw-flex tw-flex-col tw-flex-wrap tw-items-center tw-gap-2"> |
||||
{{range $provider := .OAuth2Providers}} |
||||
<a class="{{$provider.Name}} ui button tw-flex tw-items-center tw-justify-center tw-py-2 tw-w-full oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}"> |
||||
{{$provider.IconHTML 28}} |
||||
{{ctx.Locale.Tr "sign_in_with_provider" $provider.DisplayName}} |
||||
</a> |
||||
{{end}} |
||||
{{if .EnableOpenIDSignIn}} |
||||
<a class="openid ui button tw-flex tw-items-center tw-justify-center tw-py-2 tw-w-full" href="{{AppSubUrl}}/user/login/openid"> |
||||
{{svg "fontawesome-openid" 28 "tw-mr-2"}} |
||||
{{ctx.Locale.Tr "sign_in_with_provider" "OpenID"}} |
||||
</a> |
||||
{{end}} |
||||
{{if .EnableSSPI}} |
||||
<a class="ui button tw-flex tw-items-center tw-justify-center tw-py-2 tw-w-full" rel="nofollow" href="{{AppSubUrl}}/user/login?auth_with_sspi=1"> |
||||
{{svg "fontawesome-windows"}} |
||||
SSPI |
||||
</a> |
||||
{{end}} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{{end}} |
@ -1,24 +0,0 @@ |
||||
{{if or .EnableOpenIDSignIn .EnableSSPI}} |
||||
<overflow-menu class="ui secondary pointing tabular top attached borderless menu navbar secondary-nav"> |
||||
<div class="overflow-menu-items tw-justify-center"> |
||||
<a class="{{if .PageIsLogin}}active {{end}}item" rel="nofollow" href="{{AppSubUrl}}/user/login"> |
||||
{{ctx.Locale.Tr "auth.login_userpass"}} |
||||
</a> |
||||
<a class="{{if .PageIsSignUp}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/sign_up"> |
||||
{{ctx.Locale.Tr "auth.create_new_account"}} |
||||
</a> |
||||
{{if .EnableOpenIDSignIn}} |
||||
<a class="{{if .PageIsLoginOpenID}}active {{end}}item" rel="nofollow" href="{{AppSubUrl}}/user/login/openid"> |
||||
{{svg "fontawesome-openid"}} |
||||
OpenID |
||||
</a> |
||||
{{end}} |
||||
{{if .EnableSSPI}} |
||||
<a class="item" rel="nofollow" href="{{AppSubUrl}}/user/login?auth_with_sspi=1"> |
||||
{{svg "fontawesome-windows"}} |
||||
SSPI |
||||
</a> |
||||
{{end}} |
||||
</div> |
||||
</overflow-menu> |
||||
{{end}} |
@ -1,8 +1,9 @@ |
||||
{{template "base/head" .}} |
||||
<div role="main" aria-label="{{.Title}}" class="page-content user signin{{if .LinkAccountMode}} icon{{end}}"> |
||||
{{template "user/auth/signin_navbar" .}} |
||||
<div class="ui middle very relaxed page grid"> |
||||
<div class="column tw-flex tw-flex-col tw-gap-4 tw-max-w-2xl tw-m-auto"> |
||||
{{template "user/auth/signup_inner" .}} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{{template "base/footer" .}} |
||||
|
Loading…
Reference in new issue