Skip to content

Commit

Permalink
Blog posts: show page-meta-lastmod (google#1791)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored Feb 2, 2024
1 parent 1e12790 commit e150a84
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
9 changes: 9 additions & 0 deletions assets/scss/_pageinfo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,12 @@
}
}
}

.td-page-meta {
&__lastmod {
@extend .text-muted;
@extend .border-top;
margin-top: map-get($spacers, 5) !important;
padding-top: map-get($spacers, 3) !important;
}
}
4 changes: 1 addition & 3 deletions assets/scss/_sidebar-toc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
padding-top: 0.75rem;
padding-bottom: 1.5rem;
vertical-align: top;
}

.td-page-meta {
a {
.td-page-meta a {
display: block;
font-weight: $font-weight-medium;
}
Expand Down
1 change: 1 addition & 0 deletions layouts/blog/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ <h1>{{ .Title }}</h1>
{{ end -}}

{{ partial "pager.html" . }}
{{ partial "page-meta-lastmod.html" . -}}
</div>
4 changes: 2 additions & 2 deletions layouts/partials/page-meta-lastmod.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ if and (.GitInfo) (.Site.Params.github_repo) -}}
<div class="text-muted mt-5 pt-3 border-top">
{{ if and .GitInfo .Site.Params.github_repo -}}
<div class="td-page-meta__lastmod">
{{ T "post_last_mod" }} {{ .Lastmod.Format .Site.Params.time_format_default -}}
{{ with .GitInfo }}: {{/* Trim WS */ -}}
<a href="{{ $.Site.Params.github_repo }}/commit/{{ .Hash }}">
Expand Down

0 comments on commit e150a84

Please sign in to comment.