repos / pico

pico services mono repo
git clone https://github.com/picosh/pico.git

pico / pkg / apps / pgs / html
Eric Bower  ·  2025-12-15

directory_listing.page.tmpl

 1{{template "base" .}}
 2
 3{{define "title"}}Index of {{.Path}}{{end}}
 4
 5{{define "meta"}}{{end}}
 6
 7{{define "attrs"}}class="container"{{end}}
 8
 9{{define "body"}}
10<header>
11  <h1 class="text-2xl">Index of {{.Path}}</h1>
12  <hr />
13</header>
14<main>
15  <table>
16    <thead>
17      <tr><th>Name</th><th>Size</th><th>Modified</th></tr>
18    </thead>
19    <tbody>
20{{- if .ShowParent}}
21      <tr><td><a href="../">../</a></td><td>-</td><td>-</td></tr>
22{{- end}}
23{{- range .Entries}}
24      <tr><td><a href="{{.Href}}">{{.Display}}</a></td><td>{{.Size}}</td><td>{{.ModTime}}</td></tr>
25{{- end}}
26    </tbody>
27  </table>
28</main>
29{{template "marketing-footer" .}}
30{{end}}