aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2021-04-08 20:20:31 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2021-04-08 20:20:31 +0530
commitc866ff3317bd86facf8dfa14edd2064fed10c09f (patch)
tree335902d61c27ca4c65fad5e567327e89b5799410 /main.go
parentb33e3fe60f4ae7eff88ab1ca28f45f94d2d9d713 (diff)
worked on the main page
Diffstat (limited to 'main.go')
-rw-r--r--main.go14
1 files changed, 10 insertions, 4 deletions
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)
}