From 0e4fea6914375f0257e0eb9f2dc0dfa7c296347b Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 21 Feb 2022 15:21:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B9=B3=E5=8F=B0=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- options/locale/locale_en-US.ini | 1 + options/locale/locale_zh-CN.ini | 1 + routers/home.go | 5 +++ routers/routes/routes.go | 1 + templates/base/footer_content.tmpl | 2 ++ templates/terms.tmpl | 70 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 80 insertions(+) create mode 100644 templates/terms.tmpl diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 1c9471cf7..d26f603f6 100755 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -2764,6 +2764,7 @@ head.dataset = Datasets foot.council = Council foot.technical_committee = Technical Committee foot.join = Join OpenI +foot.agreement=Use agreement foot.news = News foot.community_news = Community News foot.member_news = Member news diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 669c34cc1..31f4ed947 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -2774,6 +2774,7 @@ head.dataset=数据集 foot.council=理事会 foot.technical_committee=技术委员会 foot.join=加入启智 +foot.agreement=使用协议 foot.news=动态 foot.community_news=社区动态 foot.member_news=成员动态 diff --git a/routers/home.go b/routers/home.go index 397e1990d..2db8d2112 100755 --- a/routers/home.go +++ b/routers/home.go @@ -38,6 +38,7 @@ const ( tplExploreCode base.TplName = "explore/code" tplExploreImages base.TplName = "explore/images" tplExploreExploreDataAnalysis base.TplName = "explore/data_analysis" + tplHomeTerm base.TplName = "terms" ) // Home render home page @@ -596,3 +597,7 @@ func RecommendRepoFromPromote(ctx *context.Context) { ctx.JSON(200, result) } } + +func HomeTerm(ctx *context.Context) { + ctx.HTML(200, tplHomeTerm) +} diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 8f678121a..aab04ac52 100755 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -319,6 +319,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Get("/action/notification", routers.ActionNotification) m.Get("/recommend/org", routers.RecommendOrgFromPromote) m.Get("/recommend/repo", routers.RecommendRepoFromPromote) + m.Get("/home/term", routers.HomeTerm) m.Group("/explore", func() { m.Get("", func(ctx *context.Context) { ctx.Redirect(setting.AppSubURL + "/explore/repos") diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl index 42084b871..7db18ed3d 100755 --- a/templates/base/footer_content.tmpl +++ b/templates/base/footer_content.tmpl @@ -8,6 +8,8 @@ {{.i18n.Tr "custom.foot.council"}} {{.i18n.Tr "custom.foot.technical_committee"}} {{.i18n.Tr "custom.foot.join"}} + {{.i18n.Tr "custom.foot.agreement"}} +