Add a newsletter subscription form below locations
All checks were successful
continuous-integration/drone/push Build is passing

- One component used below Locations list and in the Pagination when all photos has been loaded
- Keep the subscribe page with the column display
This commit is contained in:
2020-05-06 23:06:26 +02:00
parent 2bb568865c
commit 720ca69902
16 changed files with 228 additions and 137 deletions

View File

@@ -7,6 +7,7 @@
// Components
import Button from 'atoms/Button'
import Location from 'molecules/Location'
import Newsletter from 'organisms/Newsletter'
// Animations
import { animateIn } from 'animations/Locations'
@@ -58,12 +59,11 @@
<div class="browse__locations" id="locations_list" role="list" bind:this={list}>
{#each filteredLocations as location (location.id)}
<div animate:flip="{{ duration: transitionDuration }}"
in:receive="{{ key: location.id }}"
out:send="{{ key: location.id }}"
>
<div animate:flip="{{ duration: transitionDuration }}" in:receive="{{ key: location.id }}" out:send="{{ key: location.id }}">
<Location {location} />
</div>
{/each}
</div>
</div>
<Newsletter />

View File

@@ -0,0 +1,22 @@
<script>
import { site } from 'utils/store'
// Components
import NewsletterForm from 'molecules/NewsletterForm'
// Props
export let brightness = undefined
export let title = 'Keep Updated'
</script>
<div class="newsletter" class:newsletter--light={brightness === 'light'}>
<div class="wrapper">
<div class="newsletter__text style-description style-description--small" class:style-description--dark={brightness === 'light'}>
<h2 class="style-location">
<label for="SUB_EMAIL">{title}</label>
</h2>
<p>{$site.newsletter_text}</p>
</div>
<NewsletterForm align="right" {brightness} />
</div>
</div>

View File

@@ -2,7 +2,7 @@
import { onMount, createEventDispatcher } from 'svelte'
import { site, currentLocation } from 'utils/store'
// Components
import Newsletter from 'molecules/Newsletter'
import Newsletter from 'organisms/Newsletter'
// Props
export let photos
export let paginatedPhotos
@@ -58,12 +58,9 @@
{:else if $currentLocation}
<div class="pagination__message">
<h3>That's all folks!</h3>
<Newsletter
small={true}
title="That's all folks!"
brightness="light"
title={false}
/>
</div>
{/if}