* Prevent Firefox from using apple-touch-icon The opaque background does not work well in Firefox which uses the icon as a "rich icon". Prevent this by not specifying it in HTML. Real Apple devices will still request the icon on the static path. Fixes: https://github.com/go-gitea/gitea/issues/10394 Also adjust gitignore so app.ini.sample becomes searchable and fixed a variable name in app.ini.sample. * fix gitignoretags/v1.10.5
/bin | /bin | ||||
/dist | /dist | ||||
/custom | |||||
/custom/* | |||||
!/custom/conf | |||||
/custom/conf/* | |||||
!/custom/conf/app.ini.sample | |||||
/data | /data | ||||
/indexers | /indexers | ||||
/log | /log |
PROTOCOL = http | PROTOCOL = http | ||||
DOMAIN = localhost | DOMAIN = localhost | ||||
ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/ | ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/ | ||||
; when STATIC_URL_PREFIX is empty it will follow APP_URL | |||||
; when STATIC_URL_PREFIX is empty it will follow ROOT_URL | |||||
STATIC_URL_PREFIX = | STATIC_URL_PREFIX = | ||||
; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket. | ; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket. | ||||
HTTP_ADDR = 0.0.0.0 | HTTP_ADDR = 0.0.0.0 |
} | } | ||||
}) | }) | ||||
m.Get("/apple-touch-icon.png", func(ctx *context.Context) { | |||||
ctx.Redirect(path.Join(setting.StaticURLPrefix, "img/apple-touch-icon.png"), 301) | |||||
}) | |||||
// Progressive Web App | // Progressive Web App | ||||
m.Get("/manifest.json", templates.JSONRenderer(), func(ctx *context.Context) { | m.Get("/manifest.json", templates.JSONRenderer(), func(ctx *context.Context) { | ||||
ctx.HTML(200, "pwa/manifest_json") | ctx.HTML(200, "pwa/manifest_json") |
}; | }; | ||||
</script> | </script> | ||||
<link rel="shortcut icon" href="{{StaticUrlPrefix}}/img/favicon.png"> | <link rel="shortcut icon" href="{{StaticUrlPrefix}}/img/favicon.png"> | ||||
<link rel="apple-touch-icon" href="{{StaticUrlPrefix}}/img/apple-touch-icon.png"> | |||||
<link rel="mask-icon" href="{{StaticUrlPrefix}}/img/gitea-safari.svg" color="#609926"> | <link rel="mask-icon" href="{{StaticUrlPrefix}}/img/gitea-safari.svg" color="#609926"> | ||||
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css"> | <link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css"> | ||||
<link rel="preload" as="font" href="{{StaticUrlPrefix}}/fomantic/themes/default/assets/fonts/icons.woff2" type="font/woff2" crossorigin="anonymous"> | <link rel="preload" as="font" href="{{StaticUrlPrefix}}/fomantic/themes/default/assets/fonts/icons.woff2" type="font/woff2" crossorigin="anonymous"> |