If Lastmod exist add dates to bottom of posts.

This commit is contained in:
Fredrik Jonsson 2017-08-28 11:32:24 +02:00
commit 239044e927
4 changed files with 13 additions and 1 deletions

View file

@ -12,6 +12,8 @@
</header>
<div class="content">
{{ .Content }}
{{- if not .Lastmod.IsZero }}{{ partial "dates.html" . -}}{{ end -}}
</div>
</article>
</main>

View file

@ -0,0 +1,4 @@
<p class="content-dates">
Last modified: {{ .Lastmod.Format ($.Param "dateformat" | default "2 January, 2006") }}<br>
Created: {{ .Date.Format ($.Param "dateformat" | default "2 January, 2006") }}
</p>

View file

@ -54,6 +54,7 @@ figcaption {
}
article > header,
.content-dates,
.footer {
@include type-layout(xs, 1);
@ -72,6 +73,7 @@ nav,
label,
legend,
article > header,
.content-dates,
.header,
.footer {
@include typeface(headings);
@ -159,6 +161,10 @@ article {
}
}
.content-dates {
color: color('grey');
text-align: right;
}
}
.title-submitted {

File diff suppressed because one or more lines are too long