mobile finder
This commit is contained in:
parent
9f60c185ad
commit
d1c5e8ea15
@ -5,6 +5,7 @@ import (
|
||||
"personalwebsite/apps/appCtx"
|
||||
"personalwebsite/errormessage"
|
||||
|
||||
mobile "github.com/floresj/go-contrib-mobile"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
@ -18,7 +19,15 @@ func (f *FinderApplication) PublicRoutes(routes *gin.RouterGroup) {
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.HTML(http.StatusOK, "finder/app.tmpl", f.Render(appCtx))
|
||||
d := mobile.GetDevice(ctx)
|
||||
switch {
|
||||
case d.Mobile():
|
||||
ctx.HTML(http.StatusOK, "templates/finder/mobile-app.tmpl", gin.H{
|
||||
// "autostart": autostart,
|
||||
})
|
||||
default:
|
||||
ctx.HTML(http.StatusOK, "finder/app.tmpl", f.Render(appCtx))
|
||||
}
|
||||
})
|
||||
|
||||
routes.GET("renderMobileDesktop", func(ctx *gin.Context) {
|
||||
@ -66,7 +75,13 @@ func (f *FinderApplication) PrivateRoutes(routes *gin.RouterGroup) {
|
||||
})
|
||||
return
|
||||
}
|
||||
ctx.HTML(http.StatusOK, "finder/admin-app.tmpl", f.Render(appCtx))
|
||||
d := mobile.GetDevice(ctx)
|
||||
switch {
|
||||
case d.Mobile():
|
||||
ctx.HTML(http.StatusOK, "finder/mobile-app.tmpl", f.Render(appCtx))
|
||||
default:
|
||||
ctx.HTML(http.StatusOK, "finder/admin-app.tmpl", f.Render(appCtx))
|
||||
}
|
||||
})
|
||||
|
||||
routes.GET("renderMobileDesktop", func(ctx *gin.Context) {
|
||||
|
Loading…
Reference in New Issue
Block a user