Compare commits
99
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9cb2f418b3 | ||
|
|
7880c28a83 | ||
|
|
21da763893 | ||
|
|
fa28fbc5c8 | ||
|
|
467acec0b6 | ||
|
|
c871a82024 | ||
|
|
f8fcaf01a3 | ||
|
|
03210fc24c | ||
|
|
92207dc795 | ||
|
|
deb057ea1d | ||
|
|
cbf77da8e4 | ||
|
|
1b7cba3a88 | ||
|
|
fd71b33270 | ||
|
|
1f436dd426 | ||
|
|
a3303bac93 | ||
|
|
36a01705ae | ||
|
|
00145c738c | ||
|
|
a588a9730d | ||
|
|
9dbe050226 | ||
|
|
8f7f138bb9 | ||
|
|
1c67294610 | ||
|
|
06e9d22c43 | ||
|
|
f5a2f61043 | ||
|
|
e0b614be63 | ||
|
|
a608a9697e | ||
|
|
d461051f55 | ||
|
|
7a0c4ac8d9 | ||
|
|
6d47078905 | ||
|
|
c22f13ba10 | ||
|
|
85b52529cb | ||
|
|
0a455e74ae | ||
|
|
c0c5f7c3ca | ||
|
|
731654588a | ||
|
|
e93d86e053 | ||
|
|
ca31946570 | ||
|
|
39f892c898 | ||
|
|
fc9b3a787d | ||
|
|
46dfabca9f | ||
|
|
e0f1c2fa75 | ||
|
|
cdcaad75b5 | ||
|
|
6f161289bb | ||
|
|
35ddb5d158 | ||
|
|
b6f061b812 | ||
|
|
1854059b14 | ||
|
|
e10b7c5054 | ||
|
|
36d0216e93 | ||
|
|
cd18501a32 | ||
|
|
a8752f5064 | ||
|
|
a41f4ad48a | ||
|
|
0e2bdf752b | ||
|
|
8fd2bb269e | ||
|
|
2e1d58b40f | ||
|
|
3cde0830ef | ||
|
|
5343f3bbae | ||
|
|
4b98a0119f | ||
|
|
508eb1d2f1 | ||
|
|
56e833431f | ||
|
|
f7251e0f11 | ||
|
|
6c46c5285f | ||
|
|
2731a6ef01 | ||
|
|
91895dc537 | ||
|
|
d522ab13d6 | ||
|
|
ff95eb538f | ||
|
|
1ec31a9928 | ||
|
|
7ff2824326 | ||
|
|
523c066571 | ||
|
|
257711f234 | ||
|
|
9342b3520e | ||
|
|
4ae54ede69 | ||
|
|
5dfdfdcd3b | ||
|
|
65bd06a8a9 | ||
|
|
4453d66bb9 | ||
|
|
968f38585a | ||
|
|
2e1b58b710 | ||
|
|
d73ce7f5be | ||
|
|
6b133ddf2f | ||
|
|
4d1285148d | ||
|
|
dcd91c3213 | ||
|
|
6431918460 | ||
|
|
cb4090a91e | ||
|
|
2629539360 | ||
|
|
e62ee967f2 | ||
|
|
366c8f1eb4 | ||
|
|
2679244629 | ||
|
|
dc8aaf296d | ||
|
|
f3ea1e9e7e | ||
|
|
cfdf93db71 | ||
|
|
813ca224bd | ||
|
|
b2d7af72d9 | ||
|
|
6903baaf65 | ||
|
|
ed109dc6d4 | ||
|
|
d39982b802 | ||
|
|
436365b99d | ||
|
|
408479407c | ||
|
|
2ee3aba0cf | ||
|
|
dceffdca5b | ||
|
|
560363e577 | ||
|
|
fa8ed1c104 | ||
|
|
a1f2a5bf02 |
@@ -0,0 +1,30 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
time: "10:00"
|
||||||
|
timezone: Europe/Paris
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
ignore:
|
||||||
|
- dependency-name: nuxt-buefy
|
||||||
|
versions:
|
||||||
|
- 0.4.4
|
||||||
|
- 0.4.5
|
||||||
|
- 0.4.6
|
||||||
|
- dependency-name: y18n
|
||||||
|
versions:
|
||||||
|
- 4.0.1
|
||||||
|
- 4.0.2
|
||||||
|
- dependency-name: nuxt
|
||||||
|
versions:
|
||||||
|
- 2.14.12
|
||||||
|
- 2.15.0
|
||||||
|
- 2.15.1
|
||||||
|
- 2.15.3
|
||||||
|
- dependency-name: "@nuxtjs/axios"
|
||||||
|
versions:
|
||||||
|
- 5.12.5
|
||||||
|
- 5.13.0
|
||||||
|
- 5.13.1
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# my-sockets
|
# Shopify Storefront
|
||||||
|
|
||||||
> My premium Nuxt.js project
|
> Nuxt js front-end integration for shopify store
|
||||||
|
|
||||||
## Build Setup
|
## Build Setup
|
||||||
|
|
||||||
@@ -20,3 +20,13 @@ $ npm run generate
|
|||||||
```
|
```
|
||||||
|
|
||||||
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
|
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Simply register these variable in a .env file
|
||||||
|
|
||||||
|
```dotenv
|
||||||
|
DOMAIN=<your-store.myshopify.com/>
|
||||||
|
STOREFRONT_ACCESS_TOKEN=<SHOPIFY STOREFRONT API ACCESS TOKEN>
|
||||||
|
API_URL=https://<DOMAIN>/api/2020-01/graphql
|
||||||
|
```
|
||||||
|
|||||||
Vendored
+7
-1
@@ -40,13 +40,19 @@ p.footer-link > a:hover {
|
|||||||
@import "~bulma";
|
@import "~bulma";
|
||||||
@import "~buefy/src/scss/buefy";
|
@import "~buefy/src/scss/buefy";
|
||||||
|
|
||||||
|
.is-shadow {
|
||||||
|
text-shadow: 2px 2px 4px #000000;
|
||||||
|
}
|
||||||
|
|
||||||
// My custom theme
|
// My custom theme
|
||||||
.nuxt-link-exact-active {
|
.nuxt-link-exact-active {
|
||||||
border-bottom: 2px solid $primary;
|
border-bottom: 2px solid $primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
border-radius: .6rem;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
@extend .list;
|
@extend .list;
|
||||||
|
|||||||
+52
-42
@@ -1,55 +1,57 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="columns">
|
<div class="columns is-multiline">
|
||||||
<div v-for="article in articles" :key="article.id" class="column is-one-third">
|
<div
|
||||||
<div class="card rounded">
|
v-for="article in blog.articles.edges"
|
||||||
<div class="card-image">
|
:key="article.node.id"
|
||||||
<figure class="image is-4by3">
|
class="column is-full-mobile is-half-tablet is-one-third-desktop"
|
||||||
<img :src="article.image.src" :alt="product.images[0].altText">
|
>
|
||||||
</figure>
|
<nuxt-link :to="`/blog/${blog.handle}/article/${article.node.handle}`">
|
||||||
</div>
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-image">
|
||||||
<div class="media">
|
<figure v-if="article.node.image !== null">
|
||||||
<div class="media-content">
|
<img
|
||||||
<p class="title is-4">
|
:src="article.node.image.originalSrc"
|
||||||
{{ product.title }}
|
:alt="article.node.image.altText"
|
||||||
</p>
|
>
|
||||||
<p class="subtitle is-6">
|
</figure>
|
||||||
{{ product.variants[0].price }} €
|
<figure v-else class="is-flex">
|
||||||
</p>
|
<img
|
||||||
|
src="/img/no-image.jpg"
|
||||||
|
alt="image-not-found"
|
||||||
|
>
|
||||||
|
</figure>
|
||||||
|
</div>
|
||||||
|
<div class="card-content">
|
||||||
|
<p class="title is-4">
|
||||||
|
{{ article.node.title }}
|
||||||
|
</p>
|
||||||
|
<p class="subtitle is-6">{{ article.node.excerpt }}</p>
|
||||||
|
<div class="content">
|
||||||
|
<b-taglist class="is-marginless">
|
||||||
|
<b-tag
|
||||||
|
v-for="tag in article.node.tags"
|
||||||
|
:key="tag"
|
||||||
|
href="#"
|
||||||
|
type="is-primary"
|
||||||
|
>
|
||||||
|
#{{ tag }}
|
||||||
|
</b-tag>
|
||||||
|
</b-taglist>
|
||||||
|
<time datetime="2016-1-1">{{ article.node.publishedAt }}</time>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content">
|
|
||||||
<b-button
|
|
||||||
tag="router-link"
|
|
||||||
:to="'/products/' + product.handle"
|
|
||||||
type="is-primary"
|
|
||||||
>
|
|
||||||
See
|
|
||||||
</b-button>
|
|
||||||
<b-button
|
|
||||||
type="is-primary"
|
|
||||||
icon-left="cart"
|
|
||||||
@click="addToCart(product.variants[0].id, 1)"
|
|
||||||
>
|
|
||||||
Buy
|
|
||||||
</b-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import cartMixins from '../mixins/cartMixins'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProductCardList',
|
name: 'BlogCardList',
|
||||||
mixins: [cartMixins],
|
|
||||||
props: {
|
props: {
|
||||||
products: {
|
blog: {
|
||||||
type: Array,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -57,5 +59,13 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.subtitle {
|
||||||
|
height: 20px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
figure.is-flex {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
<template>
|
||||||
|
<div class="columns">
|
||||||
|
<div class="column">
|
||||||
|
<h1>{{ policy.title }}</h1>
|
||||||
|
<div v-html="policy.body" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'PolicyPage',
|
||||||
|
props: {
|
||||||
|
policy: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -1,42 +1,42 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="columns">
|
<div class="columns is-multiline">
|
||||||
<div v-for="product in products" :key="product.id" class="column is-one-third">
|
<div v-for="product in products" :key="product.id" class="column is-half-tablet is-one-third-widescreen">
|
||||||
<div class="card">
|
<nuxt-link :to="`/products/${product.handle}`">
|
||||||
<div class="card-image">
|
<div class="card">
|
||||||
<figure class="image is-4by3">
|
<div class="card-image">
|
||||||
<img :src="product.images[0].src" :alt="product.images[0].altText">
|
<figure class="image is-4by3" v-if="product.images[0].src !== null">
|
||||||
</figure>
|
<img :src="product.images[0].src" :alt="product.images[0].altText">
|
||||||
</div>
|
</figure>
|
||||||
<div class="card-content">
|
<figure v-else class="is-flex">
|
||||||
<div class="media">
|
<img
|
||||||
<div class="media-content">
|
src="/img/no-image.jpg"
|
||||||
<p class="title is-4">
|
alt="image-not-found"
|
||||||
{{ product.title }}
|
>
|
||||||
</p>
|
</figure>
|
||||||
<p class="subtitle is-6">
|
</div>
|
||||||
{{ product.variants[0].price }} €
|
<div class="card-content">
|
||||||
</p>
|
<div class="media">
|
||||||
|
<div class="media-content">
|
||||||
|
<p class="title is-4">
|
||||||
|
{{ product.title }}
|
||||||
|
</p>
|
||||||
|
<p class="subtitle is-6">
|
||||||
|
{{ product.variants[0].price }} €
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content">
|
||||||
|
<b-button
|
||||||
|
type="is-primary"
|
||||||
|
icon-left="cart"
|
||||||
|
@click="addToCart(product.variants[0].id, 1)"
|
||||||
|
>
|
||||||
|
Buy
|
||||||
|
</b-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content">
|
|
||||||
<b-button
|
|
||||||
tag="router-link"
|
|
||||||
:to="'/products/' + product.handle"
|
|
||||||
type="is-primary"
|
|
||||||
>
|
|
||||||
See
|
|
||||||
</b-button>
|
|
||||||
<b-button
|
|
||||||
type="is-primary"
|
|
||||||
icon-left="cart"
|
|
||||||
@click="addToCart(product.variants[0].id, 1)"
|
|
||||||
>
|
|
||||||
Buy
|
|
||||||
</b-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
+14
-18
@@ -3,10 +3,8 @@
|
|||||||
<div class="content has-text-light">
|
<div class="content has-text-light">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column has-text-centered">
|
<div class="column has-text-centered">
|
||||||
<p>
|
<p class="footer-link">
|
||||||
<strong>Bulma</strong> by <a href="https://jgthms.com">Jeremy Thomas</a>. The source code is licensed
|
Made with ❤️, 🍺 and ☕ by <a href="https://github.com/thomas-philippot"> Thomas Philippot</a>
|
||||||
<a href="http://opensource.org/licenses/mit-license.php">MIT</a>
|
|
||||||
. The website content is licensed <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY NC SA 4.0</a>.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -15,23 +13,26 @@
|
|||||||
<p class="footer-link-title">
|
<p class="footer-link-title">
|
||||||
Newsletter
|
Newsletter
|
||||||
</p>
|
</p>
|
||||||
<p
|
|
||||||
v-for="i in 5"
|
|
||||||
:key="i"
|
|
||||||
class="footer-link"
|
|
||||||
>
|
|
||||||
<a href="">link {{ i }}</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="column is-4">
|
<div class="column is-4">
|
||||||
<p class="is-size-5">
|
<p class="is-size-5">
|
||||||
Policy
|
Policy
|
||||||
</p>
|
</p>
|
||||||
<p class="footer-link">
|
<p class="footer-link">
|
||||||
<nuxt-link :to="`/policy/${privacyPolicy.handle}`">
|
<nuxt-link to="/policy/privacy-policy">
|
||||||
Privacy Policy
|
Privacy Policy
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</p>
|
</p>
|
||||||
|
<p class="footer-link">
|
||||||
|
<nuxt-link to="/policy/refund-policy">
|
||||||
|
Refund Policy
|
||||||
|
</nuxt-link>
|
||||||
|
</p>
|
||||||
|
<p class="footer-link">
|
||||||
|
<nuxt-link to="/policy/terms-of-service">
|
||||||
|
Terms of service
|
||||||
|
</nuxt-link>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="column is-4">
|
<div class="column is-4">
|
||||||
<p class="is-size-5">
|
<p class="is-size-5">
|
||||||
@@ -45,12 +46,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'TheFooter',
|
name: 'TheFooter'
|
||||||
computed: {
|
|
||||||
privacyPolicy () {
|
|
||||||
return this.$store.state.shop.privacyPolicy
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -17,13 +17,6 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
TheFooter,
|
TheFooter,
|
||||||
TheNavbar
|
TheNavbar
|
||||||
},
|
|
||||||
asyncData ({ $shopify }) {
|
|
||||||
return $shopify.collection.fetchAllWithProducts().then((collections) => {
|
|
||||||
return {
|
|
||||||
collections
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app">
|
||||||
|
<the-navbar />
|
||||||
|
<div id="content-wrap">
|
||||||
|
<nuxt />
|
||||||
|
</div>
|
||||||
|
<the-footer />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
import TheNavbar from '../components/TheNavbar'
|
||||||
|
import TheFooter from '../components/TheFooter'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
TheFooter,
|
||||||
|
TheNavbar
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#content-wrap {
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
+67
-1
@@ -1,4 +1,5 @@
|
|||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
|
const axios = require("axios")
|
||||||
export default {
|
export default {
|
||||||
mode: 'universal',
|
mode: 'universal',
|
||||||
/*
|
/*
|
||||||
@@ -26,7 +27,10 @@ export default {
|
|||||||
/*
|
/*
|
||||||
** Plugins to load before mounting the App
|
** Plugins to load before mounting the App
|
||||||
*/
|
*/
|
||||||
plugins: [{ src: '~/plugins/localStorage.js', ssr: false }],
|
plugins: [
|
||||||
|
{ src: '~/plugins/localStorage.js', ssr: false },
|
||||||
|
{ src: '~/plugins/moment' }
|
||||||
|
],
|
||||||
/*
|
/*
|
||||||
** Nuxt.js dev-modules
|
** Nuxt.js dev-modules
|
||||||
*/
|
*/
|
||||||
@@ -58,6 +62,68 @@ export default {
|
|||||||
domain: process.env.DOMAIN, // your shopify domain
|
domain: process.env.DOMAIN, // your shopify domain
|
||||||
storefrontAccessToken: process.env.STOREFRONT_ACCESS_TOKEN// your shopify storefront access token
|
storefrontAccessToken: process.env.STOREFRONT_ACCESS_TOKEN// your shopify storefront access token
|
||||||
},
|
},
|
||||||
|
generate: {
|
||||||
|
routes () {
|
||||||
|
return axios({
|
||||||
|
url: process.env.API_URL,
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'X-Shopify-Storefront-Access-Token': process.env.STOREFRONT_ACCESS_TOKEN,
|
||||||
|
Accept: 'application/json'
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
query: `query {
|
||||||
|
blogs (first: 250) {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
handle,
|
||||||
|
articles (first: 250) {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
handle
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
products (first: 250) {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
handle
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
collections (first: 250) {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
handle
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}`
|
||||||
|
}
|
||||||
|
}).then((response) => {
|
||||||
|
const res = []
|
||||||
|
const blogRoutes = response.data.data.blogs.edges
|
||||||
|
const productRoutes = response.data.data.products.edges
|
||||||
|
const CollectionRoutes = response.data.data.collections.edges
|
||||||
|
blogRoutes.forEach((blog) => {
|
||||||
|
res.push('/blog/' + blog.node.handle)
|
||||||
|
blog.node.articles.edges.forEach((article) => {
|
||||||
|
res.push('/blog/' + blog.node.handle + '/article/' + article.node.handle)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
productRoutes.forEach((product) => {
|
||||||
|
res.push('/products/' + product.node.handle)
|
||||||
|
})
|
||||||
|
CollectionRoutes.forEach((collection) => {
|
||||||
|
res.push('/collection/' + collection.node.handle)
|
||||||
|
})
|
||||||
|
return res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
/*
|
/*
|
||||||
** Build configuration
|
** Build configuration
|
||||||
*/
|
*/
|
||||||
|
|||||||
Generated
+5272
-3999
File diff suppressed because it is too large
Load Diff
+11
-10
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "my-sockets",
|
"name": "shopify-storefront",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "My premium Nuxt.js project",
|
"description": "My premium Nuxt.js project",
|
||||||
"author": "thomas",
|
"author": "thomas",
|
||||||
@@ -12,20 +12,21 @@
|
|||||||
"lint": "eslint --ext .js,.vue --ignore-path .gitignore ."
|
"lint": "eslint --ext .js,.vue --ignore-path .gitignore ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxtjs/axios": "^5.9.5",
|
"@nuxtjs/axios": "^5.13.1",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"node-sass": "^4.13.1",
|
"moment": "^2.29.1",
|
||||||
"nuxt": "^2.11.0",
|
"node-sass": "^5.0.0",
|
||||||
"nuxt-buefy": "^0.3.23",
|
"nuxt": "^2.15.4",
|
||||||
"nuxt-shopify": "^1.8.0",
|
"nuxt-buefy": "^0.3.31",
|
||||||
"sass-loader": "^8.0.2",
|
"nuxt-shopify": "^1.10.7",
|
||||||
"vuex-persistedstate": "^2.7.1"
|
"sass-loader": "^10.1.1",
|
||||||
|
"vuex-persistedstate": "^3.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nuxtjs/eslint-config": "^2.0.2",
|
"@nuxtjs/eslint-config": "^2.0.2",
|
||||||
"@nuxtjs/eslint-module": "^1.0.0",
|
"@nuxtjs/eslint-module": "^3.0.1",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
||||||
"eslint-plugin-nuxt": ">=0.5.1"
|
"eslint-plugin-nuxt": ">=2.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+45
-41
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="container">
|
||||||
<div v-if="checkout.lineItems.length === 0">
|
<div v-if="checkout.lineItems.length === 0">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h1 class="is-size-1">
|
<h1 class="is-size-1">
|
||||||
@@ -11,51 +11,55 @@
|
|||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<h1 class="is-size-1">
|
<h1 class="is-size-1">
|
||||||
Panier
|
Cart
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<b-table :data="checkout.lineItems">
|
<div class="card">
|
||||||
<template slot-scope="props">
|
<div class="card-content">
|
||||||
<b-table-column field="image" label="Image">
|
<b-table :data="checkout.lineItems">
|
||||||
<figure class="image is-96x96">
|
<template slot-scope="props">
|
||||||
<img class="is-rounded" :src="props.row.variant.image.src" :alt="props.row.description">
|
<b-table-column field="image" label="Image">
|
||||||
</figure>
|
<figure class="image is-96x96">
|
||||||
</b-table-column>
|
<img class="is-rounded" :src="props.row.variant.image.src" :alt="props.row.description">
|
||||||
<b-table-column field="title" label="Title">
|
</figure>
|
||||||
<p class="title">
|
</b-table-column>
|
||||||
{{ props.row.title }}
|
<b-table-column field="title" label="Title">
|
||||||
</p>
|
<p class="title">
|
||||||
</b-table-column>
|
{{ props.row.title }}
|
||||||
<b-table-column field="price" label="Price">
|
</p>
|
||||||
{{ props.row.variant.price }}€
|
</b-table-column>
|
||||||
</b-table-column>
|
<b-table-column field="price" label="Price">
|
||||||
<b-table-column field="quantity" label="Quantity">
|
{{ props.row.variant.price }}€
|
||||||
{{ props.row.quantity }}
|
</b-table-column>
|
||||||
</b-table-column>
|
<b-table-column field="quantity" label="Quantity">
|
||||||
<b-table-column field="total" label="Total">
|
{{ props.row.quantity }}
|
||||||
{{ getItemTotal(props.row) }} €
|
</b-table-column>
|
||||||
</b-table-column>
|
<b-table-column field="total" label="Total">
|
||||||
<b-table-column field="delete" label="Delete">
|
{{ getItemTotal(props.row) }} €
|
||||||
<b-button
|
</b-table-column>
|
||||||
class="is-danger"
|
<b-table-column field="delete" label="Delete">
|
||||||
icon-left="delete"
|
<b-button
|
||||||
@click="deleteItem(props.row.id)"
|
class="is-danger"
|
||||||
>
|
icon-left="delete"
|
||||||
Delete
|
@click="deleteItem(props.row.id)"
|
||||||
</b-button>
|
>
|
||||||
</b-table-column>
|
Delete
|
||||||
</template>
|
</b-button>
|
||||||
</b-table>
|
</b-table-column>
|
||||||
<div class="columns">
|
</template>
|
||||||
<div class="column">
|
</b-table>
|
||||||
</div>
|
<div class="columns">
|
||||||
<div class="column is-2 is-pulled-right">
|
<div class="column">
|
||||||
<p class="subtitle">
|
</div>
|
||||||
Subtotal : {{ checkout.subtotalPrice }} €
|
<div class="column is-2 is-pulled-right">
|
||||||
</p>
|
<p class="subtitle">
|
||||||
|
Subtotal : {{ checkout.subtotalPrice }} €
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,29 +1,59 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div>
|
||||||
Article {{ params }}
|
<section class="hero is-info is-medium is-bold">
|
||||||
{{ article }}
|
<div
|
||||||
|
class="hero-body"
|
||||||
|
:style="{
|
||||||
|
backgroundImage: (article.image === null) ? '' : `url(${article.image.originalSrc})`,
|
||||||
|
backgroundPosition: 'center',
|
||||||
|
backgroundSize: 'cover'
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</section>
|
||||||
|
<section class="articles section">
|
||||||
|
<div class="container">
|
||||||
|
<div class="card article">
|
||||||
|
<div class="card-content">
|
||||||
|
<div class="media">
|
||||||
|
<div class="media-content has-text-centered">
|
||||||
|
<p class="title article-title">{{ article.title }}</p>
|
||||||
|
<div class="tags has-addons level-item">
|
||||||
|
<span class="tag is-rounded is-info">@{{ article.authorV2.name }}</span>
|
||||||
|
<span class="tag is-rounded">{{ $moment(article.publishedAt, $moment.ISO_8601).format('DD MMMM Y') }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content article-body">
|
||||||
|
<p v-html="article.contentHtml" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
|
layout: 'noContainer',
|
||||||
asyncData ({ app, params }) {
|
asyncData ({ app, params }) {
|
||||||
return app.$axios({
|
return app.$axios({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
query: `query {
|
query: `query {
|
||||||
blogByHandle (handle:"${params.handle}") {
|
blogByHandle (handle:"${params.handle}") {
|
||||||
title,
|
|
||||||
handle
|
|
||||||
articleByHandle (handle: "${params.articleHandle}") {
|
articleByHandle (handle: "${params.articleHandle}") {
|
||||||
title,
|
title,
|
||||||
|
publishedAt,
|
||||||
contentHtml
|
contentHtml
|
||||||
authorV2 {
|
authorV2 {
|
||||||
bio,
|
name
|
||||||
firstName,
|
|
||||||
lastName
|
|
||||||
},
|
},
|
||||||
|
seo {
|
||||||
|
title,
|
||||||
|
description
|
||||||
|
}
|
||||||
image (maxWidth: 2000) {
|
image (maxWidth: 2000) {
|
||||||
altText,
|
altText,
|
||||||
originalSrc
|
originalSrc
|
||||||
@@ -37,9 +67,41 @@ export default {
|
|||||||
article: response.data.data.blogByHandle.articleByHandle
|
article: response.data.data.blogByHandle.articleByHandle
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
head () {
|
||||||
|
return {
|
||||||
|
title: this.article.seo.title,
|
||||||
|
meta: [
|
||||||
|
{ hid: 'description', name: 'description', content: this.article.seo.description }
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.articles {
|
||||||
|
margin: -200px 0 5rem;
|
||||||
|
}
|
||||||
|
.articles .content p {
|
||||||
|
line-height: 1.9;
|
||||||
|
margin: 15px 0;
|
||||||
|
}
|
||||||
|
.media-content {
|
||||||
|
margin-top: 3rem;
|
||||||
|
}
|
||||||
|
.article {
|
||||||
|
margin-top: 6rem;
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 768px) {
|
||||||
|
.article-body {
|
||||||
|
margin: 0 6rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.article-body {
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
.hero-body {
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,57 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>{{ blog.title }}</h1>
|
<div class="columns">
|
||||||
<div class="columns is-multiline">
|
<div class="column">
|
||||||
<div
|
<h1>{{ blog.title }}</h1>
|
||||||
v-for="article in blog.articles.edges"
|
</div>
|
||||||
:key="article.node.id"
|
</div>
|
||||||
class="column is-full-mobile is-half-tablet is-one-third-desktop"
|
<div class="columns">
|
||||||
>
|
<div class="column">
|
||||||
<nuxt-link :to="`/blog/${blog.handle}/article/${article.node.handle}`">
|
<blog-card-list
|
||||||
<div class="card">
|
:blog="blog"
|
||||||
<div class="card-image">
|
/>
|
||||||
<figure v-if="article.node.image !== null">
|
|
||||||
<img
|
|
||||||
:src="article.node.image.originalSrc"
|
|
||||||
:alt="article.node.image.altText"
|
|
||||||
>
|
|
||||||
</figure>
|
|
||||||
<figure v-else class="is-flex">
|
|
||||||
<img
|
|
||||||
src="/img/no-image.jpg"
|
|
||||||
alt="image-not-found"
|
|
||||||
>
|
|
||||||
</figure>
|
|
||||||
</div>
|
|
||||||
<div class="card-content">
|
|
||||||
<p class="title is-4">
|
|
||||||
{{ article.node.title }}
|
|
||||||
</p>
|
|
||||||
<p class="subtitle is-6">{{ article.node.excerpt }}</p>
|
|
||||||
<div class="content">
|
|
||||||
<b-taglist class="is-marginless">
|
|
||||||
<b-tag
|
|
||||||
v-for="tag in article.node.tags"
|
|
||||||
:key="tag"
|
|
||||||
href="#"
|
|
||||||
type="is-primary"
|
|
||||||
>
|
|
||||||
#{{ tag }}
|
|
||||||
</b-tag>
|
|
||||||
</b-taglist>
|
|
||||||
<time datetime="2016-1-1">{{ article.node.publishedAt }}</time>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nuxt-link>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import BlogCardList from '../../../components/BlogCardList'
|
||||||
export default {
|
export default {
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
|
components: {
|
||||||
|
BlogCardList
|
||||||
|
},
|
||||||
asyncData ({ app, params }) {
|
asyncData ({ app, params }) {
|
||||||
return app.$axios({
|
return app.$axios({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -84,18 +54,14 @@ export default {
|
|||||||
blog: response.data.data.blogByHandle
|
blog: response.data.data.blogByHandle
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
head () {
|
||||||
|
return {
|
||||||
|
title: this.$store.state.shop.name + ' | ' + this.blog.title
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.subtitle {
|
|
||||||
height: 20px;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
figure.is-flex {
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,43 +1,43 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<section class="hero is-primary" style="margin-bottom: 2rem">
|
<section class="hero is-medium is-info" style="margin-bottom: 2rem">
|
||||||
<div
|
<div
|
||||||
class="hero-body"
|
class="hero-body"
|
||||||
:style="{
|
:style="{
|
||||||
backgroundImage: `url(${collection.image.src})`,
|
backgroundImage: (collection.image === null) ? '' : `url(${collection.image.src})`,
|
||||||
backgroundPosition: 'center',
|
backgroundPosition: 'center',
|
||||||
backgroundSize: 'cover'
|
backgroundSize: 'cover'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div class="container has-text-centered">
|
<div class="container has-text-centered">
|
||||||
<h1 class="title">
|
<h1 class="title is-shadow">
|
||||||
{{ collection.title }}
|
{{ collection.title }}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="columns">
|
<section class="articles section">
|
||||||
<div class="column">
|
<div class="card article">
|
||||||
<p
|
<div class="card-content">
|
||||||
class="subtitle"
|
<div class="content article-body">
|
||||||
v-html="collection.descriptionHtml"
|
<p v-html="collection.descriptionHtml" />
|
||||||
/>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<hr class="hr" />
|
<section class="section">
|
||||||
<div class="columns">
|
<div class="container">
|
||||||
<div class="column">
|
<div class="columns">
|
||||||
<h2 class="is-2">Products in this collection</h2>
|
<div class="column">
|
||||||
</div>
|
<h2 class="is-size-4">Products in this collection</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="columns">
|
</div>
|
||||||
<div class="column">
|
|
||||||
<product-card-list
|
<product-card-list
|
||||||
:products="collection.products"
|
:products="collection.products"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -60,4 +60,31 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.container {
|
||||||
|
margin-bottom: 2.5rem;
|
||||||
|
}
|
||||||
|
.articles {
|
||||||
|
margin: -200px 0 5rem;
|
||||||
|
}
|
||||||
|
.articles .content p {
|
||||||
|
line-height: 1.9;
|
||||||
|
margin: 15px 0;
|
||||||
|
}
|
||||||
|
.media-content {
|
||||||
|
margin-top: 3rem;
|
||||||
|
}
|
||||||
|
.article {
|
||||||
|
margin-top: 6rem;
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 768px) {
|
||||||
|
.article-body {
|
||||||
|
margin: 0 6rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.article-body {
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
.hero-body {
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+32
-41
@@ -1,41 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="full-width">
|
<div class="full-width">
|
||||||
<div class="container">
|
<section class="section">
|
||||||
<div class="columns">
|
<div class="container">
|
||||||
<div class="column">
|
<div class="columns">
|
||||||
<h1 class="is-size-2">My home page</h1>
|
<div class="column">
|
||||||
<p>ceci est la page d'acceuil, ce texte ne changera pas car c'est une boutique</p>
|
<h1 class="is-size-2">My home page</h1>
|
||||||
|
<p>This website is for developpement purpose, please don't try to buy something here.</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div
|
<div
|
||||||
v-for="collection in collections"
|
v-for="collection in collections"
|
||||||
:key="collection.id"
|
:key="collection.id"
|
||||||
class="columns"
|
class="columns collection-banner"
|
||||||
>
|
>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<section class="hero is-large is-primary">
|
<nuxt-link :to="`/collection/${collection.handle}`">
|
||||||
<div
|
<section class="hero is-large is-info">
|
||||||
class="hero-body"
|
<div
|
||||||
:style="{
|
class="hero-body"
|
||||||
backgroundImage: `url(${collection.image.src})`,
|
:style="{
|
||||||
backgroundPosition: 'center',
|
backgroundImage: (collection.image === null) ? '' : `url(${collection.image.src})`,
|
||||||
backgroundSize: 'cover'
|
backgroundPosition: 'center',
|
||||||
}"
|
backgroundSize: 'cover'
|
||||||
>
|
}"
|
||||||
<div class="container">
|
>
|
||||||
<h1 class="title">
|
<div class="container">
|
||||||
{{ collection.title }}
|
<h1 class="title is-shadow">
|
||||||
</h1>
|
{{ collection.title }}
|
||||||
<h2 class="subtitle">
|
</h1>
|
||||||
{{ collection.description }}
|
</div>
|
||||||
</h2>
|
|
||||||
<nuxt-link :to="`/collection/${collection.handle}`" class="button is-primary">
|
|
||||||
<span>See</span>
|
|
||||||
</nuxt-link>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</section>
|
</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,6 +41,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
layout: 'noContainer',
|
||||||
asyncData ({ app }) {
|
asyncData ({ app }) {
|
||||||
return app.$axios({
|
return app.$axios({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -50,16 +49,7 @@ export default {
|
|||||||
query: `query {
|
query: `query {
|
||||||
shop {
|
shop {
|
||||||
name,
|
name,
|
||||||
description,
|
description
|
||||||
privacyPolicy {
|
|
||||||
handle
|
|
||||||
},
|
|
||||||
termsOfService {
|
|
||||||
handle
|
|
||||||
},
|
|
||||||
refundPolicy {
|
|
||||||
handle
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
blogs(first: 10) {
|
blogs(first: 10) {
|
||||||
edges {
|
edges {
|
||||||
@@ -100,7 +90,7 @@ export default {
|
|||||||
},
|
},
|
||||||
head () {
|
head () {
|
||||||
return {
|
return {
|
||||||
title: 'Home Page',
|
title: this.shop.name,
|
||||||
meta: [
|
meta: [
|
||||||
{ hid: 'description', name: 'description', content: this.description }
|
{ hid: 'description', name: 'description', content: this.description }
|
||||||
]
|
]
|
||||||
@@ -110,7 +100,8 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.card-image {
|
.collection-banner {
|
||||||
height: 20rem;
|
margin-bottom: 2rem;
|
||||||
|
margin-top: 2rem !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="container">
|
|
||||||
<h1>Policy id</h1>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'Index'
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<policy-page
|
||||||
|
:policy="policy"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import PolicyPage from '../../../components/PolicyPage'
|
||||||
|
export default {
|
||||||
|
name: 'Index',
|
||||||
|
components: {
|
||||||
|
PolicyPage
|
||||||
|
},
|
||||||
|
asyncData ({ app }) {
|
||||||
|
return app.$axios({
|
||||||
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
query: `query {
|
||||||
|
shop {
|
||||||
|
privacyPolicy {
|
||||||
|
title,
|
||||||
|
body
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}`
|
||||||
|
}
|
||||||
|
}).then((response) => {
|
||||||
|
return {
|
||||||
|
policy: response.data.data.shop.privacyPolicy
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
head () {
|
||||||
|
return {
|
||||||
|
title: 'Privacy Policy'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<policy-page
|
||||||
|
:policy="policy"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import PolicyPage from '../../../components/PolicyPage'
|
||||||
|
export default {
|
||||||
|
name: 'Index',
|
||||||
|
components: {
|
||||||
|
PolicyPage
|
||||||
|
},
|
||||||
|
asyncData ({ app }) {
|
||||||
|
return app.$axios({
|
||||||
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
query: `query {
|
||||||
|
shop {
|
||||||
|
refundPolicy {
|
||||||
|
title,
|
||||||
|
body
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}`
|
||||||
|
}
|
||||||
|
}).then((response) => {
|
||||||
|
return {
|
||||||
|
policy: response.data.data.shop.refundPolicy
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
head () {
|
||||||
|
return {
|
||||||
|
title: 'Refund Policy'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
<template>
|
||||||
|
<div class="container">
|
||||||
|
<policy-page
|
||||||
|
:policy="policy"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import PolicyPage from '../../../components/PolicyPage'
|
||||||
|
export default {
|
||||||
|
name: 'Index',
|
||||||
|
components: {
|
||||||
|
PolicyPage
|
||||||
|
},
|
||||||
|
asyncData ({ app }) {
|
||||||
|
return app.$axios({
|
||||||
|
method: 'POST',
|
||||||
|
data: {
|
||||||
|
query: `query {
|
||||||
|
shop {
|
||||||
|
termsOfService {
|
||||||
|
title,
|
||||||
|
body
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}`
|
||||||
|
}
|
||||||
|
}).then((response) => {
|
||||||
|
return {
|
||||||
|
policy: response.data.data.shop.termsOfService
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
head () {
|
||||||
|
return {
|
||||||
|
title: 'Terms of services'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="columns">
|
<div class="columns is-flex">
|
||||||
<div class="column is-1">
|
<div class="column is-1">
|
||||||
<p>Quantity</p>
|
<p>Quantity</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -94,6 +94,14 @@ export default {
|
|||||||
product: {},
|
product: {},
|
||||||
quantity: 1
|
quantity: 1
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
head () {
|
||||||
|
return {
|
||||||
|
title: this.$store.state.shop.name + ' | ' + this.product.title,
|
||||||
|
meta: [
|
||||||
|
{ hid: 'description', name: 'description', content: this.product.description }
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -105,4 +113,7 @@ export default {
|
|||||||
.al img {
|
.al img {
|
||||||
filter: grayscale(100%);
|
filter: grayscale(100%);
|
||||||
}
|
}
|
||||||
|
.columns.is-flex {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -26,6 +26,11 @@ export default {
|
|||||||
products () {
|
products () {
|
||||||
return this.$store.state.products
|
return this.$store.state.products
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
head () {
|
||||||
|
return {
|
||||||
|
title: this.$store.state.shop.name + ' | ' + 'Products'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
|
moment.locale('fr')
|
||||||
|
Vue.use(moment)
|
||||||
|
|
||||||
|
export default ({ app }, inject) => {
|
||||||
|
app.$moment = moment
|
||||||
|
inject('moment', moment)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user