summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorJohn Olheiser <42128690+jolheiser@users.noreply.github.com>2020-02-17 17:11:59 -0600
committerGitHub <noreply@github.com>2020-02-17 23:11:59 +0000
commite76a64dda173db84e34eefc6baaa2981fe4a6801 (patch)
tree649a0606dfbb7eb55ac6d99a42fcfe8d62453172 /modules
parent05c1f2b45c168bbf3ec9192f424798846c452d57 (diff)
downloadgitea-e76a64dda173db84e34eefc6baaa2981fe4a6801.tar.gz
gitea-e76a64dda173db84e34eefc6baaa2981fe4a6801.zip
Inject SVG sprite via ajax (#10320)
* AJAX SVG * Fix PWA * Remove unused PWA assets Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-Authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'modules')
-rw-r--r--modules/templates/helper.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index 30ca9c1638..a97431a69e 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -287,7 +287,7 @@ 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))
+ return template.HTML(fmt.Sprintf(`<svg class="svg %s" width="%d" height="%d" aria-hidden="true"><use xlink:href="#%s" /></svg>`, icon, size, size, icon))
},
}}
}