personal-website/routewde/wde.go
2023-04-13 04:09:07 +03:00

31 lines
669 B
Go

package routewde
import (
"net/http"
"personalwebsite/webfilesystem"
"github.com/gin-gonic/gin"
)
func Route(route *gin.RouterGroup) {
route.GET("/getbasicwindow", func(ctx *gin.Context) {
ctx.HTML(http.StatusOK, "basic-window.html", nil)
})
route.GET("/renderMobileDesktop", func(ctx *gin.Context) {
ctx.HTML(http.StatusOK, "base/mobile-desktop.tmpl", nil)
})
widgets := route.Group("widgets")
{
widgets.GET("/file-tile-view", func(ctx *gin.Context) {
fs := webfilesystem.WebFileSystem{}
list := fs.List()
ctx.HTML(http.StatusOK, "wde-widgets/file-tile-view.tmpl", gin.H{
"Name": "Greg Brzezinski",
"Files": list,
})
})
}
}