From 6a07cf48465c88ab9895622547db4d41d2255eb9 Mon Sep 17 00:00:00 2001 From: wangjr Date: Fri, 21 Jan 2022 11:23:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=83=E6=A0=A1=E5=88=A0=E9=99=A4=E5=85=AC?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- options/locale/locale_en-US.ini | 1 + options/locale/locale_zh-CN.ini | 1 + templates/base/head_course.tmpl | 209 +++++++++++++++++++++++++++++++ templates/org/course_list.tmpl | 2 +- templates/org/home_courses.tmpl | 2 +- templates/org/member/course_members.tmpl | 2 +- templates/org/team/courseTeams.tmpl | 2 +- 7 files changed, 215 insertions(+), 4 deletions(-) create mode 100644 templates/base/head_course.tmpl diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 99b382ed5..40e64cb06 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -2040,6 +2040,7 @@ org_full_name_holder = Organization Full Name org_name_helper = Organization names should be short and memorable. create_org = Create Organization repo_updated = Updated +repo_released = Released home = Home people = People teams = Teams diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index e942a17b9..688712996 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -2052,6 +2052,7 @@ org_full_name_holder=组织全名 org_name_helper=组织名字应该简单明了。 create_org=创建组织 repo_updated=最后更新于 +repo_released=发布于 home=组织主页 people=组织成员 teams=组织团队 diff --git a/templates/base/head_course.tmpl b/templates/base/head_course.tmpl new file mode 100644 index 000000000..3fff0b8d2 --- /dev/null +++ b/templates/base/head_course.tmpl @@ -0,0 +1,209 @@ + + + + + + + {{if .Title}}{{.Title}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}} + + {{if UseServiceWorker}} + + {{else}} + + {{end}} + + + + + + + {{if .IsSigned}} + + {{end}} + {{if .ContextUser}} + + {{end}} + {{if .SearchLimit}} + + {{end}} +{{if .GoGetImport}} + + +{{end}} + + + + + + + + +{{if .RequireSimpleMDE}} + +{{end}} + +{{if .RequireTribute}} + +{{end}} + + + +{{if .RequireMinicolors}} + +{{end}} + +{{if .PageIsUserProfile}} + + + + + {{if .Owner.Description}} + + {{end}} +{{else if .Repository}} + {{if .Issue}} + + + {{if .Issue.Content}} + + {{end}} + {{else}} + + + {{if .Repository.Description}} + + {{end}} + {{end}} + + +{{else}} + + + + + +{{end}} + +{{if .IsSigned }} + {{ if ne .SignedUser.Theme "gitea" }} + + {{end}} +{{else if ne DefaultTheme "gitea"}} + +{{end}} + +{{template "custom/header" .}} + + + + + + {{template "custom/body_outer_pre" .}} + +
+ + + {{template "custom/body_inner_pre" .}} + + {{if not .PageIsInstall}} + + {{end}} +{{/* +
+ + +*/}} + diff --git a/templates/org/course_list.tmpl b/templates/org/course_list.tmpl index 4c85c14bb..1a046b79c 100644 --- a/templates/org/course_list.tmpl +++ b/templates/org/course_list.tmpl @@ -121,7 +121,7 @@ {{end}} - {{$.i18n.Tr "org.repo_updated"}} :   {{TimeSinceUnixShort .UpdatedUnix}} + {{$.i18n.Tr "org.repo_released"}} :   {{TimeSinceUnixShort .CreatedUnix}} diff --git a/templates/org/home_courses.tmpl b/templates/org/home_courses.tmpl index d5bcfc7e5..401a3b5f0 100644 --- a/templates/org/home_courses.tmpl +++ b/templates/org/home_courses.tmpl @@ -81,7 +81,7 @@ } - {{template "base/head" .}} + {{template "base/head_course" .}}
{{/* overflow: auto is the clearfix - this avoids the image going beyond the container where it is supposed to stay inside. */}} diff --git a/templates/org/member/course_members.tmpl b/templates/org/member/course_members.tmpl index 40f933e32..2c710ec2b 100644 --- a/templates/org/member/course_members.tmpl +++ b/templates/org/member/course_members.tmpl @@ -44,7 +44,7 @@ } -{{template "base/head" .}} +{{template "base/head_course" .}}
{{template "org/header" .}} {{template "org/navber_course" .}} diff --git a/templates/org/team/courseTeams.tmpl b/templates/org/team/courseTeams.tmpl index 13557888c..fa7a31548 100644 --- a/templates/org/team/courseTeams.tmpl +++ b/templates/org/team/courseTeams.tmpl @@ -4,7 +4,7 @@ border-bottom:none !important } -{{template "base/head" .}} +{{template "base/head_course" .}}
{{template "org/header" .}} {{template "org/navber_course" .}}