mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
18 lines
810 B
Go HTML Template
18 lines
810 B
Go HTML Template
|
|
{{$n := len .TreeNames}}
|
||
|
|
{{$l := Eval $n "-" 1}}
|
||
|
|
{{$showFilePath := (gt $n 0)}}
|
||
|
|
{{if $showFilePath}}
|
||
|
|
<span class="breadcrumb repo-path tw-ml-1">
|
||
|
|
<a class="section" href="{{$.BranchLink}}" title="{{.Repository.Name}}">{{StringUtils.EllipsisString .Repository.Name 30}}</a>
|
||
|
|
{{- range $i, $v := .TreeNames -}}
|
||
|
|
<span class="breadcrumb-divider">/</span>
|
||
|
|
{{- if eq $i $l -}}
|
||
|
|
<span class="active section" title="{{$v}}">{{$v}}</span>
|
||
|
|
<button class="btn interact-fg tw-p-2" data-clipboard-text="{{$.TreePath}}" data-tooltip-content="{{ctx.Locale.Tr "copy_path"}}">{{svg "octicon-copy" 14}}</button>
|
||
|
|
{{- else -}}
|
||
|
|
{{$p := index $.Paths $i}}<span class="section"><a href="{{$.BranchLink}}/{{PathEscapeSegments $p}}" title="{{$v}}">{{$v}}</a></span>
|
||
|
|
{{- end -}}
|
||
|
|
{{- end -}}
|
||
|
|
</span>
|
||
|
|
{{end}}
|