diff --git a/layouts/edit/baseof.html b/layouts/edit/baseof.html new file mode 100644 index 0000000..95528be --- /dev/null +++ b/layouts/edit/baseof.html @@ -0,0 +1,9 @@ + + + + {{- .Title }} - {{ .Site.Title -}} + + + {{ block "edit" . }}{{ end }} + + diff --git a/layouts/edit/list.html b/layouts/edit/list.html new file mode 100644 index 0000000..5214213 --- /dev/null +++ b/layouts/edit/list.html @@ -0,0 +1,10 @@ +{{ define "edit" }} + {{ range (readDir ".") }} + {{ if .IsDir }} +

Dir: {{ .Name }}

+ {{ partial "readdir.html" .Name }} + {{ else }} +

File: {{ .Name }} + {{ end }} + {{ end }} +{{ end }} diff --git a/layouts/partials/readdir.html b/layouts/partials/readdir.html new file mode 100644 index 0000000..1be8b09 --- /dev/null +++ b/layouts/partials/readdir.html @@ -0,0 +1,10 @@ +{{ $parentName := . }} +{{ range (readDir .) }} + {{ $currentName := printf "%s/%s" $parentName .Name }} + {{ if .IsDir }} +

_Dir: {{ $currentName }}

+ {{ partial "readdir.html" $currentName }} + {{ else }} +

_File: {{ $currentName }} + {{ end }} +{{ end }}