diff --git a/main.go b/main.go index 5d8af2c..d4d38c5 100644 --- a/main.go +++ b/main.go @@ -11,10 +11,11 @@ func NewApp() *gin.Engine { r := gin.Default() - r.LoadHTMLGlob("templates/*.tmpl") + r.LoadHTMLGlob("templates/index.tmpl") + r.Static("/static", "./static") r.GET("/", func(c *gin.Context) { - c.HTML(200, "index.tmpl", gin.H{ + c.HTML(200, "users/index.tmpl", gin.H{ "pubTo": "Users", }) }) @@ -31,17 +32,6 @@ func NewApp() *gin.Engine { c.String(403, "") }) - // Get user value - r.GET("/user/:name", func(c *gin.Context) { - user := c.Params.ByName("name") - value, ok := DB[user] - if ok { - c.JSON(200, gin.H{"user": user, "value": value}) - } else { - c.JSON(200, gin.H{"user": user, "status": "no value"}) - } - }) - return r } diff --git a/templates/index.html b/templates/index.html deleted file mode 100644 index 13e340d..0000000 --- a/templates/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - Hacker Slides - - - - - -
-
- Present -
-
-
- -
- -
- - - - - - - - diff --git a/templates/index.tmpl b/templates/index.tmpl index c9c3948..b3c2d48 100644 --- a/templates/index.tmpl +++ b/templates/index.tmpl @@ -14,11 +14,10 @@
- Present + Present
-