22 lines
437 B
Go
22 lines
437 B
Go
package handler
|
|
|
|
import (
|
|
"net/http"
|
|
"time"
|
|
|
|
"github.com/labstack/echo/v4"
|
|
"gitnet.fr/deblan/remote-i3wm-go/internal/config"
|
|
"gitnet.fr/deblan/remote-i3wm-go/internal/render"
|
|
)
|
|
|
|
type HomeViewParams struct {
|
|
Config config.Config
|
|
Now time.Time
|
|
}
|
|
|
|
func HomeHandler(c echo.Context, conf config.Config) error {
|
|
return c.HTML(http.StatusOK, render.View("page/home.html", HomeViewParams{
|
|
Config: conf,
|
|
Now: time.Now(),
|
|
}))
|
|
}
|