31 lines
669 B
Go
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,
|
|
})
|
|
})
|
|
}
|
|
}
|