bidet / internal / handlers / templates / blob.tmpl

@ 492a05b8e658a3f2626210f5e33dc874141545f7 | history


{{define "title"}}{{.Repo}}/{{.Path}}{{end}}
{{define "content"}}
<h1>{{if eq .Path ""}}{{.Repo}}{{else}}<a href="/{{.Repo}}/tree/{{.RefLabel}}">{{.Repo}}</a> /{{end}}
{{range $i, $c := .Crumbs}}
  {{if $i}} / {{end}}
  {{if eq $i (sub (len $.Crumbs) 1)}}
    {{$c.Name}}
  {{else}}
    <a href="/{{$c.URL}}">{{$c.Name}}</a>
  {{end}}
{{end}}</h1>
<p>@ {{.RefLabel}} | <a href="/{{.Repo}}/commits/{{.RefLabel}}/{{.Path}}">history</a></p>
<hr>
<pre>{{.Content}}</pre>
{{end}}

{{define "blob"}}
{{template "base" .}}
{{end}}