From b21affc9a724d8c9d9bcbf05136bcb0128a42292 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Mon, 19 Oct 2020 14:17:35 +0530 Subject: Added English site and a redirect page --- main.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index d7354e3..b7f035a 100644 --- a/main.go +++ b/main.go @@ -19,12 +19,20 @@ func main() { router := gin.New() router.Use(gin.Logger()) - router.LoadHTMLGlob("templates/*.html") + router.LoadHTMLGlob("templates/*") router.Static("/static", "static") - router.GET("/", func(c *gin.Context) { + router.GET("/en", func(c *gin.Context) { + c.HTML(http.StatusOK, "en.index.html", nil) + }) + + router.GET("/jp", func(c *gin.Context) { c.HTML(http.StatusOK, "jp.index.html", nil) }) + router.GET("/", func(c *gin.Context) { + c.HTML(http.StatusOK, "redirect.index.html", nil) + }) + router.Run(":" + port) } -- cgit v1.2.3