summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/base/tool.go2
-rw-r--r--modules/templates/helper.go3
2 files changed, 4 insertions, 1 deletions
diff --git a/modules/base/tool.go b/modules/base/tool.go
index aaa6e3ffb3..cb9b996142 100644
--- a/modules/base/tool.go
+++ b/modules/base/tool.go
@@ -389,7 +389,7 @@ func EntryIcon(entry *git.TreeEntry) string {
return "file-submodule"
}
- return "file-text"
+ return "file"
}
// SetupGiteaRoot Sets GITEA_ROOT if it is not already set and returns the value
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index 741161eb8b..30ca9c1638 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -286,6 +286,9 @@ func NewFuncMap() []template.FuncMap {
}
return false
},
+ "svg": func(icon string, size int) template.HTML {
+ return template.HTML(fmt.Sprintf(`<svg class="svg %s" width="%d" height="%d" aria-hidden="true"><use xlink:href="%s/img/svg/icons.svg#%s" /></svg>`, icon, size, size, setting.StaticURLPrefix, icon))
+ },
}}
}