Add support for sections with content

master
Marc Riera Irigoyen 2018-04-08 23:00:39 +02:00
parent 552c4e0bd5
commit c973d4c930
4 changed files with 49 additions and 17 deletions

View File

@ -0,0 +1,37 @@
{{ partial "header.html" . }}
{{ with .Content }}
{{- . -}}
{{ end }}
{{ if eq (len .Content) 0 }}
<div id="content">
{{ range sort .Paginator.Pages }}
<div id="paginator-page">
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<div class="content">
{{ .Summary | plainify | safeHTML }}
...
<div id="paginator-page-footer">
{{ if not .Date.IsZero }}
<p class="timestamp">{{ .Date.Format "2006-01-02" }}</p>
{{ end }}
<div id="paginator-page-button">
<a href="{{ .Permalink }}">{{ i18n "readMore" }}</a>
</div>
</div>
</div>
</div>
{{ if .Params.tags }}
{{ partial "tags" .Params.tags }}
{{ end }}
{{ end }}
{{ partial "pagination.html" . }}
</div>
{{ end }}
{{ partial "footer.html" . }}

View File

@ -1,3 +1,11 @@
{{ partial "header.html" . }}
{{ partial "content.html" . }}
<div id="content">
{{ if not .Date.IsZero }}
<p class="timestamp">{{ .Date.Format "02-01-2006" }}</p>
{{ end }}
{{ .Content }}
{{ if .Params.tags }}
{{ partial "tags" .Params.tags }}
{{ end }}
</div>
{{ partial "footer.html" . }}

View File

@ -1,4 +1,6 @@
{{ partial "header.html" . }}
{{ partial "content.html" . }}
<div id="content">
{{ .Content }}
</div>
{{ partial "recentnews.html" . }}
{{ partial "footer.html" . }}

View File

@ -1,15 +0,0 @@
<div id="content">
{{ if not .IsHome }}
{{ if not .Date.IsZero }}
<p class="timestamp">{{ .Date.Format "02-01-2006" }}</p>
{{ end }}
{{ end }}
{{ .Content }}
{{ if .Params.tags }}
{{ partial "tags" .Params.tags }}
{{ end }}
</div>