feat(css): align back link and time in post head into one line

This commit is contained in:
Hanwen Guo 2024-11-30 22:11:23 -07:00
parent 028d21302f
commit f74e559144
3 changed files with 13 additions and 8 deletions

View File

@ -83,7 +83,11 @@ body {
overflow-wrap: break-word;
}
.post-meta { text-align: right; }
.post-meta {
display: flex;
justify-content: space-between;
align-items: center;
}
h2, h3, h4, h5, h6 { margin-top: 0.5rem; }

View File

@ -4,6 +4,14 @@
<body a="{{ $.Site.Params.theme_config.appearance | default "auto" }}">
<main class="page-content" aria-label="Content">
<div class="w">
<div class="post-meta">
{{ partial "back_link.html" .}}
<p>
<time datetime="{{ .Date }}">
{{ .Date | time.Format site.Params.theme_config.date_format }}
</time>
</p>
</div>
{{- block "main" . }}{{- end }}
</div>
</main>

View File

@ -1,13 +1,6 @@
{{ define "main" }}
{{ partial "back_link.html" .}}
<article>
<p class="post-meta">
<time datetime="{{ .Date }}">
{{ .Date | time.Format site.Params.theme_config.date_format }}
</time>
</p>
<h1>{{ .Title }}</h1>
{{ if .Params.toc }}