internal/web/templates/snippet.html
18 lines · 1008 bytes
1{{define "title"}}{{if .Snippet.Description}}{{.Snippet.Description}}{{else}}{{.Snippet.PublicID}}{{end}} · {{.Owner}}{{end}}
2{{define "content"}}
3<h1><a href="/{{.Owner}}">{{.Owner}}</a> / <a href="/{{.Owner}}/-/snippets">snippets</a> / {{.Snippet.PublicID}}</h1>
4{{if .Snippet.Description}}<p class="desc lede">{{.Snippet.Description}}</p>{{end}}
5<p class="meta"><span class="chip chip-neutral">{{.Snippet.Visibility}}</span> · updated {{.Snippet.UpdatedAt}} · <code>gitbay snippet show {{.Snippet.PublicID}}</code></p>
6{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}}
7{{range .Files}}
8<section class="snippetfile" id="file-{{.Name}}">
9<div class="pathbar">
10 <span class="crumbs"><strong>{{.Name}}</strong></span>
11 <span class="spacer"></span>
12 <span class="actions"><a href="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/raw/{{.Name}}">raw</a></span>
13</div>
14<p class="filefacts">{{.Lines}} lines · {{.Size}} bytes</p>
15<div class="code">{{.HTML}}</div>
16</section>
17{{end}}
18{{end}}