bidet / internal / handlers / templates / blob.tmpl

@ 2b9e13786d6dff5c324880d0a26bd000123e9156 | 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 $c.IsLast}}
    {{$c.Name}}
  {{else}}
    <a href="/{{$c.URL}}">{{$c.Name}}</a>
  {{end}}
{{end}}</h1>
<p>@ {{.RefLabel}}</p>
<hr>
<pre>{{.Content}}</pre>
{{end}}

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