Skip to content

Commit 9cef7a4

Browse files
GiteaBotsilverwindwxiaoguang
authored
Use inline SVG for built-in OAuth providers (#25171) (#25234)
Backport #25171 by @silverwind 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: silverwind <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
1 parent c207b94 commit 9cef7a4

34 files changed

+57
-27
lines changed

modules/svg/svg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ func RenderHTML(icon string, others ...interface{}) template.HTML {
6262
}
6363
return template.HTML(svgStr)
6464
}
65-
return template.HTML("")
65+
return ""
6666
}

public/img/auth/azureadv2.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

public/img/auth/gitea.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

public/img/auth/github.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

public/img/auth/gitlab.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

public/img/svg/gitea-azuread.svg

Lines changed: 1 addition & 0 deletions
Loading

public/img/svg/gitea-azureadv2.svg

Lines changed: 1 addition & 0 deletions
Loading

public/img/svg/gitea-bitbucket.svg

Lines changed: 1 addition & 0 deletions
Loading

public/img/svg/gitea-discord.svg

Lines changed: 1 addition & 0 deletions
Loading

public/img/svg/gitea-dropbox.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)