{% import "git.sr.ht/~gabrielgio/img/pkg/service" %} {% code type FilePage struct { Page *service.Page ShowMode bool ShowOwner bool }%} {% func (p *FilePage) Title() %}Files{% endfunc %} {% func (p *FilePage) Content() %}
{% for _, h := range p.Page.History %}{%s h.Name %}/{% endfor %}
{% for _, f := range p.Page.Files %}
{% if p.ShowMode %}{%s f.Info.Mode().String() %} {% endif %} {% if p.ShowOwner %}{%d f.GetGid() %}:{%d f.GetUid() %} {% endif %} {% if f.Info.IsDir() %} {%s f.Info.Name() %}/ {% else %} {%s f.Info.Name() %} {% endif %}
{%dl f.Info.Size() %} B
{% endfor %}
{% endfunc %} {% func (p *FilePage) Script() %} {% endfunc %}