Merge pull request #273 from henryiii/henryiii-lastmod

Adding last modified for pages if lastmod is set
This commit is contained in:
Michael Romero 2019-09-21 00:27:05 -07:00 committed by GitHub
commit 3836f4c24a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,6 @@
{{ if eq .Type "page" }}
{{ partial "page_meta.html" . }}
{{ end }}
<footer>
<div class="container">
<div class="row">

View File

@ -0,0 +1,8 @@
<div class="page-meta">
{{ $lastmodstr := default (i18n "dateFormat") .Site.Params.dateformat | .Lastmod.Format }}
{{ $datestr := default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format }}
{{ if ne $datestr $lastmodstr }}
{{ $lastmodstr | i18n "lastModified" }}
{{ end }}
</div>

View File

@ -370,14 +370,19 @@ footer .theme-by {
margin-bottom: 10px;
}
.post-preview .post-meta,
.post-heading .post-meta {
.post-heading .post-meta,
.page-meta {
color: #808080;
font-size: 18px;
font-style: italic;
margin: 0 0 10px;
}
.page-meta {
align-self: center;
}
.post-preview .post-meta a,
.post-heading .post-meta a {
.post-heading .post-meta a,
.page-meta a {
color: #404040;
text-decoration: none;
}