Added brand images
@ -15,7 +15,7 @@ func init() {
|
||||
})
|
||||
|
||||
// Favicon
|
||||
app.Get("/favicon/:size", func(ctx *aero.Context) string {
|
||||
app.Get("/images/brand/:size", func(ctx *aero.Context) string {
|
||||
return ctx.TryWebP("images/brand/"+ctx.Get("size"), ".png")
|
||||
})
|
||||
|
||||
|
19
config.json
@ -28,14 +28,25 @@
|
||||
"static": [
|
||||
"images"
|
||||
],
|
||||
"icons": [
|
||||
"images/characters/arn-waifu.png"
|
||||
],
|
||||
"manifest": {
|
||||
"short_name": "notify.moe",
|
||||
"gcm_sender_id": "941298467524",
|
||||
"theme_color": "#f8a582",
|
||||
"background_color": "#ffffff"
|
||||
"background_color": "#ffffff",
|
||||
"icons": [
|
||||
{
|
||||
"src": "images/brand/64",
|
||||
"sizes": "64x64"
|
||||
},
|
||||
{
|
||||
"src": "images/brand/300",
|
||||
"sizes": "300x300"
|
||||
},
|
||||
{
|
||||
"src": "images/brand/600",
|
||||
"sizes": "600x600"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ports": {
|
||||
"http": 4000,
|
||||
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 447 KiB After Width: | Height: | Size: 447 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
@ -8,11 +8,11 @@ import (
|
||||
var svgIcons = make(map[string]string)
|
||||
|
||||
func init() {
|
||||
files, _ := ioutil.ReadDir("images/icons/svg/")
|
||||
files, _ := ioutil.ReadDir("images/icons/")
|
||||
|
||||
for _, file := range files {
|
||||
name := strings.Replace(file.Name(), ".svg", "", 1)
|
||||
data, _ := ioutil.ReadFile("images/icons/svg/" + name + ".svg")
|
||||
data, _ := ioutil.ReadFile("images/icons/" + name + ".svg")
|
||||
svgIcons[name] = strings.Replace(string(data), "<svg ", "<svg class='icon' ", 1)
|
||||
}
|
||||
}
|
||||
|