add basic post metadata to posts single view

This commit is contained in:
Robert Kaussow 2020-08-26 00:09:32 +02:00
parent 206fe0cef9
commit c146f130d7
No known key found for this signature in database
GPG Key ID: 65362AE74AF98B61
3 changed files with 27 additions and 0 deletions

View File

@ -4,3 +4,4 @@
the date on updated posts will be prefixed with `Updated on` string the date on updated posts will be prefixed with `Updated on` string
modifications from the same day are ignored modifications from the same day are ignored
- add read time indicator - add read time indicator
- add basic post metadata to posts single view

View File

@ -16,6 +16,24 @@
{{ end }} {{ end }}
<h1>{{ partial "title" . }}</h1> <h1>{{ partial "title" . }}</h1>
<div class="gblog-post__meta">
<span class="no-wrap">
<svg class="icon date"><use xlink:href="#date"></use></svg>
<span class="gblog-post__tag">
<time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ if ne (.Lastmod.Format "2006-01-02") (.Date.Format "2006-01-02") }}
Updated on
{{ end }}
{{ .Lastmod.Format "Jan 2, 2006" }}
</time>
</span>
</span>
<span class="no-wrap">
<svg class="icon timer"><use xlink:href="#timer"></use></svg>
<span class="gblog-post__tag">{{ .ReadingTime }} min</span>
</span>
</div>
</header> </header>
<section class="gblog-markdown"> <section class="gblog-markdown">

View File

@ -288,6 +288,14 @@ img {
} }
} }
&__meta {
padding-bottom: $padding-16;
.icon {
font-size: 1.2em;
}
}
&__figure { &__figure {
padding: $padding-4 $padding-4 0 $padding-4; padding: $padding-4 $padding-4 0 $padding-4;
margin: $padding-16 0; margin: $padding-16 0;