mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-14 11:48:09 -05:00
16 lines
344 B
Go
16 lines
344 B
Go
|
package shared
|
||
|
|
||
|
import (
|
||
|
"html"
|
||
|
"html/template"
|
||
|
"strconv"
|
||
|
|
||
|
"code.gitea.io/gitea/modules/setting"
|
||
|
)
|
||
|
|
||
|
func ImgIcon(name string, size int) template.HTML {
|
||
|
s := strconv.Itoa(size)
|
||
|
src := html.EscapeString(setting.StaticURLPrefix + "/assets/img/" + name)
|
||
|
return template.HTML(`<img width="` + s + `" height="` + s + `" src="` + src + `">`)
|
||
|
}
|