Added SVG icons from Font Awesome

This commit is contained in:
2017-06-16 18:12:18 +02:00
parent 6e3e818552
commit 3b62457861
797 changed files with 837 additions and 2846 deletions

18
utils/icons.go Normal file
View File

@ -0,0 +1,18 @@
package utils
import (
"io/ioutil"
"strings"
)
// Icon ...
func Icon(name string) string {
data, _ := ioutil.ReadFile("images/icons/svg/" + name + ".svg")
return strings.Replace(string(data), "<svg ", "<svg class='icon' ", 1)
}
// RawIcon ...
func RawIcon(name string) string {
data, _ := ioutil.ReadFile("images/icons/svg/" + name + ".svg")
return strings.Replace(string(data), "<svg ", "<svg class='raw-icon' ", 1)
}