2026-03-01 15:27:45 +08:00
|
|
|
package frontend
|
2025-10-17 20:18:42 +08:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"html/template"
|
|
|
|
|
"io/fs"
|
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// loadTemplates loads templates from the embedded file system
|
|
|
|
|
func LoadTemplates(filesystem fs.FS) *template.Template {
|
|
|
|
|
templ := template.Must(template.New("").ParseFS(filesystem, "*.html"))
|
|
|
|
|
return templ
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func IndexPage(c *gin.Context) {
|
|
|
|
|
c.HTML(http.StatusOK, "index.html", nil)
|
|
|
|
|
}
|