From 511f87d5b5fdb57323ff1c4164a32dba7f4fbe0b Mon Sep 17 00:00:00 2001 From: colorfulberry Date: Tue, 2 Jun 2020 11:04:48 +0800 Subject: [PATCH] feat: improve the pages for the footer --- custom/templates/base/footer_content.tmpl | 41 ---- custom/templates/base/head.tmpl | 196 ------------------ custom/templates/base/head_navbar.tmpl | 183 ---------------- custom/templates/custom/header.tmpl | 3 - custom/templates/org/header.tmpl | 27 --- custom/templates/org/home.tmpl | 87 -------- custom/templates/org/member/members.tmpl | 75 ------- custom/templates/org/team/teams.tmpl | 48 ----- templates/base/footer_content.tmpl | 53 +++-- templates/base/head.tmpl | 6 +- templates/base/head_navbar.tmpl | 68 ++++-- templates/org/header.tmpl | 29 +-- templates/org/home.tmpl | 127 ++++++------ templates/org/member/members.tmpl | 125 ++++++----- .../templates => templates}/org/navber.tmpl | 0 .../org/repo_list.tmpl | 0 templates/org/team/teams.tmpl | 65 +++--- 17 files changed, 265 insertions(+), 868 deletions(-) delete mode 100644 custom/templates/base/footer_content.tmpl delete mode 100644 custom/templates/base/head.tmpl delete mode 100644 custom/templates/base/head_navbar.tmpl delete mode 100644 custom/templates/custom/header.tmpl delete mode 100644 custom/templates/org/header.tmpl delete mode 100644 custom/templates/org/home.tmpl delete mode 100644 custom/templates/org/member/members.tmpl delete mode 100644 custom/templates/org/team/teams.tmpl rename {custom/templates => templates}/org/navber.tmpl (100%) rename {custom/templates => templates}/org/repo_list.tmpl (100%) diff --git a/custom/templates/base/footer_content.tmpl b/custom/templates/base/footer_content.tmpl deleted file mode 100644 index 2a144f821..000000000 --- a/custom/templates/base/footer_content.tmpl +++ /dev/null @@ -1,41 +0,0 @@ - diff --git a/custom/templates/base/head.tmpl b/custom/templates/base/head.tmpl deleted file mode 100644 index cad2c976d..000000000 --- a/custom/templates/base/head.tmpl +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - {{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/custom/templates/base/head_navbar.tmpl b/custom/templates/base/head_navbar.tmpl deleted file mode 100644 index 274604f36..000000000 --- a/custom/templates/base/head_navbar.tmpl +++ /dev/null @@ -1,183 +0,0 @@ - diff --git a/custom/templates/custom/header.tmpl b/custom/templates/custom/header.tmpl deleted file mode 100644 index 8e11abcf4..000000000 --- a/custom/templates/custom/header.tmpl +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/custom/templates/org/header.tmpl b/custom/templates/org/header.tmpl deleted file mode 100644 index a2ceaac5f..000000000 --- a/custom/templates/org/header.tmpl +++ /dev/null @@ -1,27 +0,0 @@ - -
-
-
-
-
- {{with .Org}} - - {{.DisplayName}} - {{end}} - - {{if .IsOrganizationOwner}} - - {{end}} - {{if .CanCreateOrgRepo}} - - {{end}} -
-
-
-
-
- diff --git a/custom/templates/org/home.tmpl b/custom/templates/org/home.tmpl deleted file mode 100644 index a81e8ac17..000000000 --- a/custom/templates/org/home.tmpl +++ /dev/null @@ -1,87 +0,0 @@ -{{template "base/head" .}} -
- {{/* overflow: auto is the clearfix - this avoids the image going beyond - the container where it is supposed to stay inside. */}} -
-
- -
-
- {{.Org.DisplayName}} - {{if .IsOrganizationOwner}}{{svg "octicon-gear" 16}}{{end}} -
- {{if .Org.Description}}

{{.Org.Description}}

{{end}} -
- {{if .Org.Location}}
{{svg "octicon-location" 16}} {{.Org.Location}}
{{end}} - {{if .Org.Website}}
{{svg "octicon-link" 16}} {{.Org.Website}}
{{end}} -
-
-
-
- -
-
- {{template "org/navber" .}} - -
-
-
- {{if .CanCreateOrgRepo}} - - {{end}} - {{template "org/repo_list" .}} - {{template "base/paginate" .}} -
- -
-

- {{.i18n.Tr "org.people"}} - {{if .IsOrganizationMember}} - - {{end}} -

-
- {{$isMember := .IsOrganizationMember}} - {{range .Members}} - {{if or $isMember (.IsPublicMember $.Org.ID)}} - - {{end}} - {{end}} -
- - {{if .IsOrganizationMember}} -
- {{.i18n.Tr "org.teams"}} - -
- - {{if .IsOrganizationOwner}} - - {{end}} - {{end}} -
-
-
- -
-
-
-{{template "base/footer" .}} diff --git a/custom/templates/org/member/members.tmpl b/custom/templates/org/member/members.tmpl deleted file mode 100644 index 810a9eabb..000000000 --- a/custom/templates/org/member/members.tmpl +++ /dev/null @@ -1,75 +0,0 @@ -{{template "base/head" .}} -
- {{template "org/header" .}} -
- {{template "base/alert" .}} -
- {{template "org/navber" .}} - -
- {{ range .Members}} -
-
- -
- -
{{.FullName}}
-
-
- {{$.i18n.Tr "org.members.membership_visibility"}} -
-
- {{ $isPublic := index $.MembersIsPublicMember .ID}} - {{if $isPublic}} - {{$.i18n.Tr "org.members.public"}} - {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}({{$.i18n.Tr "org.members.public_helper"}}){{end}} - {{else}} - {{$.i18n.Tr "org.members.private"}} - {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}({{$.i18n.Tr "org.members.private_helper"}}){{end}} - {{end}} -
-
-
- {{$.i18n.Tr "org.members.member_role"}} -
-
- {{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock" 16}} {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}} -
-
-
- 2FA -
-
- - {{if index $.MembersTwoFaStatus .ID}} - {{svg "octicon-check" 16}} - {{else}} - {{svg "octicon-x" 16}} - {{end}} - -
-
-
- {{if eq $.SignedUser.ID .ID}} -
- {{$.CsrfTokenHtml}} - -
- {{else if $.IsOrganizationOwner}} -
- {{$.CsrfTokenHtml}} - -
- {{end}} -
-
-
- {{end}} -
- - {{template "base/paginate" .}} -
- -
-
-{{template "base/footer" .}} diff --git a/custom/templates/org/team/teams.tmpl b/custom/templates/org/team/teams.tmpl deleted file mode 100644 index 21bd47e9e..000000000 --- a/custom/templates/org/team/teams.tmpl +++ /dev/null @@ -1,48 +0,0 @@ -{{template "base/head" .}} -
- {{template "org/header" .}} -
- {{template "base/alert" .}} - -
- - {{template "org/navber" .}} - -
-
- {{range .Teams}} -
-
- {{.Name}} -
- {{if .IsMember $.SignedUser.ID}} -
- {{$.CsrfTokenHtml}} - -
- {{else if $.IsOrganizationOwner}} -
- {{$.CsrfTokenHtml}} - -
- {{end}} -
-
-
- {{range .Members}} - - - - {{end}} -
-
-

{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}

-
-
- {{end}} -
-
-
-
-
-{{template "base/footer" .}} diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl index db4c19c15..2a144f821 100644 --- a/templates/base/footer_content.tmpl +++ b/templates/base/footer_content.tmpl @@ -1,26 +1,41 @@ diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index eae238923..cad2c976d 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -1,10 +1,10 @@ - + - {{if .Title}}{{.Title | RenderEmojiPlain}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}} + {{if .Title}}{{.Title}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}} {{if UseServiceWorker}}