Shioriko/pkg/app/frontend_routes.go

21 lines
361 B
Go
Raw Normal View History

2021-05-09 15:07:23 +00:00
package app
import (
"net/http"
"github.com/Damillora/Shioriko/pkg/config"
"github.com/gin-gonic/gin"
)
func InitializeFrontendRoutes(g *gin.Engine) {
g.NoRoute(frontendHome)
}
func frontendHome(c *gin.Context) {
baseURL := config.CurrentConfig.BaseURL
c.HTML(http.StatusOK, "index.html", gin.H{
2021-05-10 17:37:27 +00:00
"title": "Shioriko",
2021-05-09 15:07:23 +00:00
"base_url": baseURL,
})
}