Personal Git forge.
{{ define "content" }}<div class="blob"> <div class="title"> <span><strong>{{.Blob.Path}}</strong> / {{SizeLen .Blob.Size}}</span> {{if .Blob.Hash}} <code>#{{.Blob.ShortHash}}</code> {{end}} <div class="right"> <a href="{{RepoRoot .Meta}}/raw/{{.Branch}}/{{.Blob.Path}}">Raw</a> </div> </div> {{if IsVideo .Blob.Mime}} <video controls preload="metadata" src="{{RepoRoot .Meta}}/raw/{{.Branch}}/{{.Blob.Path}}"></video> {{else if .Blob.TooLarge}} <div error> <span>This file is too large to preview.</span> <a href="{{RepoRoot .Meta}}/raw/{{.Branch}}/{{.Blob.Path}}" style="color:inherit;">Download it instead.</a> </div> {{else if IsText .Blob.Mime}} <pre><code>{{range SplitLines (Str .Blob.Content)}}<span>{{.}}</span>{{end}}</code></pre> {{else if IsImage .Blob.Mime}} <img src="{{Src .Blob.Content .Blob.Mime}}"> {{else}} <p class="error">I haven't implemented this preview yet.</p> {{end}}</div>{{end}}