diff --git a/data/gitea/templates/repo/home.tmpl b/data/gitea/templates/repo/home.tmpl index e778bd0..755a56a 100644 --- a/data/gitea/templates/repo/home.tmpl +++ b/data/gitea/templates/repo/home.tmpl @@ -21,8 +21,7 @@ {{ if and (not .IsSigned) (not .HideRepoInfo) (not .IsBlame)}}
- Source files of this project at bottom of page. All source is under MIT license if no LICENSE file in list. - + All source listed below is under MIT license if no LICENSE file stating different is available.
{{ end }} @@ -55,31 +54,19 @@ {{$n := len .TreeNames}} {{$l := Eval $n "-" 1}} - {{if .IsSigned }} - {{if .IsViewFile}} - {{template "repo/view_file" .}} - {{else if .IsBlame}} - {{template "repo/blame" .}} - {{else}}{{/* IsViewDirectory */}} - -
- {{template "repo/sub_menu" .}} - {{template "repo/view_list" .}} -
- {{end}} - {{ end }} - {{ if .IsSigned }} - {{if .IsSigned }} - - {{template "repo/sub_menu" .}} - {{template "repo/view_list" .}} - {{if .IsViewFile}} - {{template "repo/view_file" .}} - {{else if .IsBlame}} - {{template "repo/blame" .}} - {{else}}{{/* IsViewDirectory */}} - {{ end }} + {{if not .IsSigned }} + {{if .IsViewFile}} + {{template "repo/view_file" .}} + {{else if .IsBlame}} + {{template "repo/blame" .}} + {{else}} + {{/* IsViewDirectory */}} +
+ {{template "repo/view_list" .}} +
+ {{end}} {{ end }} + {{$isHomepage := (eq $n 0)}}
@@ -182,6 +169,18 @@
+ {{ if .IsSigned }} + {{template "repo/sub_menu" .}} + {{if .IsViewFile}} + {{template "repo/view_file" .}} + {{else if .IsBlame}} + {{template "repo/blame" .}} + {{else}} + {{template "repo/view_list" .}} + {{end}} + {{ end }} + + {{template "base/footer" .}} diff --git a/data/gitea/templates/repo/view_file.tmpl b/data/gitea/templates/repo/view_file.tmpl index 08833f9..4763b3a 100644 --- a/data/gitea/templates/repo/view_file.tmpl +++ b/data/gitea/templates/repo/view_file.tmpl @@ -92,11 +92,12 @@ {{ if false }} {{end}} -
+
{{if not (or .IsMarkup .IsRenderedHTML)}} {{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}} {{end}} -
+ +
{{if .IsFileTooLarge}} {{template "shared/filetoolarge" dict "RawFileLink" .RawFileLink}} {{else if .IsMarkup}} diff --git a/data/gitea/templates/repo/view_list.tmpl b/data/gitea/templates/repo/view_list.tmpl index c9a43ed..678d5aa 100644 --- a/data/gitea/templates/repo/view_list.tmpl +++ b/data/gitea/templates/repo/view_list.tmpl @@ -1,4 +1,4 @@ -{{if and .ReadmeExist (or .IsMarkup .IsPlainText)}} +{{if and (not .IsSigned) .ReadmeExist (or .IsMarkup .IsPlainText)}} {{template "repo/view_file" .}} {{end}} @@ -71,4 +71,6 @@ {{end}}
- +{{if and (.IsSigned) .ReadmeExist (or .IsMarkup .IsPlainText)}} + {{template "repo/view_file" .}} +{{end}}