mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Use object-fit: contain for oauth2 custom icons (#26493)
				
					
				
			This commit is contained in:
		@@ -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-object-contain gt-mr-3" width="20" height="20" 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)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user