styling newsletter sub form
This commit is contained in:
parent
ceede2988a
commit
c33e025fe2
|
@ -13,8 +13,43 @@ body.type-newsletter {
|
||||||
--link-hover-color: var(--signature);
|
--link-hover-color: var(--signature);
|
||||||
--icon-length: 50px;
|
--icon-length: 50px;
|
||||||
|
|
||||||
|
/* shared */
|
||||||
|
.sub-form {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin: calc(var(--content-gap) * 1.5) 0;
|
||||||
|
form {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
line-height: 1.2em;
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
border: 3px solid var(--signature-bg-dim);
|
||||||
|
color: var(--secondary);
|
||||||
|
border-radius: 0px;
|
||||||
|
appearance: none;
|
||||||
|
outline: none;
|
||||||
|
background-color: var(--theme);
|
||||||
|
padding: 9px 15px;
|
||||||
|
max-width: 100%;
|
||||||
|
width: 100%;
|
||||||
|
transition: var(--link-transition);
|
||||||
|
|
||||||
/* regular page layout */
|
&:focus {
|
||||||
|
color: var(--primary);
|
||||||
|
border-color: var(--signature);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
display: block;
|
||||||
|
background-color: var(--signature);
|
||||||
|
color: var(--theme);
|
||||||
|
padding: 12px 15px;
|
||||||
|
margin-left: 20px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body.type-newsletter.kind-section {
|
body.type-newsletter.kind-section {
|
||||||
|
@ -53,6 +88,7 @@ body.type-newsletter.kind-section {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* egular page layout */
|
||||||
body.type-newsletter.kind-page {
|
body.type-newsletter.kind-page {
|
||||||
.newsletter-brand {
|
.newsletter-brand {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if $isNewsletter }}
|
{{- if $isNewsletter }}
|
||||||
{{- partial "newsletter_sub_form.html"}}
|
{{- partial "newsletter_sub_form.html"}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
</header>
|
</header>
|
||||||
<section class="entry-content">{{ .Description | markdownify }}</section>
|
<section class="entry-content">{{ .Description | markdownify }}</section>
|
||||||
|
{{- partial "newsletter_sub_form.html"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{- $pages := where .Pages "Params.hidden" "!=" true }}
|
{{- $pages := where .Pages "Params.hidden" "!=" true }}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{{/* Add `layouts/partials/newsletter_sub_form.html` in your own code to customize the form */}}
|
||||||
|
|
||||||
|
<div class="sub-form">
|
||||||
|
<form action="">
|
||||||
|
<input type="text" name="email" placeholder="Your email address">
|
||||||
|
<button>订阅 | Subscribe</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
Loading…
Reference in New Issue