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:
commit
bba92b6c7b
|
@ -56,7 +56,7 @@ func (p *AuthSourceProvider) DisplayName() string {
|
||||||
|
|
||||||
func (p *AuthSourceProvider) IconHTML() template.HTML {
|
func (p *AuthSourceProvider) IconHTML() template.HTML {
|
||||||
if p.iconURL != "" {
|
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()),
|
html.EscapeString(p.iconURL), html.EscapeString(p.DisplayName()),
|
||||||
)
|
)
|
||||||
return template.HTML(img)
|
return template.HTML(img)
|
||||||
|
|
|
@ -2289,3 +2289,8 @@ table th[data-sortt-desc] .svg {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: .25rem;
|
gap: .25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.oauth-provider-icon {
|
||||||
|
max-height: 20px;
|
||||||
|
max-width: 20px;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue