mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-31 03:00:03 +02:00
Make SVG size argument optional (#12814)
Now defaults to 16 on both frontend and backend. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
26c4a049da
commit
ffddf3f8a6
89 changed files with 458 additions and 455 deletions
|
@ -470,7 +470,10 @@ var heightRe = regexp.MustCompile(`height="[0-9]+?"`)
|
|||
|
||||
// SVG render icons - arguments icon name (string), size (int), class (string)
|
||||
func SVG(icon string, others ...interface{}) template.HTML {
|
||||
var size = others[0].(int)
|
||||
size := 16
|
||||
if len(others) > 0 && others[0].(int) != 0 {
|
||||
size = others[0].(int)
|
||||
}
|
||||
|
||||
class := ""
|
||||
if len(others) > 1 && others[1].(string) != "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue