mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-23 06:28:01 +02:00
Create Progressive Web App (#4730)
* Create manifest and serviceworker * Create templates and add AppSubUrl * Add JSRenderer * fix ctx type * Add JSRenderer to static.go * Complete adding {{AppSubUrl}} * Add more fonts to urlsToCache * Add 512px and 192px icons * Hardcode font MD5 * Default theme doesn't have a specific CSS file
This commit is contained in:

committed by
techknowlogick

parent
e09fe48773
commit
294904321c
@ -791,6 +791,15 @@ func RegisterRoutes(m *macaron.Macaron) {
|
||||
}
|
||||
})
|
||||
|
||||
// Progressive Web App
|
||||
m.Get("/manifest.json", templates.JSONRenderer(), func(ctx *context.Context) {
|
||||
ctx.HTML(200, "pwa/manifest_json")
|
||||
})
|
||||
|
||||
m.Get("/serviceworker.js", templates.JSRenderer(), func(ctx *context.Context) {
|
||||
ctx.HTML(200, "pwa/serviceworker_js")
|
||||
})
|
||||
|
||||
// prometheus metrics endpoint
|
||||
if setting.Metrics.Enabled {
|
||||
c := metrics.NewCollector()
|
||||
|
Reference in New Issue
Block a user