feat: Add Learn-Number tool for preschool math practice and refactor HTML components
Build and Push Docker Image / build (push) Successful in 2m55s

This commit is contained in:
2026-02-25 19:22:58 -08:00
parent e320f9ee50
commit 0be94026c5
9 changed files with 396 additions and 82 deletions
+3 -2
View File
@@ -11,6 +11,7 @@ import (
"os"
"strconv"
"toolbox/pkg/base"
_ "toolbox/pkg/learnnumber"
_ "toolbox/pkg/zitie" // 匿名导入以触发 init()
"github.com/gin-gonic/gin"
@@ -55,8 +56,8 @@ func main() {
r.StaticFS("/static", http.FS(subFS))
// 3. 模板引擎初始化
// 关键修复:先 Sub 再 Parse,确保路径匹配
tmpl, err := template.ParseFS(subFS, "layout.html", "index.html")
// 递归加载 web 目录下所有的 .html 文件
tmpl, err := template.ParseFS(subFS, "layout.html", "index.html", "tools/*.html")
if err != nil {
log.Fatalf("Failed to parse templates: %v", err)
}