From edf0ed0258cbfffe9bb4d6231601302d2357d24d Mon Sep 17 00:00:00 2001 From: Reorx Date: Thu, 8 Sep 2022 01:41:33 +0800 Subject: [PATCH] add newsletter sub box in single --- assets/css/common/post-single.css | 1 + assets/css/extended/newsletter.scss | 18 ++++++++++++++++++ layouts/_default/baseof.html | 2 +- layouts/_default/single.html | 7 ++++++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index ab0b54f..bdfa945 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -592,6 +592,7 @@ h6:hover .anchor { vertical-align: super; } +/* footnotes */ .footnotes { font-size: .8em; color: var(--primary-dim); diff --git a/assets/css/extended/newsletter.scss b/assets/css/extended/newsletter.scss index 55cdbb6..49a7aad 100644 --- a/assets/css/extended/newsletter.scss +++ b/assets/css/extended/newsletter.scss @@ -285,4 +285,22 @@ body.type-newsletter.kind-page { .post-footer { border-bottom-color: var(--signature); } + + + .newsletter-sub { + margin-top: var(--gap); + background-color: var(--signature-bg-dim); + padding: 1em; + .notice { + font-size: .8em; + color: var(--signature); + line-height: 1.6; + } + .sub-form { + margin: 1em 0; + input { + border-color: var(--signature-bg); + } + } + } } diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index bf74e92..1413f56 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -12,7 +12,7 @@ {{- end -}} {{- if eq site.Params.defaultTheme `dark` -}} {{- print " dark" }} -{{- end }} type-{{ .Type }} kind-{{ .Kind -}} +{{- end }} type-{{ .Type }} kind-{{ .Kind }} layout-{{ .Layout -}} " id="top"> {{- partialCached "header.html" . .Page -}}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6fff034..64fc164 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -54,7 +54,12 @@ {{- end }} {{- if $isNewsletter }} - {{- partial "newsletter_sub_form.html"}} + {{- end }}