This commit is contained in:
@@ -2,10 +2,22 @@ package hn
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/flosch/pongo2"
|
||||
"github.com/labstack/echo"
|
||||
)
|
||||
|
||||
func indexHandler(c echo.Context) error {
|
||||
return c.Render(http.StatusOK, "index", nil)
|
||||
tc := pongo2.Context{
|
||||
"time": time.Now().UTC().Format(time.RFC3339Nano),
|
||||
}
|
||||
return c.Render(http.StatusOK, "index.html", tc)
|
||||
}
|
||||
|
||||
func aboutHandler(c echo.Context) error {
|
||||
tc := pongo2.Context{
|
||||
"time": time.Now().UTC().Format(time.RFC3339Nano),
|
||||
}
|
||||
return c.Render(http.StatusOK, "about.html", tc)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user