24 | );
25 | };
26 |
27 | export default AddToCartButton;
28 |
--------------------------------------------------------------------------------
/src/components/PreviewCompatibleImage.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import PropTypes from 'prop-types'
3 | import Img from 'gatsby-image'
4 |
5 | const PreviewCompatibleImage = ({ imageInfo }) => {
6 | const imageStyle = { borderRadius: '5px' }
7 | const { alt = '', childImageSharp, image } = imageInfo
8 |
9 | if (!!image && !!image.childImageSharp) {
10 | return (
11 |
12 | )
13 | }
14 |
15 | if (!!childImageSharp) {
16 | return
17 | }
18 |
19 | if (!!image && typeof image === 'string')
20 | return
21 |
22 | return null
23 | }
24 |
25 | PreviewCompatibleImage.propTypes = {
26 | imageInfo: PropTypes.shape({
27 | alt: PropTypes.string,
28 | childImageSharp: PropTypes.object,
29 | image: PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired,
30 | style: PropTypes.object,
31 | }).isRequired,
32 | }
33 |
34 | export default PreviewCompatibleImage
35 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 gatsbyjs
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/static/img/safari-pinned-tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
18 |
--------------------------------------------------------------------------------
/src/pages/blog/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 |
3 | import Layout from '../../components/Layout'
4 | import BlogRoll from '../../components/BlogRoll'
5 |
6 | export default class BlogIndexPage extends React.Component {
7 | render() {
8 | return (
9 |
10 |
27 | )
28 |
29 | Pricing.propTypes = {
30 | data: PropTypes.arrayOf(
31 | PropTypes.shape({
32 | plan: PropTypes.string,
33 | price: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
34 | description: PropTypes.string,
35 | items: PropTypes.array,
36 | })
37 | ),
38 | }
39 |
40 | export default Pricing
41 |
--------------------------------------------------------------------------------
/src/pages/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | templateKey: index-page
3 | title: The world brought to your doorstep
4 | subtitle: Your one-stop shop for unique products you'll love
5 | image: /img/city-background.jpg
6 | heading: The world brought to your doorstep
7 | mainpitch:
8 | title: What is My Store?
9 | description: >
10 | My Store is a journey waiting to be had, from our journeys in the past. An
11 | ever changing collection of products that are meant to help broaden your
12 | daily life through the creation of others.
13 | bigimage:
14 | image: /img/bazaar-home.jpg
15 | alt: Bazaar
16 | intro:
17 | blurbs:
18 | - image: /img/close-up-cloth.jpg
19 | text: >
20 | Close up of cloth
21 | - image: /img/art-chairs.jpg
22 | text: >
23 | Artistic chairs
24 | - image: /img/arts-and-crafts.jpg
25 | text: >
26 | Colorful arts and crafts
27 | - image: /img/assorted-boutique.jpg
28 | text: >
29 | Assorted boutique
30 | heading: Purpose
31 | description: >
32 | Looking for a final set piece for your home that brings you back to a certain memort? Something
33 | for a rainy day to help open your mind? A piece of apparel that tells a story all it's
34 | own? That's what we seek out and hope you'll find here.
35 | ---
36 |
37 |
--------------------------------------------------------------------------------
/src/components/bigcommerce/ProductCard.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Link } from 'gatsby';
3 | import AddToCartButton from './AddToCartButton';
4 | import ProductPrices from './ProductPrices';
5 |
6 | class ProductCard extends React.Component {
7 | render() {
8 | const product = this.props.product;
9 |
10 | return (
11 |
45 |
46 | )
47 | }
48 |
49 | BlogPostTemplate.propTypes = {
50 | content: PropTypes.node.isRequired,
51 | contentComponent: PropTypes.func,
52 | description: PropTypes.string,
53 | title: PropTypes.string,
54 | helmet: PropTypes.object,
55 | }
56 |
57 | const BlogPost = ({ data }) => {
58 | const { markdownRemark: post } = data
59 |
60 | return (
61 |
62 |
68 | {`${post.frontmatter.title}`}
69 |
73 |
74 | }
75 | tags={post.frontmatter.tags}
76 | title={post.frontmatter.title}
77 | />
78 |
79 | )
80 | }
81 |
82 | BlogPost.propTypes = {
83 | data: PropTypes.shape({
84 | markdownRemark: PropTypes.object,
85 | }),
86 | }
87 |
88 | export default BlogPost
89 |
90 | export const pageQuery = graphql`
91 | query BlogPostByID($id: String!) {
92 | markdownRemark(id: { eq: $id }) {
93 | id
94 | html
95 | frontmatter {
96 | date(formatString: "MMMM DD, YYYY")
97 | title
98 | description
99 | tags
100 | }
101 | }
102 | }
103 | `
104 |
--------------------------------------------------------------------------------
/src/pages/blog/2019-10-15-the-cosmos-awaits.md:
--------------------------------------------------------------------------------
1 | ---
2 | templateKey: blog-post
3 | title: The Cosmos Awaits
4 | date: 2019-10-15T15:11:15.000Z
5 | featuredpost: false
6 | featuredimage: /img/accessory-art.jpg
7 | description: Radio telescope vastness is bearable only through love stirred by starlight billions upon billions not a sunrise but a galaxyrise circumnavigated. How far away Apollonius of Perga Apollonius of Perga shores of the cosmic ocean permanence of the stars astonishment?
8 | tags:
9 | - cosmos
10 | - sagan
11 | ---
12 | 
13 |
14 | At the edge of forever Orion's sword trillion Rig Veda Jean-François Champollion rogue. Concept of the number one as a patch of light citizens of distant epochs as a patch of light invent the universe descended from astronomers? Drake Equation something incredible is waiting to be known take root and flourish vanquish the impossible descended from astronomers two ghostly white figures in coveralls and helmets are soflty dancing.
15 |
16 | Descended from astronomers bits of moving fluff rich in mystery a very small stage in a vast cosmic arena Euclid billions upon billions? Great turbulent clouds shores of the cosmic ocean the only home we've ever known globular star cluster Orion's sword permanence of the stars. A mote of dust suspended in a sunbeam gathered by gravity how far away two ghostly white figures in coveralls and helmets are soflty dancing shores of the cosmic ocean finite but unbounded.
17 |
18 | ## Circumnavigated radio telescope
19 |
20 | How far away Rig Veda birth bits of moving fluff quasar paroxysm of global death. Great turbulent clouds star stuff harvesting star light gathered by gravity rich in heavy atoms inconspicuous motes of rock and gas concept of the number one. Network of wormholes the sky calls to us the sky calls to us worldlets extraordinary claims require extraordinary evidence not a sunrise but a galaxyrise? The sky calls to us two ghostly white figures in coveralls and helmets are soflty dancing network of wormholes a mote of dust suspended in a sunbeam not a sunrise but a galaxyrise vanquish the impossible?
21 |
22 | Billions upon billions tendrils of gossamer clouds white dwarf paroxysm of global death Apollonius of Perga the only home we've ever known?
23 |
24 | 1. Courage of our questions colonies vanquish the impossible
25 | 2. Euclid muse about preserve and cherish that pale blue dot
26 | 3. Muse about invent the universe take root and flourish not a sunrise but a galaxyrise the carbon in our apple pies bits of moving fluff
27 |
28 | From which we spring shores of the cosmic ocean quasar concept of the number one tingling of the spine Flatland. As a patch of light stirred by starlight descended from astronomers Euclid with pretty stories for which there's little good evidence emerged into consciousness. Something incredible is waiting to be known permanence of the stars rich in heavy atoms finite but unbounded something incredible is waiting to be known citizens of distant epochs and billions upon billions upon billions upon billions upon billions upon billions upon billions.
29 |
--------------------------------------------------------------------------------
/src/templates/product-page.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import { graphql } from 'gatsby';
4 | import Layout from '../components/Layout';
5 | import ProductCard from '../components/bigcommerce/ProductCard';
6 |
7 | export const ProductPageTemplate = ({
8 | image,
9 | title,
10 | heading,
11 | description,
12 | products
13 | }) => (
14 |
113 | );
114 |
115 | IndexPageTemplate.propTypes = {
116 | image: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
117 | title: PropTypes.string,
118 | subtitle: PropTypes.string,
119 | heading: PropTypes.string,
120 | mainpitch: PropTypes.object,
121 | bigimage: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
122 | description: PropTypes.string,
123 | intro: PropTypes.shape({
124 | blurbs: PropTypes.array
125 | }),
126 | post: PropTypes.object
127 | };
128 |
129 | const IndexPage = ({ data }) => {
130 | const { frontmatter } = data.markdownRemark;
131 |
132 | return (
133 |
134 |
145 |
146 | );
147 | };
148 |
149 | IndexPage.propTypes = {
150 | data: PropTypes.shape({
151 | markdownRemark: PropTypes.shape({
152 | frontmatter: PropTypes.object
153 | }),
154 | allMarkdownRemark: PropTypes.shape({
155 | edges: PropTypes.array,
156 | })
157 | })
158 | };
159 |
160 | export default IndexPage;
161 |
162 | export const pageQuery = graphql`
163 | query IndexPageTemplate {
164 | markdownRemark(frontmatter: { templateKey: { eq: "index-page" } }) {
165 | frontmatter {
166 | title
167 | subtitle
168 | image {
169 | childImageSharp {
170 | fluid(maxWidth: 2048, quality: 100) {
171 | ...GatsbyImageSharpFluid
172 | }
173 | }
174 | }
175 | heading
176 | mainpitch {
177 | title
178 | description
179 | }
180 | bigimage {
181 | image {
182 | childImageSharp {
183 | fluid(maxWidth: 240, quality: 64) {
184 | ...GatsbyImageSharpFluid
185 | }
186 | }
187 | publicURL
188 | }
189 | alt
190 | }
191 | intro {
192 | blurbs {
193 | image {
194 | childImageSharp {
195 | fluid(maxWidth: 240, quality: 64) {
196 | ...GatsbyImageSharpFluid
197 | }
198 | }
199 | }
200 | text
201 | }
202 | heading
203 | description
204 | }
205 | }
206 | }
207 | allMarkdownRemark(
208 | sort: { order: DESC, fields: [frontmatter___featuredpost, frontmatter___date] }
209 | filter: { frontmatter: { templateKey: { eq: "blog-post" } } }
210 | limit: 1
211 | ) {
212 | edges {
213 | node {
214 | excerpt(pruneLength: 400)
215 | id
216 | fields {
217 | slug
218 | }
219 | frontmatter {
220 | title
221 | templateKey
222 | date(formatString: "MMMM DD, YYYY")
223 | featuredpost
224 | featuredimage {
225 | childImageSharp {
226 | fluid(maxWidth: 120, quality: 100) {
227 | ...GatsbyImageSharpFluid
228 | }
229 | }
230 | }
231 | }
232 | }
233 | }
234 | }
235 | }
236 | `;
237 |
--------------------------------------------------------------------------------
/src/pages/blog/2019-10-11-shopping-with-business-cat.md:
--------------------------------------------------------------------------------
1 | ---
2 | templateKey: blog-post
3 | title: Shopping with the Business Cat
4 | date: 2019-10-11T12:14:04.000Z
5 | featuredpost: true
6 | featuredimage: /img/animal-business-cat.jpg
7 | description: Destroy couch leave fur on owners clothes show belly
8 | tags:
9 | - kitty cat
10 | - cosmos
11 | ---
12 |
13 | 
14 |
15 | Cat ipsum dolor sit amet, wake up wander around the house making large amounts of noise jump on top of your human's bed and fall asleep again toilet paper attack claws fluff everywhere meow miao french ciao litterbox and sleep on keyboard and meow to be let out. Cats secretly make all the worlds muffins howl uncontrollably for no reason bring your owner a dead bird stand in front of the computer screen, and climb leg. Attack the dog then pretend like nothing happened taco cat backwards spells taco cat for claws in the eye of the beholder and fight an alligator and win. There's a forty year old lady there let us feast under the bed sleep on dog bed, force dog to sleep on floor try to jump onto window and fall while scratching at wall and i cry and cry and cry unless you pet me, and then maybe i cry just for fun, and scratch me there, elevator butt. Tuxedo cats always looking dapper cats making all the muffins and who's the baby, and lick left leg for ninety minutes, still dirty litter kitter kitty litty little kitten big roar roar feed me. Rub face on everything leave hair everywhere pose purrfectly to show my beauty, rub against owner because nose is wet for so you're just gonna scroll by without saying meowdy?. Purr when being pet carefully drink from water glass and then spill it everywhere and proceed to lick the puddle attack the dog then pretend like nothing happened so need to chase tail. Walk on keyboard.
16 |
17 | ## Soft kitty warm kitty little ball of furr
18 |
19 | Scratch leg; meow for can opener to feed me lick the plastic bag lick the plastic bag grab pompom in mouth and put in water dish, but nyan fluffness ahh cucumber! i will be pet i will be pet and then i will hiss. Try to jump onto window and fall while scratching at wall cry louder at reflection yet sweet beast, for sit by the fire or peer out window, chatter at birds, lure them to mouth. Scratch the postman wake up lick paw wake up owner meow meow. Scratch the postman wake up lick paw wake up owner meow meow meow go back to sleep owner brings food and water tries to pet on head, so scratch get sprayed by water because bad cat so relentlessly pursues moth suddenly go on wild-eyed crazy rampage. Eat too much then proceed to regurgitate all over living room carpet while humans eat dinner munch on tasty moths for give me attention or face the wrath of my claws hopped up on catnip lick butt and make a weird face purr lick human with sandpaper tongue. I will be pet i will be pet and then i will hiss dead stare with ears cocked pretend not to be evil. Scream at teh bath cat is love, cat is life yet yowling nonstop the whole night. Scratch me there, elevator butt. Sleep everywhere, but not in my bed friends are not food. I'm bored inside, let me out i'm lonely outside, let me in i can't make up my mind whether to go in or out, guess i'll just stand partway in and partway out, contemplating the universe for half an hour how dare you nudge me with your foot?!?! leap into the air in greatest offense! jump five feet high and sideways when a shadow moves but claws in your leg. Meow go back to sleep owner brings food and water tries to pet on head, so scratch get sprayed by water because bad cat hiss at vacuum cleaner for nyan fluffness ahh cucumber! purr while eating meow yet i want to go outside let me go outside nevermind inside is better, that box? i can fit in that box. Cats secretly make all the worlds muffins purr while eating. Cry louder at reflection scoot butt on the rug put toy mouse in food bowl run out of litter box at full speed . Ignore the squirrels, you'll never catch them anyway hey! you there, with the hands for fight own tail or toilet paper attack claws fluff everywhere meow miao french ciao litterbox side-eyes your "jerk" other hand while being petted or hide at bottom of staircase to trip human. Flop over eat half my food and ask for more, my left donut is missing, as is my right scratch the furniture try to hold own back foot to clean it but foot reflexively kicks you in face, go into a rage and bite own foot, hard give attitude. Touch water with paw then recoil in horror get video posted to internet for chasing red dot or i vomit in the bed in the middle of the night 𝕄𝔼𝕆𝕎 run in circles lie in the sink all day.
20 |
21 | Cough furball sleep in the bathroom sink or walk on keyboard and put toy mouse in food bowl run out of litter box at full speed but missing until dinner time. What the heck just happened, something feels fishy make plans to dominate world and then take a nap or why use post when this sofa is here. Meow go into a room to decide you didn't want to be in there anyway yet kitty poochy chase dog then run away. Fart in owners food so you're just gonna scroll by without saying meowdy? yet get scared by sudden appearance of cucumber and attack feet, but rub butt on table. Destroy couch eat from dog's food yet purr when being pet. Missing until dinner time scratch yet pee in the shoe sleep in the bathroom sink ignore the squirrels, you'll never catch them anyway, or there's a forty year old lady there let us feast. Being gorgeous with belly side up has closed eyes but still sees you and meow loudly just to annoy owners. Flee in terror at cucumber discovered on floor that box? i can fit in that box or walk on keyboard. Meow show belly russian blue. Asdflkjaertvlkjasntvkjn (sits on keyboard) sniff catnip and act crazy chase laser. Meow and walk away attack feet russian blue proudly present butt to human hiding behind the couch until lured out by a feathery toy lie in the sink all day. Side-eyes your "jerk" other hand while being petted grab pompom in mouth and put in water dish. Damn that dog annoy the old grumpy cat, start a fight and then retreat to wash when i lose eat a plant, kill a hand attack like a vicious monster so bring your owner a dead bird meowwww but skid on floor, crash into wall . Milk the cow decide to want nothing to do with my owner today my water bowl is clean and freshly replenished, so i'll drink from the toilet is good you understand your place in my world destroy couch, so purr when give birth, mice. I show my fluffy belly but it's a trap! if you pet it i will tear up your hand try to hold own back foot to clean it but foot reflexively kicks you in face, go into a rage and bite own foot, hard for licks paws. Munch, munch, chomp, chomp stinky cat use lap as chair use lap as chair meow in empty rooms, but reward the chosen human with a slow blink but pet my belly, you know you want to; seize the hand and shred it!.
22 |
23 |
24 |
25 | The Specialty Coffee Association of America (SCAA), founded in 1982, is a non-profit trade organization for the specialty coffee industry. With members located in more than 40 countries, SCAA represents every segment of the specialty coffee industry, including:
26 |
27 | * producers
28 | * roasters
29 | * importers/exporters
30 | * retailers
31 | * manufacturers
32 | * baristas
33 |
34 | For over 30 years, SCAA has been dedicated to creating a vibrant specialty coffee community by recognizing, developing and promoting specialty coffee. SCAA sets and maintains quality standards for the industry, conducts market research, and provides education, training, resources, and business services for its members.
35 |
36 | Coffee cupping, or coffee tasting, is the practice of observing the tastes and aromas of brewed coffee. It is a professional practice but can be done informally by anyone or by professionals known as "Q Graders". A standard coffee cupping procedure involves deeply sniffing the coffee, then loudly slurping the coffee so it spreads to the back of the tongue.
37 |
38 | The coffee taster attempts to measure aspects of the coffee's taste, specifically the body (the texture or mouthfeel, such as oiliness), sweetness, acidity (a sharp and tangy feeling, like when biting into an orange), flavour (the characters in the cup), and aftertaste. Since coffee beans embody telltale flavours from the region where they were grown, cuppers may attempt to identify the coffee's origin.
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Gatsby + BigCommerce + Netlify CMS Starter
2 |
3 | Note: This starter uses Gatsby v2.
4 |
5 | [Demo store](https://bigcommerce-store.netlify.com/)
6 |
7 | Accompanying tutorial blog post: [Building a JAMstack Ecommerce Storefront with BigCommerce & Netlify](https://www.netlify.com/blog/2020/02/21/building-a-jamstack-ecommerce-storefront-with-bigcommerce-netlify/)
8 |
9 | Accompanying overview video: [Building e-commerce storefronts on the JAMstack](https://www.youtube.com/watch?v=Wnm_ErMrjDM)
10 |
11 | This version of the starter is meant to power a simple, single language storefront. If you are looking for something more complex, there is also a branch that supports multiple regions within a single storefront [here](https://github.com/bigcommerce/gatsby-bigcommerce-netlify-cms-starter/tree/multi-channel).
12 |
13 | ## Prerequisites
14 |
15 | - Node (v10.16.3) Recommended
16 | - [Gatsby CLI](https://www.gatsbyjs.org/docs/)
17 | - [Netlify CLI](https://www.netlify.com/docs/cli/)
18 | - [A BigCommerce Instance with API keys](https://developer.bigcommerce.com/api-docs)
19 |
20 | ## Setting up BigCommerce
21 |
22 | The BigCommerce source plugin relies on API Keys. In this starter we are using the node project `dotenv` to access these variables. Make a copy of the `SAMPLE.env` file and fill in the variables from your [BigCommerce API user details](https://developer.bigcommerce.com/api-docs/getting-started/authentication#authentication_getting-api-credentials).
23 |
24 | *Note: You can sign up for a free trial on bigcommerce.com, which includes API access, if you don't already have an account. There is also a partner program which includes a sandbox account to play around in.*
25 |
26 | Once you have your API keys, do the following:
27 | * Install dependencies
28 | * `yarn`
29 | * Set up environment variables
30 | * `cp SAMPLE.env .env`
31 | * Enter your API credentials in .env file
32 |
33 | ## Getting Started (Recommended - Netlify CLI)
34 |
35 | Netlify CMS can run in any frontend web environment, but the quickest way to try it out is by running it on a pre-configured starter site with Netlify. Because the app requires credentials for the BigCommerce API, the easiest way to get started with a working deploy is via the Netlify CLI. To do so, run the following commands:
36 |
37 | * Link to your Netlify site
38 | * `netlify link`
39 | * Build
40 | * `npm run build`
41 | * Deploy to Netlify
42 | * `netlify deploy`
43 |
44 |
45 | ### "One Click" Deploy
46 | Alternative to the CLI, you can use the deploy button below to build and deploy your own copy of the repository. This is recommended if you have not already forked the repo (as it will make a copy of it).
47 |
48 | *Note: The initial deploy will fail, as you need to set build environment variables for your Netlify site*
49 |
50 | To set the variables:
51 | * Navigate to your Netlify site's "Build & Deploy" settings
52 | * Go to "Environment variables" > "Edit variables"
53 | * Enter the environment variables specified in "SAMPLE.env" and your BC API credentials
54 |
55 |
56 |
57 | After clicking that button, you’ll authenticate with GitHub and choose a repository name. Netlify will then automatically create a repository in your GitHub account with a copy of the files from the template. Next, it will build and deploy the new site on Netlify, bringing you to the site dashboard when the build is complete. Next, you’ll need to set up Netlify’s Identity service to authorize users to log in to the CMS.
58 |
59 | ### Access Locally
60 |
61 | ```
62 | $ git clone https://github.com/[GITHUB_USERNAME]/[REPO_NAME].git
63 | $ cd [REPO_NAME]
64 | $ yarn
65 | $ npm run start
66 | ```
67 |
68 | To test the CMS locally, you'll need run a production build of the site:
69 |
70 | ```
71 | $ npm run build
72 | $ npm run serve
73 | ```
74 |
75 | ### Media Libraries (installed, but optional)
76 |
77 | Media Libraries have been included in this starter as a default. If you are not planning to use `Uploadcare` or `Cloudinary` in your project, you **can** remove them from module import and registration in `src/cms/cms.js`. Here is an example of the lines to comment or remove them your project.
78 |
79 | ```javascript
80 | import CMS from 'netlify-cms-app';
81 | // import uploadcare from 'netlify-cms-media-library-uploadcare'
82 | // import cloudinary from 'netlify-cms-media-library-cloudinary'
83 |
84 | import AboutPagePreview from './preview-templates/AboutPagePreview';
85 | import BlogPostPreview from './preview-templates/BlogPostPreview';
86 | import ProductPagePreview from './preview-templates/ProductPagePreview';
87 | import IndexPagePreview from './preview-templates/IndexPagePreview';
88 |
89 | // CMS.registerMediaLibrary(uploadcare);
90 | // CMS.registerMediaLibrary(cloudinary);
91 |
92 | CMS.registerPreviewTemplate('index', IndexPagePreview);
93 | CMS.registerPreviewTemplate('about', AboutPagePreview);
94 | CMS.registerPreviewTemplate('products', ProductPagePreview);
95 | CMS.registerPreviewTemplate('blog', BlogPostPreview);
96 | ```
97 |
98 | ## Getting Started (Without Netlify)
99 |
100 | ```
101 | $ gatsby new [SITE_DIRECTORY_NAME] https://github.com/netlify-templates/gatsby-starter-netlify-cms/
102 | $ cd [SITE_DIRECTORY_NAME]
103 | $ npm run build
104 | $ npm run serve
105 | ```
106 |
107 | ### Setting up the CMS
108 |
109 | Follow the [Netlify CMS Quick Start Guide](https://www.netlifycms.org/docs/quick-start/#authentication) to set up authentication, and hosting.
110 |
111 | ## Debugging
112 |
113 | Windows users might encounter `node-gyp` errors when trying to npm install.
114 | To resolve, make sure that you have both Python 2.7 and the Visual C++ build environment installed.
115 |
116 | ```
117 | npm config set python python2.7
118 | npm install --global --production windows-build-tools
119 | ```
120 |
121 | [Full details here](https://www.npmjs.com/package/node-gyp 'NPM node-gyp page')
122 |
123 | ## Purgecss
124 |
125 | This plugin uses [gatsby-plugin-purgecss](https://www.gatsbyjs.org/packages/gatsby-plugin-purgecss/) and [bulma](https://bulma.io/). The bulma builds are usually ~170K but reduced 90% by purgecss.
126 |
127 | # Kudos
128 |
129 | This is based on the [Gatsby Netlify CMS Starter](https://github.com/netlify-templates/gatsby-starter-netlify-cms) repo. Major kudos!
130 |
131 | Photos in starter from various photographers:
132 | [Aden Ardenrich](https://www.pexels.com/photo/bags-business-commerce-hanging-581344/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
133 | [Pixabay](https://www.pexels.com/photo/architecture-bar-blur-boutique-264570/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
134 | [Artem Beliaikin](https://www.pexels.com/photo/multi-colored-hunged-coats-2872879/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
135 | [Daria Shevtsova](https://www.pexels.com/photo/red-motor-scooter-parking-on-front-of-chez-michele-store-1070981/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
136 | [Aleksandar Pasaric](https://www.pexels.com/photo/people-walking-on-street-near-buildings-2339009/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
137 | [Naim Benjelloun](https://www.pexels.com/photo/photo-of-people-walking-in-marketplace-2610817/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
138 | [Kiara Coll](https://www.pexels.com/photo/close-up-photo-of-assorted-textiles-2928381/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
139 | [Artem Beliaikin](https://www.pexels.com/photo/white-and-black-floral-cap-sleeved-shirt-994523/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
140 | [Eric Montanah](https://www.pexels.com/photo/two-assorted-color-padded-chairs-near-side-table-1350789/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
141 | [Sanketh Rao](https://www.pexels.com/photo/assorted-commemorative-plates-716107/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
142 | [Artem Beliaikin](https://www.pexels.com/photo/photo-of-beaded-accessories-994515/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
143 | [Jamie Diaz](https://www.pexels.com/photo/cat-mascot-outdoors-2133243/?utm_content=attributionCopyText&utm_medium=referral&utm_source=pexels)
144 |
145 | # CONTRIBUTING
146 |
147 | Contributions are always welcome, no matter how large or small.
148 |
--------------------------------------------------------------------------------
/src/components/bigcommerce/Cart.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Link } from 'gatsby';
3 |
4 | import CurrencyFormatter from './CurrencyFormatter';
5 | import Loader from '../Loader';
6 |
7 | import CartContext from '../../context/CartProvider';
8 |
9 | const AdjustItem = props => {
10 | const { item, updatingItem, cartType } = props;
11 | let minusBtn, plusBtn;
12 |
13 | if (cartType === 'full') {
14 | minusBtn = (
15 |
20 | )
21 |
22 | plusBtn = (
23 |
28 | )
29 | }
30 |
31 | return (
32 |