If Lastmod exist add dates to bottom of posts.
This commit is contained in:
parent
59bc1494af
commit
239044e927
4 changed files with 13 additions and 1 deletions
|
|
@ -12,6 +12,8 @@
|
|||
</header>
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
|
||||
{{- if not .Lastmod.IsZero }}{{ partial "dates.html" . -}}{{ end -}}
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
|
|
|
|||
4
layouts/partials/dates.html
Normal file
4
layouts/partials/dates.html
Normal 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>
|
||||
|
|
@ -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
Loading…
Reference in a new issue