depp

No frills static page generator for Git repositories

git clone https://git.8pit.net/depp.git

 1{{ define "type" }}
 2	{{- if .IsDir -}}
 3		directory
 4	{{- else -}}
 5		file
 6	{{- end -}}
 7{{ end }}
 8
 9{{ define "suffix" }}
10	{{- if .IsDir -}}/{{- end -}}
11{{ end }}
12
13<section id="tree">
14	{{ template "breadcrumb.tmpl" .CurrentFile }}
15
16	<ul class="tree">
17		{{ range .Files }}
18			<li>
19				<a class="{{ template "type" . }}" href="{{ .Path }}.html">
20					{{ .Name }}{{ template "suffix" . }}
21				</a>
22			</li>
23		{{ end }}
24	</ul>
25</section>