diff --git a/.gitignore b/.gitignore index c969d7b..57751d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Binaries build/ +toolbox *.exe *.exe~ *.dll diff --git a/cmd/toolbox/main.go b/cmd/toolbox/main.go index 8ace6ee..6311487 100644 --- a/cmd/toolbox/main.go +++ b/cmd/toolbox/main.go @@ -13,6 +13,7 @@ import ( "sort" "strconv" "toolbox/pkg/base" + _ "toolbox/pkg/football" _ "toolbox/pkg/learnnumber" _ "toolbox/pkg/zitie" // 匿名导入以触发 init() @@ -89,18 +90,22 @@ func main() { keywords := "个人工具箱, 汉字字帖生成, 书法练习, 数字学习, Own-Tools" baseURL := "https://toolbox.pengzhan.dev" canonical := baseURL + path - // 针对不同路径设置 SEO 标签 - switch path { - case "/zitie": - title = "汉字字帖生成器 - 教学方格与步进式分解" - desc = "在线生成 2x3 教学方格字帖和 9 列步进式笔顺分解字帖,支持多种书法字体和古风排版。" - keywords = "字帖生成, 笔顺分解, 汉字教学, 书法字帖, 练字" - case "/learn-number": - title = "趣味数字学习工具" - desc = "为儿童设计的数字学习与计数练习工具,生动活泼,寓教于乐。" - keywords = "数字学习, 儿童计数, 幼小衔接" - } - + // 针对不同路径设置 SEO 标签 + switch path { + case "/zitie": + title = "汉字字帖生成器 - 教学方格与步进式分解" + desc = "在线生成 2x3 教学方格字帖和 9 列步进式笔顺分解字帖,支持多种书法字体和古风排版。" + keywords = "字帖生成, 笔顺分解, 汉字教学, 书法字帖, 练字" + case "/learn-number": + title = "趣味数字学习工具" + desc = "为儿童设计的数字学习与计数练习工具,生动活泼,寓教于乐。" + keywords = "数字学习, 儿童计数, 幼小衔接" + case "/football": + title = "2026世界杯小组出线模拟器 - 蒙特卡洛预测" + desc = "使用蒙特卡洛算法模拟2026年美加墨世界杯小组赛出线概率,支持自定义比赛概率、小组球队及已有赛果。" + keywords = "2026世界杯, 小组出线概率, 蒙特卡洛模拟, 足球预测" + } + data := gin.H{ "Title": title, "Description": desc, diff --git a/cmd/toolbox/web/index.html b/cmd/toolbox/web/index.html index 7bdcf25..1dc8cb2 100644 --- a/cmd/toolbox/web/index.html +++ b/cmd/toolbox/web/index.html @@ -14,6 +14,7 @@ {{template "zitie" .}} {{template "learn_number" .}} +{{template "football" .}}