Merge pull request '[GITEA] Maintain aspect ratio for auth icons' (#1241) from Gusted/forgejo:forgejo-auth-icon into forgejo-dependency

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1241
This commit is contained in:
Gusted 2023-08-12 13:32:42 +00:00
commit bba92b6c7b
2 changed files with 6 additions and 1 deletions

View file

@ -56,7 +56,7 @@ func (p *AuthSourceProvider) DisplayName() string {
func (p *AuthSourceProvider) IconHTML() template.HTML {
if p.iconURL != "" {
img := fmt.Sprintf(`<img class="gt-mr-3" width="20" height="20" src="%s" alt="%s">`,
img := fmt.Sprintf(`<img class="gt-mr-3 oauth-provider-icon" src="%s" alt="%s">`,
html.EscapeString(p.iconURL), html.EscapeString(p.DisplayName()),
)
return template.HTML(img)

View file

@ -2289,3 +2289,8 @@ table th[data-sortt-desc] .svg {
flex-wrap: wrap;
gap: .25rem;
}
.oauth-provider-icon {
max-height: 20px;
max-width: 20px;
}