fix: fix post metadata positioning (#315)

This commit is contained in:
Robert Kaussow 2022-02-03 10:58:37 +01:00 committed by GitHub
parent 134a50faf2
commit 30d3c64c41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 39 additions and 28 deletions

View file

@ -1,4 +1,4 @@
<span class="no-wrap">
<span class="flex align-center no-wrap">
<svg class="icon gdoc_date"><use xlink:href="#gdoc_date"></use></svg>
<span class="gdoc-post__tag">
<time datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
@ -10,7 +10,7 @@
</span>
</span>
<span class="no-wrap">
<span class="flex align-center no-wrap">
<svg class="icon gdoc_timer"><use xlink:href="#gdoc_timer"></use></svg>
<span class="gdoc-post__tag">{{ i18n "posts_read_time" .ReadingTime }}</span>
</span>
@ -21,7 +21,7 @@
{{ $name := . }}
{{ with $.Site.GetPage (printf "/tags/%s" $name | urlize) }}
{{ if eq $tc 0 }}
<span class="no-wrap">
<span class="flex align-center no-wrap">
<svg class="icon gdoc_bookmark"><use xlink:href="#gdoc_bookmark"></use></svg>
{{ template "post-tag" dict "name" $name "page" . }}
</span>
@ -34,7 +34,7 @@
{{ end }}
{{ define "post-tag" }}
<span class="gdoc-post__tag gdoc-button">
<span class="gdoc-post__tag gdoc-button gdoc-button--regular">
<a
class="gdoc-button__link"
href="{{ .page.RelPermalink }}"
@ -46,7 +46,7 @@
{{ end }}
{{ define "post-author" }}
<span class="gdoc-post__tag gdoc-button">
<span class="gdoc-post__tag gdoc-button gdoc-button--regular">
<a class="gdoc-button__link" href="{{ .page.RelPermalink }}" title="All posts of this author">
{{ .name }}
</a>

View file

@ -21,7 +21,9 @@
</div>
<footer class="gdoc-post__footer">
{{ partial "posts/metadata.html" . }}
<div class="flex flex-wrap align-center gdoc-post__meta">
{{ partial "posts/metadata.html" . }}
</div>
</footer>
</article>
{{ end }}

View file

@ -1,13 +1,13 @@
{{ define "main" }}
<article class="gdoc-markdown gdoc-post">
<article class="gdoc-post">
<header class="gdoc-post__header">
<h1 class="gdoc-post__title">{{ .Title }}</h1>
<div class="gdoc-post__meta">
<div class="flex flex-wrap align-center gdoc-post__meta gdoc-post__meta--head">
{{ partial "posts/metadata.html" . }}
</div>
</header>
<div>
<section class="gdoc-markdown">
{{ partial "content" . }}
</div>
</section>
</article>
{{ end }}

View file

@ -21,7 +21,9 @@
</div>
<footer class="gdoc-post__footer">
{{ partial "posts/metadata.html" . }}
<div class="flex flex-wrap align-center gdoc-post__meta">
{{ partial "posts/metadata.html" . }}
</div>
</footer>
</article>
{{ end }}