From ce83fcc8ed84127f21b328b759882409093dcf67 Mon Sep 17 00:00:00 2001 From: Reorx Date: Thu, 8 Sep 2022 21:29:29 +0800 Subject: [PATCH] consistant header gaps --- assets/css/common/main.css | 14 ++++++++++++-- assets/css/common/post-single.css | 8 ++------ assets/css/extended/newsletter.scss | 12 +++++++----- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/assets/css/common/main.css b/assets/css/common/main.css index 785546c..8d798f5 100644 --- a/assets/css/common/main.css +++ b/assets/css/common/main.css @@ -4,8 +4,18 @@ min-height: calc(100vh - var(--header-height) - var(--footer-height)); max-width: calc(var(--main-width) + var(--gap) * 2); margin: auto; - padding: var(--gap); - padding-bottom: 0; + padding: var(--content-gap) var(--gap) 0; +} + +@media screen and (max-width: 500px) { + .main { + padding-top: 0; + } +} + +/* same as .post-header */ +.page-header { + margin: var(--gap) 0 calc(var(--content-gap) * 1.5); } .mark-line { diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index 2f6e2c1..03104b6 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -1,14 +1,10 @@ -.page-header, .post-header { - margin: calc(var(--gap) * 4/3) 0; -} -.post-header { - margin-top: calc(var(--gap) * 1/3); + margin: var(--gap) 0 calc(var(--content-gap) * 1.5); } .post-title { font-size: 40px; - margin: var(--content-gap) 0; + margin-bottom: var(--content-gap); } .post-description { diff --git a/assets/css/extended/newsletter.scss b/assets/css/extended/newsletter.scss index 7ac207b..97bfa9c 100644 --- a/assets/css/extended/newsletter.scss +++ b/assets/css/extended/newsletter.scss @@ -94,7 +94,8 @@ body.type-newsletter.layout-archives { .main { border: var(--main-border); background-color: var(--theme); - margin-top: var(--content-gap); + margin-top: var(--gap); + padding-top: 0; padding-bottom: var(--icon-length); min-height: calc(100vh - var(--header-height) - var(--footer-height) - var(--content-gap)); max-width: var(--nav-width); @@ -122,7 +123,7 @@ body.type-newsletter.layout-archives { .main { .content { max-width: calc(var(--post-width)); - margin: 0 auto; + margin: var(--icon-length) auto 0; } .first-entry { @@ -131,12 +132,13 @@ body.type-newsletter.layout-archives { h1 { text-align: center; - margin-top: var(--gap); - margin-bottom: calc(var(--content-gap) * 1); + margin-bottom: 10px; } .subtitle { text-align: center; color: var(--secondary); + line-height: 1.2em; + margin-bottom: var(--content-gap); } h2 { @@ -216,7 +218,7 @@ body.type-newsletter.kind-page { background-color: var(--signature-bg-dim); transition: var(--link-transition); font-size: 32px; - // margin-bottom: calc(var(--content-gap) * 2); + margin-bottom: var(--content-gap); line-height: var(--icon-length); box-shadow: none; // reset