aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user/auth
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-06-13 12:51:02 +0200
committerGitHub <noreply@github.com>2023-06-13 10:51:02 +0000
commita51b115b0ad755562c71f6a382326c59868dfb96 (patch)
tree55a9b74065daad1b51a7ff0835f03e63b11c181a /templates/user/auth
parent2ad2d5a6cea7e0e61bd213167244066c230b054e (diff)
downloadgitea-a51b115b0ad755562c71f6a382326c59868dfb96.tar.gz
gitea-a51b115b0ad755562c71f6a382326c59868dfb96.zip
Use inline SVG for built-in OAuth providers (#25171)
The plan is that all built-in auth providers use inline SVG for more flexibility in styling and to get the GitHub icon to follow `currentcolor`. This only removes the `public/img/auth` directory and adds the missing svgs to our svg build. It should map the built-in providers to these SVGs and render them. If the user has set a Icon URL, it should render that as an `img` tag instead. ``` gitea-azure-ad gitea-bitbucket gitea-discord gitea-dropbox gitea-facebook gitea-gitea gitea-gitlab gitea-google gitea-mastodon gitea-microsoftonline gitea-nextcloud gitea-twitter gitea-yandex octicon-mark-github ``` GitHub logo is now white again on dark theme: <img width="431" alt="Screenshot 2023-06-12 at 21 45 34" src="https://github.com/go-gitea/gitea/assets/115237/27a43504-d60a-4132-a502-336b25883e4d"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/user/auth')
-rw-r--r--templates/user/auth/signin_inner.tmpl10
1 files changed, 5 insertions, 5 deletions
diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl
index 22cb620bfe..504457f394 100644
--- a/templates/user/auth/signin_inner.tmpl
+++ b/templates/user/auth/signin_inner.tmpl
@@ -53,16 +53,16 @@
{{end}}
{{if and .OrderedOAuth2Names .OAuth2Providers}}
- <div id="oauth2-login-navigator">
+ <div class="ui horizontal divider">
+ {{.locale.Tr "sign_in_or"}}
+ </div>
+ <div id="oauth2-login-navigator" class="gt-py-2">
<div class="gt-df gt-fc gt-jc">
- <div class="ui horizontal divider">
- {{.locale.Tr "sign_in_or"}}
- </div>
<div id="oauth2-login-navigator-inner" class="gt-df gt-fc gt-fw gt-ac gt-gap-3">
{{range $key := .OrderedOAuth2Names}}
{{$provider := index $.OAuth2Providers $key}}
<a class="{{$provider.Name}} ui button gt-df gt-ac gt-jc gt-py-3 oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$key}}">
- <img class="gt-mr-3" width="20" height="20" src="{{$provider.IconURL}}" alt="{{$provider.DisplayName}}">
+ {{$provider.IconHTML}}
{{$.locale.Tr "sign_in_with_provider" $provider.DisplayName}}
</a>
{{end}}