diff --git a/routers/repo/view.go b/routers/repo/view.go index 0d284c42b..9477b27dd 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -808,10 +808,12 @@ func renderCode(ctx *context.Context) { //base repo has the same branch, then compare between current repo branch and base repo's branch compareUrl := ctx.Repo.BranchName + "..." + ctx.Repo.Repository.BaseRepo.OwnerName + "/" + ctx.Repo.Repository.BaseRepo.Name + ":" + ctx.Repo.BranchName ctx.SetParams("*",compareUrl) + ctx.Data["UpstreamSameBranchName"] = true }else{ //else, compare between current repo branch and base repo's default branch compareUrl := ctx.Repo.BranchName + "..." + ctx.Repo.Repository.BaseRepo.OwnerName + "/" + ctx.Repo.Repository.BaseRepo.Name + ":" + ctx.Repo.Repository.BaseRepo.DefaultBranch ctx.SetParams("*",compareUrl) + ctx.Data["UpstreamSameBranchName"] = false } _, _, headGitRepo, compareInfo, _, _ := ParseCompareInfo(ctx) defer headGitRepo.Close() diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 8d52f9115..eaa4cab9a 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -75,7 +75,7 @@ z-index: 11; will-change: transform, opacity; width: 100% !important; - + -webkit-animation-iteration-count: 1; animation-iteration-count: 1; -webkit-animation-duration: 300ms; @@ -86,7 +86,7 @@ animation-fill-mode: both; } - + @@ -94,7 +94,7 @@ {{template "repo/header" .}}
{{template "base/alert" .}} - + {{if and .Permission.IsAdmin (not .Repository.IsArchived)}} - + {{end}}
{{.i18n.Tr "repo.topic.count_prompt"}} {{.i18n.Tr "repo.topic.format_prompt"}}
-
+
{{if .RepoSearchEnabled}} {{end}}
- + {{if .Repository.IsArchived}}
{{.i18n.Tr "repo.archive.title"}} @@ -156,7 +156,7 @@ {{if and .Repository.IsFork .PullRequestCtx.Allowed}} {{if gt .FetchUpstreamCnt 0 }} - + {{else if lt .FetchUpstreamCnt 0}} @@ -164,7 +164,7 @@ {{else}} - + {{end}} @@ -254,7 +254,7 @@ {{template "repo/view_list" .}} {{end}}
-
+

简介 {{range .Topics}} - + {{.Name}} - - + + {{end}}

@@ -301,13 +301,13 @@
- +
- - + +

{{range .LanguageStats}} @@ -315,14 +315,14 @@ {{end}}

- - + + {{if .LICENSE}}

{{.LICENSE}}

- + {{end}}
@@ -338,22 +338,22 @@ {{range .ContributorInfo}} {{if .UserInfo}} - {{else if .Email}} + {{else if .Email}} {{.Email}} {{end}} {{end}} -
+
- + - + - +