feat: add repository description and metadata display to repo home template
- Inserted a new section in the home template to show repository description, language, stars, forks, and other metadata. - Updated the layout to include a header with repo name and action buttons for watch, star, and fork. - Added conditional rendering for repository description and topics.
This commit is contained in:
parent
adf09d1f8c
commit
8496ccda32
@ -18,8 +18,8 @@
|
||||
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<button id="manage_topic" class="btn interact-fg tw-text-12">{{ctx.Locale.Tr "repo.topic.manage_topics"}}</button>{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{ if and (not .HideRepoInfo) (not .IsBlame)}}
|
||||
|
||||
{{ 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.
|
||||
|
||||
@ -55,7 +55,7 @@
|
||||
<!-- HIER-->
|
||||
{{$n := len .TreeNames}}
|
||||
{{$l := Eval $n "-" 1}}
|
||||
|
||||
{{if .IsSigned }}
|
||||
{{if .IsViewFile}}
|
||||
{{template "repo/view_file" .}}
|
||||
{{else if .IsBlame}}
|
||||
@ -63,12 +63,22 @@
|
||||
{{else}}{{/* IsViewDirectory */}}
|
||||
|
||||
<div id="bottom">
|
||||
{{template "repo/sub_menu" .}}
|
||||
{{template "repo/view_list" .}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{ end }}
|
||||
{{ if .IsSigned }}
|
||||
{{template "repo/sub_menu" .}}
|
||||
{{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 }}
|
||||
{{ end }}
|
||||
{{$isHomepage := (eq $n 0)}}
|
||||
<div class="repo-button-row" data-is-homepage="{{$isHomepage}}">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user