allow customize post page width

This commit is contained in:
Reorx 2022-04-09 23:31:15 +08:00
parent c5d31c778b
commit 8c5d10925e
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,4 @@
/* for home and other pages */
.main {
position: relative;
min-height: calc(100vh - var(--header-height) - var(--footer-height));
@ -5,6 +6,10 @@
margin: auto;
padding: var(--gap);
}
/* for post page */
.main.post {
max-width: calc(var(--post-width) + var(--gap) * 2);
}
.page-header h1 {
font-size: 40px;

View File

@ -1,8 +1,9 @@
:root {
--gap: 24px;
--content-gap: 20px;
--nav-width: 1024px;
--nav-width: 960px;
--main-width: 720px;
--post-width: 800px;
--header-height: 60px;
--footer-height: 60px;
--radius: 8px;

View File

@ -14,7 +14,7 @@
{{- end -}}
" id="top">
{{- partialCached "header.html" . .Page -}}
<main class="main">
<main class="main {{- if (eq .Kind `page`) -}}{{- print " post" -}}{{- end -}}">
{{- block "main" . }}{{ end }}
</main>
{{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}}