From ca373fd00303c93ed62eafa55696ab03d23667b2 Mon Sep 17 00:00:00 2001 From: Reorx Date: Wed, 7 Sep 2022 15:19:46 +0800 Subject: add type- and kind- classes to body, styling newsletter single and section --- assets/css/extended/newsletter.scss | 99 +++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 assets/css/extended/newsletter.scss (limited to 'assets/css/extended') diff --git a/assets/css/extended/newsletter.scss b/assets/css/extended/newsletter.scss new file mode 100644 index 0000000..0dc5235 --- /dev/null +++ b/assets/css/extended/newsletter.scss @@ -0,0 +1,99 @@ +/* +color candidates: +#CB3A56 茜色 +#F05654 銀紅 +#F20C00 石榴紅 +#FF2D51 火紅 +*/ +body.type-newsletter { + --signature: #CB3A56; + --signature-bg: rgba(203, 58, 87, 0.239); + --signature-bg-dim: rgba(203, 58, 87, 0.147); + --main-border: 5px solid var(--signature); + --link-hover-color: var(--signature); + + + /* regular page layout */ +} + +body.type-newsletter.kind-section { + /* section page layout */ + + .main { + border: var(--main-border); + background-color: var(--theme); + margin-top: var(--content-gap); + min-height: calc(100vh - var(--header-height) - var(--footer-height) - var(--content-gap)); + max-width: calc(var(--nav-width)); + } + + .main-logo { + position: absolute; + left: 0; top: 0; + width: 50px; + height: 50px; + line-height: 45px; + border-right: var(--main-border); + border-bottom: var(--main-border); + background-color: var(--signature); + color: var(--theme); + font-size: 32px; + text-align: center; + } +} + +body.type-newsletter.kind-page { + .newsletter-brand { + display: flex; + background-color: var(--signature-bg-dim); + transition: var(--link-transition); + font-size: 32px; + margin-bottom: calc(var(--content-gap) * 2); + line-height: 50px; + + .icon, .name { + height: 50px; + } + .icon { + width: 50px; + color: var(--theme); + text-align: center; + background-color: var(--signature); + } + .name { + padding: 0 20px; + font-weight: bolder; + color: var(--signature); + } + .issueno { + color: var(--signature); + font-weight: 300; + transition: var(--link-transition); + } + .arrow { + margin-left: auto; + color: transparent; + display: flex; + align-items: center; + padding-right: 15px; + transition: var(--link-transition); + } + + &:hover, &:active { + background-color: var(--signature-bg); + .arrow { + color: var(--signature); + } + .issueno { + color: transparent; + } + } + } + + .post-title { + font-size: 36px; + } + .post-footer { + border-bottom: 0; + } +} -- cgit v1.2.3 From 2f47e7cff86f06f6c392bcf7e3e260c9fb57297e Mon Sep 17 00:00:00 2001 From: Reorx Date: Wed, 7 Sep 2022 15:25:44 +0800 Subject: class name change: main-logo -> main-icon --- assets/css/extended/newsletter.scss | 13 +++++++------ layouts/newsletter/section.html | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'assets/css/extended') diff --git a/assets/css/extended/newsletter.scss b/assets/css/extended/newsletter.scss index 0dc5235..a514d5e 100644 --- a/assets/css/extended/newsletter.scss +++ b/assets/css/extended/newsletter.scss @@ -11,6 +11,7 @@ body.type-newsletter { --signature-bg-dim: rgba(203, 58, 87, 0.147); --main-border: 5px solid var(--signature); --link-hover-color: var(--signature); + --icon-length: 50px; /* regular page layout */ @@ -27,11 +28,11 @@ body.type-newsletter.kind-section { max-width: calc(var(--nav-width)); } - .main-logo { + .main-icon { position: absolute; left: 0; top: 0; - width: 50px; - height: 50px; + width: var(--icon-length); + height: var(--icon-length); line-height: 45px; border-right: var(--main-border); border-bottom: var(--main-border); @@ -49,13 +50,13 @@ body.type-newsletter.kind-page { transition: var(--link-transition); font-size: 32px; margin-bottom: calc(var(--content-gap) * 2); - line-height: 50px; + line-height: var(--icon-length); .icon, .name { - height: 50px; + height: var(--icon-length); } .icon { - width: 50px; + width: var(--icon-length); color: var(--theme); text-align: center; background-color: var(--signature); diff --git a/layouts/newsletter/section.html b/layouts/newsletter/section.html index 344810a..e64f285 100644 --- a/layouts/newsletter/section.html +++ b/layouts/newsletter/section.html @@ -1,7 +1,7 @@ {{/* section is AKA list */}} {{- define "main" }} - +
@