From a51b115b0ad755562c71f6a382326c59868dfb96 Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 13 Jun 2023 12:51:02 +0200 Subject: 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: Screenshot 2023-06-12 at 21 45 34 --------- Co-authored-by: wxiaoguang --- templates/user/auth/signin_inner.tmpl | 10 +++++----- templates/user/settings/security/accountlinks.tmpl | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'templates/user') 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}} -
+
+ {{.locale.Tr "sign_in_or"}} +
+
-
- {{.locale.Tr "sign_in_or"}} -
{{range $key := .OrderedOAuth2Names}} {{$provider := index $.OAuth2Providers $key}} {{end}} diff --git a/templates/user/settings/security/accountlinks.tmpl b/templates/user/settings/security/accountlinks.tmpl index e7a685bb9f..bcf432f690 100644 --- a/templates/user/settings/security/accountlinks.tmpl +++ b/templates/user/settings/security/accountlinks.tmpl @@ -8,7 +8,7 @@ {{range $key := .OrderedOAuth2Names}} {{$provider := index $.OAuth2Providers $key}} - {{$provider.DisplayName}} + {{$provider.IconHTML}} {{$provider.DisplayName}} {{end}} -- cgit v1.2.3