personal-website/routewde/wde.go

27 lines
545 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)
})
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,
})
})
}
}