Create Newsletter component
This commit is contained in:
8
src/components/atoms/IconArrow.svelte
Normal file
8
src/components/atoms/IconArrow.svelte
Normal file
@@ -0,0 +1,8 @@
|
||||
<script lang="ts">
|
||||
|
||||
export let color: string = undefined
|
||||
</script>
|
||||
|
||||
<svg class="arrow arrow--{color}" width="12" height="14" viewBox="0 0 12 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.67961 11.8224C4.34487 12.1571 4.34487 12.6999 4.67961 13.0346C5.01434 13.3693 5.55705 13.3693 5.89179 13.0346L11.3204 7.60602C11.6551 7.27129 11.6551 6.72857 11.3204 6.39384L5.89179 0.965267C5.55705 0.630532 5.01434 0.630532 4.67961 0.965267C4.34487 1.3 4.34487 1.84271 4.67961 2.17745L8.64494 6.14279L1.2857 6.14279C0.812311 6.14279 0.428555 6.52654 0.428555 6.99993C0.428555 7.47332 0.812311 7.85707 1.2857 7.85707L8.64494 7.85707L4.67961 11.8224Z" fill="#000"/>
|
||||
</svg>
|
||||
33
src/components/organisms/Newsletter.svelte
Normal file
33
src/components/organisms/Newsletter.svelte
Normal file
@@ -0,0 +1,33 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte'
|
||||
// Components
|
||||
import Button from '$components/atoms/Button.svelte'
|
||||
import IconArrow from '$components/atoms/IconArrow.svelte'
|
||||
|
||||
// export let locations: any
|
||||
const { settings: { newsletter_url, newsletter_text, newsletter_subtitle} }: any = getContext('global')
|
||||
</script>
|
||||
|
||||
<div class="newsletter grid">
|
||||
<div class="newsletter__wrapper grid">
|
||||
<div class="newsletter__about">
|
||||
<h3 class="title-small">{newsletter_subtitle}</h3>
|
||||
<p class="text-small">{newsletter_text}</p>
|
||||
<a href="/subscribe">
|
||||
<img src="/images/icons/form.svg" alt="newsletter icon">
|
||||
<span>See past issues</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="newsletter__signup">
|
||||
<form action={newsletter_url} target="_blank">
|
||||
<div class="newsletter__email">
|
||||
<input type="email" placeholder="Your email address">
|
||||
<button type="submit">
|
||||
<IconArrow color="white" />
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<span>No spam, we promise!</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user