{% import "git.gabrielgio.me/cerrado/pkg/u" %} {% code type GitItemBlobPage struct { Path []string Content []byte } %} {% func (g *GitItemBlobPage) Nav(name, ref string) %}{%= GitItemNav(name, ref, Tree) %}{% endfunc %} {% func (g *GitItemBlobPage) GitContent(name, ref string) %} <div class="pathing"> {% stripspace %} {% if len(g.Path) != 0 %} <a href="{%s url(name, Folder, ref, Root, []string{}) %}">root/</a> {% for i, e := range g.Path[:len(g.Path)-1] %} <a href="{%s url(name, Folder, ref, Root, g.Path[:1+i]) %}">{%s e %}/</a> {% endfor %} <a>{%s u.LastOrZero(g.Path) %}</a> {% else %} <a>root/</a> {% endif %} {% endstripspace %} </div> <div class="code-view"> {%z= g.Content %} </div> {% endfunc %}