Added music page

This commit is contained in:
2017-06-27 13:06:19 +02:00
parent 50fdc64bc5
commit 57fda44d66
5 changed files with 16 additions and 7 deletions

View File

@ -11,9 +11,9 @@ func init() {
files, _ := ioutil.ReadDir("images/icons/")
for _, file := range files {
name := strings.Replace(file.Name(), ".svg", "", 1)
name := strings.TrimSuffix(file.Name(), ".svg")
data, _ := ioutil.ReadFile("images/icons/" + name + ".svg")
svgIcons[name] = strings.Replace(string(data), "<svg ", "<svg class='icon' ", 1)
svgIcons[name] = strings.Replace(string(data), "<svg ", "<svg class='icon icon-"+name+"' ", 1)
}
}