39 lines
No EOL
1.5 KiB
HTML
39 lines
No EOL
1.5 KiB
HTML
{{ partial "header.html" . }}
|
|
|
|
<main class="main list content" role="main">
|
|
{{- if not .IsHome}}
|
|
{{- with .Title }}
|
|
<header class="page-header">
|
|
<h1 class="page-header__title">{{ . }}</h1>
|
|
</header>
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- with .Content }}
|
|
<div class="page-content">
|
|
{{ . }}
|
|
</div>
|
|
{{- end }}
|
|
{{- if .IsHome }}
|
|
{{- $postSections := ($.Param "postSections" | default (slice "post")) }}
|
|
{{- $paginator := .Paginate ( where .Data.Pages "Section" "in" $postSections ) }}
|
|
{{- range $paginator.Pages }}
|
|
{{- .Render "summary" }}
|
|
{{- end }}
|
|
{{- if eq $paginator.TotalNumberOfElements 0 }}
|
|
<div class="warning">
|
|
<svg class="warning__icon icon icon-files" viewBox="0 0 384 384" width="96" height="96" fill="#ddd"><path d="m368 64h-224-16v16 288 16h16 224 16v-16-288-16zm-16 288h-192v-256h192zm-320-320h192v16h32v-32-16h-16-224-16v16 288 16h16 96v-32h-80zm144 272h160v-32h-160zm0-64h160v-32h-160zm0-64h160v-32h-160zm-128 64h64v-32h-64zm0-64h64v-32h-64zm0-64h64v-32h-64z"/></svg>
|
|
<h3 class="warning__headline">You don't have any posts yet!</h3>
|
|
<p class="warning__text">As posts are added in <b>{{ replaceRE ",([^,]*)$" " or $1" (delimit (apply $postSections "printf" "content/%s" ".") ", ") }}</b> folder{{ if gt (len $postSections) 1 }}s{{ end }}, they'll appear here.</p>
|
|
</div>
|
|
{{- end }}
|
|
{{ else }}
|
|
{{- range .Paginator.Pages }}
|
|
{{- .Render "summary" }}
|
|
{{- end }}
|
|
{{- end }}
|
|
|
|
{{ partial "pagination.html" . }}
|
|
</main>
|
|
|
|
{{ partial "sidebar.html" . }}
|
|
{{ partial "footer.html" . }} |