phoenix/views/render.go

13 lines
354 B
Go
Raw Normal View History

2023-11-01 23:18:33 +05:00
package views
import (
"github.com/gin-gonic/gin"
"github.com/ordinary-dev/phoenix/config"
)
// Fill in the necessary parameters from the settings and output html.
func Render(ctx *gin.Context, cfg *config.Config, status int, templatePath string, params map[string]any) {
params["WebsiteTitle"] = cfg.Title
ctx.HTML(status, templatePath, params)
}