chore: restructure repo homepage template to show readme only for signed users and fix view_file container class
This commit is contained in:
@@ -21,8 +21,7 @@
|
||||
{{ if and (not .IsSigned) (not .HideRepoInfo) (not .IsBlame)}}
|
||||
|
||||
<div class="repo-description gt-word-break">
|
||||
Source files of this project at <a href="#bottom">bottom</a> of page. All source is under MIT license if no LICENSE file in list.
|
||||
|
||||
<i>All source listed <a href="#repo-files-table">below</a> is under MIT license if no LICENSE file stating different is available.</i>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -55,31 +54,19 @@
|
||||
<!-- HIER-->
|
||||
{{$n := len .TreeNames}}
|
||||
{{$l := Eval $n "-" 1}}
|
||||
{{if .IsSigned }}
|
||||
{{if .IsViewFile}}
|
||||
{{template "repo/view_file" .}}
|
||||
{{else if .IsBlame}}
|
||||
{{template "repo/blame" .}}
|
||||
{{else}}{{/* IsViewDirectory */}}
|
||||
|
||||
<div id="bottom">
|
||||
{{template "repo/sub_menu" .}}
|
||||
{{template "repo/view_list" .}}
|
||||
</div>
|
||||
{{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 */}}
|
||||
<div id="bottom">
|
||||
{{template "repo/view_list" .}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{ end }}
|
||||
|
||||
{{$isHomepage := (eq $n 0)}}
|
||||
<div class="repo-button-row" data-is-homepage="{{$isHomepage}}">
|
||||
<div class="repo-button-row-left">
|
||||
@@ -182,6 +169,18 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- old place -->
|
||||
{{ 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 }}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
||||
Reference in New Issue
Block a user