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,7 +18,7 @@
|
|||||||
{{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}}
|
{{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>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{ if and (not .HideRepoInfo) (not .IsBlame)}}
|
{{ if and (not .IsSigned) (not .HideRepoInfo) (not .IsBlame)}}
|
||||||
|
|
||||||
<div class="repo-description gt-word-break">
|
<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.
|
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-->
|
<!-- HIER-->
|
||||||
{{$n := len .TreeNames}}
|
{{$n := len .TreeNames}}
|
||||||
{{$l := Eval $n "-" 1}}
|
{{$l := Eval $n "-" 1}}
|
||||||
|
{{if .IsSigned }}
|
||||||
{{if .IsViewFile}}
|
{{if .IsViewFile}}
|
||||||
{{template "repo/view_file" .}}
|
{{template "repo/view_file" .}}
|
||||||
{{else if .IsBlame}}
|
{{else if .IsBlame}}
|
||||||
@ -63,12 +63,22 @@
|
|||||||
{{else}}{{/* IsViewDirectory */}}
|
{{else}}{{/* IsViewDirectory */}}
|
||||||
|
|
||||||
<div id="bottom">
|
<div id="bottom">
|
||||||
|
{{template "repo/sub_menu" .}}
|
||||||
{{template "repo/view_list" .}}
|
{{template "repo/view_list" .}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{ end }}
|
||||||
{{ if .IsSigned }}
|
{{ 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 }}
|
{{ end }}
|
||||||
{{$isHomepage := (eq $n 0)}}
|
{{$isHomepage := (eq $n 0)}}
|
||||||
<div class="repo-button-row" data-is-homepage="{{$isHomepage}}">
|
<div class="repo-button-row" data-is-homepage="{{$isHomepage}}">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user