mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-27 04:03:48 +01:00
feat(article): display last updated time of a post
This commit is contained in:
parent
3742a0775b
commit
0cac2218e3
2 changed files with 14 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>
|
Loading…
Reference in a new issue