{{$treeNamesLen := len .TreeNames}} {{$isTreePathRoot := eq $treeNamesLen 0}} {{$showSidebar := and $isTreePathRoot (not .HideRepoInfo) (not .IsBlame)}} {{$hasTreeSidebar := not $isTreePathRoot}} {{$showTreeSidebar := .RepoPreferences.ShowFileViewTreeSidebar}} {{template "repo/sub_menu" .}}
{{$treeNamesLen := len .TreeNames}} {{$isTreePathRoot := eq $treeNamesLen 0}} {{if .IsViewFile}} {{template "repo/view_file" .}} {{else if .IsBlame}} {{template "repo/blame" .}} {{else}}{{/* IsViewDirectory */}} {{if $isTreePathRoot}} {{template "repo/code/upstream_diverging_info" .}} {{end}} {{template "repo/view_list" .}} {{if and .ReadmeExist (or .IsMarkup .IsPlainText)}} {{template "repo/view_file" .}} {{end}} {{end}}