Added brand images

This commit is contained in:
Eduard Urbach 2017-06-17 15:14:15 +02:00
parent 9cabc42cb8
commit c740fb3da8
9 changed files with 18 additions and 7 deletions

View File

@ -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")
})

View File

@ -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,

View File

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 447 KiB

After

Width:  |  Height:  |  Size: 447 KiB

View File

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 97 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -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)
}
}