From c866ff3317bd86facf8dfa14edd2064fed10c09f Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Thu, 8 Apr 2021 20:20:31 +0530 Subject: worked on the main page --- main.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 168c98a..837dce2 100644 --- a/main.go +++ b/main.go @@ -16,12 +16,13 @@ func main() { router.Use(gin.Logger()) router.LoadHTMLGlob("templates/*") - // css static routes + // static routes router.Static("/css", "static/css") router.Static("/old/css", "static/css/old") - // js static routes - /*router.Static("/scripts", "static/scripts") - router.Static("/media", "static/media")*/ + + router.Static("/media", "static/media") + + //router.Static("/scripts", "static/scripts") // serve classic themed pages router.GET("/old", func (c *gin.Context) { @@ -40,5 +41,10 @@ func main() { fmt.Println(name) }) + // serve new themed pages + router.GET("/", func (c *gin.Context) { + c.HTML(http.StatusOK, "index.html", nil) + }) + router.Run(":" + port) } -- cgit v1.2.3