feat(article): display last updated time of a post

This commit is contained in:
Jimmy Cai 2020-09-06 20:26:18 +02:00
parent 3742a0775b
commit 0cac2218e3
No known key found for this signature in database
GPG Key ID: 3EA408E527F37B18
2 changed files with 14 additions and 1 deletions

View File

@ -71,14 +71,20 @@
padding: var(--content-padding);
padding-top: 0;
.article-copyright {
section:not(:first-child) {
margin-top: var(--content-padding);
}
section {
color: var(--card-text-color-tertiary);
text-transform: uppercase;
display: flex;
align-items: center;
font-size: 1.4rem;
svg {
width: 20px;
height: 20px;
margin-right: 15px;
stroke-width: 1.33;
}

View File

@ -13,4 +13,11 @@
<span>{{ default .Site.Params.article.license.default .Params.license }}</span>
</section>
{{ end }}
{{- if not .Lastmod.IsZero -}}
<section class="article-time">
{{ (resources.Get "icons/clock.svg").Content | safeHTML }}
<span class="article-time--modified">Last updated on {{ .Lastmod.Format ( or .Site.Params.dateFormat "Jan 02, 2006 15:04 MST" ) }}</span>
</section>
{{- end -}}
</footer>