forked from jakub/jakubb-hugo
31 lines
761 B
HTML
31 lines
761 B
HTML
{{ partial "header.html" . }}
|
|
{{ partial "nav.html" . }}
|
|
<div class="content">
|
|
|
|
<h1>{{ .Title }}</h1>
|
|
{{ .Content }}
|
|
{{- define "listDir" -}}
|
|
{{- $dir := .dir -}}
|
|
|
|
<ul>
|
|
{{ $files := readDir (printf "/assets/%s" $dir)}}
|
|
{{- range $files -}}
|
|
<li>
|
|
{{- if .IsDir -}}
|
|
{{ title (replaceRE `[_-]` " " (path.BaseName .Name)) }}
|
|
{{- template "listDir" (dict "dir" (printf "%s/%s" $dir .Name)) -}}
|
|
{{- else -}}
|
|
{{- with resources.Get (printf "%s/%s" $dir .Name) -}}
|
|
<a href="{{ .RelPermalink }}" target="_blank" >{{ title (replaceRE `[_-]` " " (path.BaseName .Name)) }}</a>
|
|
{{- end -}}
|
|
{{- end -}}
|
|
</li>
|
|
{{- end -}}
|
|
</ul>
|
|
{{- end -}}
|
|
|
|
{{- template "listDir" (dict "dir" "dokumenty") -}}
|
|
|
|
</div>
|
|
{{ partial "footer.html" . }}
|