add routers themes
This commit is contained in:
13
controllers/home.go
Normal file
13
controllers/home.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func Home(c *gin.Context) {
|
||||
c.HTML(http.StatusOK, "home.html", gin.H{
|
||||
"title": "首页",
|
||||
})
|
||||
}
|
||||
13
controllers/showpost.go
Normal file
13
controllers/showpost.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func ShowPost(c *gin.Context) {
|
||||
c.HTML(http.StatusOK, "home.html", gin.H{
|
||||
"title": "首页",
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user