diff --git a/modules/templates/helper.go b/modules/templates/helper.go index 9037af899198..9e1c2fd38141 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -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) != "" { diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 0fd87f925640..99c215493db2 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -21,44 +21,44 @@
{{.i18n.Tr "startpage.install_desc" | Str2html}} @@ -24,7 +24,7 @@
{{.i18n.Tr "startpage.platform_desc" | Str2html}} @@ -34,7 +34,7 @@
{{.i18n.Tr "startpage.lightweight_desc" | Str2html}} @@ -42,7 +42,7 @@
{{.i18n.Tr "startpage.license_desc" | Str2html}} diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl index 6593900c1eb8..17cc58fcbb0c 100644 --- a/templates/org/header.tmpl +++ b/templates/org/header.tmpl @@ -9,11 +9,11 @@
{{.Org.Description}}
{{end}}{{svg "octicon-git-commit" 16}}{{ShortSha .Commit.ID.String}} · · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}
+{{svg "octicon-git-commit"}}{{ShortSha .Commit.ID.String}} · · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}
{{end}} {{end}} @@ -27,8 +27,8 @@ @@ -53,10 +53,10 @@{{$.i18n.Tr "repo.branch.deleted_by" .DeletedBranch.DeletedBy.Name}} {{TimeSinceUnix .DeletedBranch.DeletedUnix $.i18n.Lang}}
{{else}} {{if .IsProtected}} - {{svg "octicon-shield-lock" 16}} + {{svg "octicon-shield-lock"}} {{end}} {{.Name}} -{{svg "octicon-git-commit" 16}}{{ShortSha .Commit.ID.String}} · · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}
+{{svg "octicon-git-commit"}}{{ShortSha .Commit.ID.String}} · · {{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}
{{end}}