personal-website/routewde/wde.go

27 lines
545 B
Go
Raw Normal View History

2023-03-17 01:16:51 +00:00
package routewde
import (
"net/http"
2023-03-22 21:53:06 +00:00
"personalwebsite/webfilesystem"
2023-03-17 01:16:51 +00:00
"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)
})
2023-03-22 21:53:06 +00:00
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,
})
})
}
2023-03-17 01:16:51 +00:00
}