zedshaw.games/common/web.go
2025-09-17 11:32:58 -04:00

14 lines
282 B
Go

package common
import (
"strings"
"github.com/gofiber/fiber/v2"
)
func Page(path string) (func(c *fiber.Ctx) error) {
page_id := strings.ReplaceAll(path, "/", "-") + "-page"
return func (c *fiber.Ctx) error {
return c.Render(path, fiber.Map{"PageId": page_id})
}
}