-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
148 lines (132 loc) · 4.87 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
import * as React from 'react';
import AttributeGrid from '../components/AttributeGrid';
import Container from '../components/Container';
import Hero from '../components/Hero';
import BlogPreviewGrid from '../components/BlogPreviewGrid';
import Highlight from '../components/Highlight';
import Layout from '../components/Layout/Layout';
import ProductCollectionGrid from '../components/ProductCollectionGrid';
import ProductCardGrid from '../components/ProductCardGrid';
import Quote from '../components/Quote';
import Title from '../components/Title';
import { generateMockBlogData, generateMockProductData } from '../helpers/mock';
import * as styles from './index.module.css';
import { Link, navigate } from 'gatsby';
import { toOptimizedImage } from '../helpers/general';
const IndexPage = () => {
const newArrivals = generateMockProductData(3, 'shirt');
const blogData = generateMockBlogData(3);
const goToShop = () => {
navigate('/shop');
};
return (
<Layout disablePaddingBottom>
{/* Hero Container */}
<Hero
maxWidth={'500px'}
image={'/banner1.png'}
title={'Essentials for a cold winter'}
subtitle={'Discover Autumn Winter 2021'}
ctaText={'shop now'}
ctaAction={goToShop}
/>
{/* Message Container */}
<div className={styles.messageContainer}>
<p>
This is a demonstration of the Sydney theme for verse by{' '}
<span className={styles.gold}>matter design.</span>
</p>
<p>
wear by <span className={styles.gold}>sunspel</span> and{' '}
<span className={styles.gold}>scotch&soda</span>
</p>
</div>
{/* Collection Container */}
<div className={styles.collectionContainer}>
<Container size={'large'}>
<Title name={'New Collection'} />
<ProductCollectionGrid />
</Container>
</div>
{/* New Arrivals */}
<div className={styles.newArrivalsContainer}>
<Container>
<Title name={'New Arrivals'} link={'/shop'} textLink={'view all'} />
<ProductCardGrid
spacing={true}
showSlider
height={480}
columns={3}
data={newArrivals}
/>
</Container>
</div>
{/* Highlight */}
<div className={styles.highlightContainer}>
<Container size={'large'} fullMobile>
<Highlight
image={'/highlight.png'}
altImage={'highlight image'}
miniImage={'/highlightmin.png'}
miniImageAlt={'mini highlight image'}
title={'Luxury Knitwear'}
description={`This soft lambswool jumper is knitted in Scotland, using yarn from one of the world's oldest spinners based in Fife`}
textLink={'shop now'}
link={'/shop'}
/>
</Container>
</div>
{/* Promotion */}
<div className={styles.promotionContainer}>
<Hero image={toOptimizedImage('/banner2.png')} title={`-50% off \n All Essentials`} />
<div className={styles.linkContainers}>
<Link to={'/shop'}>WOMAN</Link>
<Link to={'/shop'}>MAN</Link>
</div>
</div>
{/* Quote */}
<Quote
bgColor={'var(--standard-light-grey)'}
title={'about Sydney'}
quote={
'“We believe in two things: the pursuit of quality in everything we do, and looking after one another. Everything else should take care of itself.”'
}
/>
{/* Blog Grid */}
<div className={styles.blogsContainer}>
<Container size={'large'}>
<Title name={'Journal'} subtitle={'Notes on life and style'} />
<BlogPreviewGrid data={blogData} />
</Container>
</div>
{/* Promotion */}
<div className={styles.sustainableContainer}>
<Hero
image={toOptimizedImage('/banner3.png')}
title={'We are Sustainable'}
subtitle={
'From caring for our land to supporting our people, discover the steps we’re taking to do more for the world around us.'
}
ctaText={'read more'}
maxWidth={'660px'}
ctaStyle={styles.ctaCustomButton}
/>
</div>
{/* Social Media */}
<div className={styles.socialContainer}>
<Title
name={'Styled by You'}
subtitle={'Tag @sydney to be featured.'}
/>
<div className={styles.socialContentGrid}>
<img src={toOptimizedImage(`/social/socialMedia1.png`)} alt={'social media 1'} />
<img src={toOptimizedImage(`/social/socialMedia2.png`)} alt={'social media 2'} />
<img src={toOptimizedImage(`/social/socialMedia3.png`)} alt={'social media 3'} />
<img src={toOptimizedImage(`/social/socialMedia4.png`)} alt={'social media 4'} />
</div>
</div>
<AttributeGrid />
</Layout>
);
};
export default IndexPage;