navid/veinsforge / 7ddba925b0ba65a01574baceaa108a0ca5d633bd247f06c62065a5c6acec6273 / internal/web/templates/blob.html

blob.html

← internal/web/templates · 1227 bytes · raw · download

{{define "content"}}
<p class="kicker"><a href="{{repoURL .Data.Repo}}">{{.Data.Repo.OwnerName}}/{{.Data.Repo.Name}}</a> / {{.Data.Rev}} / {{.Data.Path}}</p>
<h1>{{.Data.Name}}</h1>
<p class="small"><a href="{{treeURL .Data.Repo .Data.Rev .Data.Parent}}">← {{if .Data.Parent}}{{.Data.Parent}}{{else}}root{{end}}</a> · {{.Data.Size}} bytes · <a href="{{.Data.RawURL}}">raw</a> · <a href="{{.Data.DownloadURL}}">download</a></p>

<nav class="tabs" aria-label="Repository">
  <a href="{{repoURL .Data.Repo}}">code</a>
  <a href="{{repoURL .Data.Repo}}/issues">issues</a>
  <a href="{{repoURL .Data.Repo}}/pulls">pull requests</a>
  <a href="{{repoURL .Data.Repo}}/commits/{{revPath .Data.Rev}}">commits</a>
  <a href="{{repoURL .Data.Repo}}/branches">branches</a>
</nav>

{{if .Data.Binary}}
<p class="muted">Binary file. Use the raw or download link above.</p>
{{else}}
<div class="code-view">
  <div class="code-gutter" aria-hidden="true">{{range .Data.LineNumbers}}<span>{{.}}</span>{{end}}</div>
  <pre class="code"><code{{with .Data.HighlightLang}} class="language-{{.}}"{{end}}>{{.Data.Code}}</code></pre>
</div>
{{if .Data.Truncated}}<p class="muted small">Preview truncated at 5,000 lines.</p>{{end}}
{{end}}
{{end}}