42 lines
436 B
Go Template
42 lines
436 B
Go Template
{{ define "explorer.gohtml" }}
|
|
{{ template "base" . }}
|
|
{{ end }}
|
|
|
|
{{ define "content" }}
|
|
|
|
<section class="card">
|
|
|
|
<h1>Explorer</h1>
|
|
|
|
<div class="tree-root">
|
|
{{ template "tree-node" .Tree }}
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{{ end }}
|
|
|
|
{{ define "tree-node" }}
|
|
|
|
<ul class="tree">
|
|
|
|
{{ range . }}
|
|
|
|
<li>
|
|
|
|
<a href="{{ .Path }}">
|
|
{{ .Path }}
|
|
</a>
|
|
|
|
{{ if .Children }}
|
|
{{ template "tree-node" .Children }}
|
|
{{ end }}
|
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
{{ end }}
|