Make Shop module content dynamic
This commit is contained in:
6
pnpm-lock.yaml
generated
6
pnpm-lock.yaml
generated
@@ -141,7 +141,7 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
svelte: ^3.43.0
|
svelte: ^3.43.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sveltejs/vite-plugin-svelte': 1.0.0-next.26_svelte@3.43.1+vite@2.6.5
|
'@sveltejs/vite-plugin-svelte': 1.0.0-next.27_svelte@3.43.1+vite@2.6.5
|
||||||
cheap-watch: 1.0.4
|
cheap-watch: 1.0.4
|
||||||
sade: 1.7.4
|
sade: 1.7.4
|
||||||
svelte: 3.43.1
|
svelte: 3.43.1
|
||||||
@@ -154,8 +154,8 @@ packages:
|
|||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@sveltejs/vite-plugin-svelte/1.0.0-next.26_svelte@3.43.1+vite@2.6.5:
|
/@sveltejs/vite-plugin-svelte/1.0.0-next.27_svelte@3.43.1+vite@2.6.5:
|
||||||
resolution: {integrity: sha512-+Rx3IBa4disskQmr+0/Rh+NYavkM6Vi8BnkTGjKnblawysw4INXkq2WEQBp8luGpUZEkjwczdL9Z9Q2hISvIeA==}
|
resolution: {integrity: sha512-hiau09LA/5eGGFTxXtRPIxKmWw8By8t+Vw+uvgKYeUf+4zJLe/Q5yX3Przf2CmW0J6fPi4NWWIeYsLrOd78a2w==}
|
||||||
engines: {node: ^12.20 || ^14.13.1 || >= 16}
|
engines: {node: ^12.20 || ^14.13.1 || >= 16}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
diff-match-patch: ^1.0.5
|
diff-match-patch: ^1.0.5
|
||||||
|
|||||||
@@ -2,8 +2,9 @@
|
|||||||
import { getContext } from 'svelte'
|
import { getContext } from 'svelte'
|
||||||
// Components
|
// Components
|
||||||
import Button from '$components/atoms/Button.svelte'
|
import Button from '$components/atoms/Button.svelte'
|
||||||
|
import Image from '$components/atoms/Image.svelte'
|
||||||
|
|
||||||
const { location } = getContext('global')
|
const { location, shop } = getContext('global')
|
||||||
|
|
||||||
const locationsWithPoster = location
|
const locationsWithPoster = location
|
||||||
.filter((loc: any) => loc.has_poster)
|
.filter((loc: any) => loc.has_poster)
|
||||||
@@ -14,14 +15,16 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="shop__image">
|
<div class="shop__image">
|
||||||
<img src="/images/poster-display.jpg" alt="">
|
<img src="/images/poster-display.jpg" alt="">
|
||||||
|
<Image id={shop.module_image.id} alt={shop.module_image.title} width={800} height={800} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="shop__content">
|
<div class="shop__content">
|
||||||
<h3 class="title-medium">Browse our products</h3>
|
<h3 class="title-medium">{shop.module_title}</h3>
|
||||||
<p class="text-small">Discover our graphic posters and prints of your favouite locations.</p>
|
<p class="text-small">{shop.module_text}</p>
|
||||||
<Button
|
<Button
|
||||||
class="button--pink"
|
|
||||||
text="Shop"
|
|
||||||
url="/shop"
|
url="/shop"
|
||||||
|
text="Shop"
|
||||||
|
class="button--pink"
|
||||||
/>
|
/>
|
||||||
<p class="detail">
|
<p class="detail">
|
||||||
Posters available for {locationsWithPoster.join(', ').replace(/,(?!.*,)/gmi, ' and')}.
|
Posters available for {locationsWithPoster.join(', ').replace(/,(?!.*,)/gmi, ' and')}.
|
||||||
|
|||||||
@@ -78,9 +78,15 @@
|
|||||||
limit_new
|
limit_new
|
||||||
instagram
|
instagram
|
||||||
footer_links
|
footer_links
|
||||||
|
newsletter_subtitle
|
||||||
newsletter_url
|
newsletter_url
|
||||||
newsletter_text
|
newsletter_text
|
||||||
newsletter_subtitle
|
}
|
||||||
|
|
||||||
|
shop {
|
||||||
|
module_title
|
||||||
|
module_text
|
||||||
|
module_image { id title }
|
||||||
}
|
}
|
||||||
|
|
||||||
# Count
|
# Count
|
||||||
|
|||||||
Reference in New Issue
Block a user