diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl index 6857cbef7..7c44aa147 100644 --- a/templates/repo/home.tmpl +++ b/templates/repo/home.tmpl @@ -1,102 +1,114 @@ {{template "base/head" .}}
{{if .Repository.DescriptionHTML}} - {{.Repository.DescriptionHTML}} + {{.Repository.DescriptionHTML}} {{else}} - {{.i18n.Tr "repo.no_desc"}} + {{.i18n.Tr "repo.no_desc"}} {{end}}
@@ -276,7 +313,8 @@ {{if .Repository.Website}}- {{.Repository.Website}} + {{.Repository.Website}}
{{end}} @@ -286,11 +324,13 @@{{range .LanguageStats}} - {{.Language}} + {{.Language}} {{end}}
@@ -313,7 +353,7 @@ {{if .LICENSE}}- {{.LICENSE}} + {{.LICENSE}}
{{end}} @@ -328,19 +368,22 @@ {{else}} 贡献者 ({{len .ContributorInfo}}+) {{end}} - +|
{{if .LatestCommitUser}}
-
- {{if .LatestCommitVerification.Verified}}
-
- {{if ne .LatestCommitVerification.SigningUser.ID 0}}
-
-
+
+ {{if .LatestCommitVerification.Verified}}
+
{{end}}
{{template "repo/commit_status" .LatestCommitStatus}}
{{ $commitLink:= printf "%s/commit/%s" .RepoLink .LatestCommit.ID }}
- {{RenderCommitMessageLinkSubject .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas}}
- {{if IsMultilineCommitMessage .LatestCommit.Message}}
-
-
+ {{if ne .LatestCommitVerification.SigningUser.ID 0}}
+
+
+ {{else}}
+
+ {{end}}
+ {{RenderCommitBody .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}
- {{end}}
+ {{RenderCommitMessageLinkSubject .LatestCommit.Message $.RepoLink $commitLink $.Repository.ComposeMetas}}
+ {{if IsMultilineCommitMessage .LatestCommit.Message}}
+
+ {{RenderCommitBody .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}
+ {{end}}
|
- {{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}} | ++ {{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}} | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{svg "octicon-mail-reply" 16}}.. | -|||||||||||||
| {{svg "octicon-mail-reply" 16}}.. + | +|||||||||||||
| + + {{svg "octicon-inbox" 16}} + {{$refURL := $commit.RefURL AppUrl $.Repository.FullName}} + {{if $refURL}} + {{$entry.Name}} @ {{ShortSha $commit.RefID}} + {{else}} + {{$entry.Name}} @ {{ShortSha $commit.RefID}} + {{end}} + + | + {{else}} ++ + {{if $entry.IsDir}} + {{$subJumpablePathName := $entry.GetSubJumpablePathName}} + {{$subJumpablePath := SubJumpablePath $subJumpablePathName}} + {{svg "octicon-file-directory" 16}} + + {{if eq (len $subJumpablePath) 2}} + {{index $subJumpablePath 0}}{{index $subJumpablePath 1}} + {{else}} + {{index $subJumpablePath 0}} + {{end}} + + {{else}} + {{svg (printf "octicon-%s" (EntryIcon $entry)) 16}} + {{$entry.Name}} + {{end}} + + | + {{end}} -||||||||||||
| - - {{svg "octicon-inbox" 16}} - {{$refURL := $commit.RefURL AppUrl $.Repository.FullName}} - {{if $refURL}} - {{$entry.Name}} @ {{ShortSha $commit.RefID}} - {{else}} - {{$entry.Name}} @ {{ShortSha $commit.RefID}} - {{end}} - - | - {{else}} -- - {{if $entry.IsDir}} - {{$subJumpablePathName := $entry.GetSubJumpablePathName}} - {{$subJumpablePath := SubJumpablePath $subJumpablePathName}} - {{svg "octicon-file-directory" 16}} - - {{if eq (len $subJumpablePath) 2}} - {{index $subJumpablePath 0}}{{index $subJumpablePath 1}} - {{else}} - {{index $subJumpablePath 0}} - {{end}} - - {{else}} - {{svg (printf "octicon-%s" (EntryIcon $entry)) 16}} - {{$entry.Name}} - {{end}} - - | - {{end}} - -- - {{$commit.Summary | RenderEmoji}} - - | -{{TimeSince $commit.Committer.When $.Lang}} | -||||||||||
|
-
-
-
-
-
-
-
-
-
+
+
+ {{$commit.Summary | RenderEmoji}}
+
+ |
+ {{TimeSince $commit.Committer.When $.Lang}} |
+ | |||||||||||
|
+
+
+
-
+
+
+
+
+
|
- |||||||||||||