Skip to content

Commit

Permalink
Merge pull request #5645 from vuestorefront/docs-next
Browse files Browse the repository at this point in the history
docs-next to next
  • Loading branch information
filrak committed Mar 10, 2021
2 parents 8a75e90 + 6c1207f commit fad19fd
Show file tree
Hide file tree
Showing 28 changed files with 2,212 additions and 240 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ export default {
props,
components: {
CommerceIntegrationLink
},
mounted () {
for (let integration of Object.keys(props)) {
if (this[integration] === WIP) {
console.warn(`${integration} integration is being developed`)
}
}
}
}
</script>
69 changes: 69 additions & 0 deletions packages/core/docs/.vuepress/components/IntegrationList.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<template>
<div>
<multiselect v-if="filterable" v-model="selected" deselect-label="Can't remove this value" track-by="name" label="name" placeholder="Select your eCommerce platform" :options="options" :searchable="false" :allow-empty="false">
<template slot="singleLabel" slot-scope="{ option }"> {{ option.name }}</template>
</multiselect>
<div class="list">
<slot />
</div>
</div>
</template>

<script>
import Multiselect from 'vue-multiselect'
export default {
props: ['filterable'],
components: {
Multiselect
},
watch: {
selected: function (val, oldVal) {
this.filter()
}
},
methods: {
filter () {
this.$children
.filter(component => component.$options._componentTag === 'IntegrationTile')
.forEach(integration => {
if (this.selected.value === 'all') {
integration.isVisible = true;
return;
}
// empty list means compatibility with everything
if (integration.compatibility.length === 0) {
integration.isVisible = true;
return;
}
const isCompatible = integration.compatibility.some(platform => platform === this.selected.value)
integration.isVisible = isCompatible
})
}
},
data () {
return {
selected: null,
options: [
{ name: 'Show all integrations', value: 'all' },
{ name: 'Commercetools', value: 'commercetools' }
]
}
}
}
</script>

<style src="vue-multiselect/dist/vue-multiselect.min.css"></style>

<style scoped>
.list {
display: flex;
justify-content: space-between;
align-content: space-evenly;
flex-wrap: wrap;
}
.multiselect {
margin-bottom: 20px;
}
</style>
91 changes: 91 additions & 0 deletions packages/core/docs/.vuepress/components/IntegrationTile.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<template>
<component :is="link ? 'a' : 'div'" class="tile" v-show="isVisible" :class="{ wip: isWip }" :href="link">
<div class="image">
<img :src="image" />
<span class="badge info" v-if="isEnterprise">Enterprise</span>
<span class="badge wip" v-if="isWip">Work in prorgess</span>
<span class="badge beta" v-if="isBeta">Beta</span>
</div>
</component>
</template>

<script>
export default {
name: 'IntegrationTile',
props: [
'name',
'link',
'category',
'image',
'isWip',
'isBeta',
'isEnterprise',
'compatibility'
],
data () {
return {
isVisible: true
}
}
}
</script>


<style scoped>
.tile {
display: inline-flex;
width: 230px;
height: 230px;
flex-direction: row;
position: relative;
margin: 10px 0;
}
.tile.wip img {
opacity: 0.5
}
.image {
width: 230px;
height: 230px;
justify-content: center;
display: flex;
align-items: center;
box-shadow: 0 0 23px -16px rgba(0,0,0,0.6);
padding: 20px;
box-sizing: border-box;
position: absolute;
}
.image:hover {
box-shadow: 0 0 23px -16px rgba(0,0,0,1);
transition: 0.3s box-shadow;
}
.badge {
position: absolute;
font-size: 14px;
height: 18px;
line-height: 18px;
border-radius: 3px;
padding: 0 6px;
color: #fff;
top: 8px;
left:8px;
}
.badge.beta {
background: orange;
}
.badge.wip {
background: darkgray;
}
@media (max-width: 719px) {
.tile {
width: 50%;
height: 150px;
}
.image {
width: 150px;
height: 150px;
}
}
</style>
50 changes: 20 additions & 30 deletions packages/core/docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
nav: [
{ text: 'Home', link: '/' },
{ text: 'Demo', link: 'https://vsf-next-demo.storefrontcloud.io' },
{ text: 'Integrations', link: '/integrations/' },
{ text: 'Migration guide', link: '/migrate/' },
{ text: 'Roadmap', link: 'https://www.notion.so/vuestorefront/Vue-Storefront-2-Next-High-level-Roadmap-201cf06abb314b84ad01b7b8463c0437'}
],
Expand Down Expand Up @@ -58,23 +59,30 @@ module.exports = {
title: 'Composables',
collapsable: false,
children: [
['/commercetools/use-product', 'useProduct'],
['/commercetools/use-review', 'useReview '],
['/commercetools/use-user', 'useUser'],
['/commercetools/use-user-shipping', 'useUserShipping'],
['/commercetools/use-user-billing', 'useUserBilling'],
['/commercetools/use-user-order', 'useUserOrder'],
['/commercetools/use-facet', 'useFacet'],
['/commercetools/use-cart', 'useCart'],
['/commercetools/use-wishlist', 'useWishlist'],
['/commercetools/use-category', 'useCategory']
['/commercetools/composables/use-product', 'useProduct'],
['/commercetools/composables/use-review', 'useReview '],
['/commercetools/composables/use-user', 'useUser'],
['/commercetools/composables/use-user-shipping', 'useUserShipping'],
['/commercetools/composables/use-user-billing', 'useUserBilling'],
['/commercetools/composables/use-user-order', 'useUserOrder'],
['/commercetools/composables/use-facet', 'useFacet'],
['/commercetools/composables/use-cart', 'useCart'],
['/commercetools/composables/use-wishlist', 'useWishlist'],
['/commercetools/composables/use-category', 'useCategory']
]
},
{
title: 'API Client',
collapsable: false,
children: [
['/commercetools/api-client-reference', 'Methods reference']
]
},
{
title: 'Extensions',
collapsable: false,
children: [
['/commercetools/user-groups', 'User groups']
['/commercetools/extensions/user-groups', 'User groups']
]
},
{
Expand All @@ -83,13 +91,6 @@ module.exports = {
children: [
['/commercetools/auth-middleware', 'Auth Middleware']
],
},
{
title: 'API Client Reference',
collapsable: true,
children: [
['/commercetools/api-client-reference', 'API Client Reference']
]
}
],
'/aboutyou/': [
Expand Down Expand Up @@ -180,22 +181,11 @@ module.exports = {
['/advanced/architecture', 'Architecture']
]
},
{
title: 'eCommerce platforms',
collapsable: false,
children: [
['/commercetools/', 'Commercetools'],
['/shopify/', 'Shopify'],
['/aboutyou/', 'About you'],
['https://shopware-pwa-docs.netlify.com/#introduction-to-shopware-pwa', 'Shopware'],
['https://github.com/DivanteLtd/vue-storefront', 'Magento']
]
},
{
title: 'Build integration',
collapsable: true,
children: [
['/integrate/integration-guide', 'Integration guide'],
['/integrate/integration-guide', 'eCommerce'],
['/integrate/cms', 'CMS'],
['/integrate/cache-driver', 'Cache driver']
]
Expand Down
18 changes: 17 additions & 1 deletion packages/core/docs/.vuepress/styles/index.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@

.site-name {
display: none !important;
}

.badge {
margin-top: 4px;
}
background-color: #22c34b;
}

.badge.info {
background-color: #22c34b !important;
}

.multiselect__tag {
background: #22c34b !important;
}

.custom-block.tip {
border-color: #22c34b;
background-color: #f0f7f2;
}

1 change: 1 addition & 0 deletions packages/core/docs/.vuepress/styles/palette.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$accentColor = #22c34b;
2 changes: 1 addition & 1 deletion packages/core/docs/advanced/internationalization.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

If you're building a shop for an international brand you want it to be translated to different languages and using different currencies. In this document, you will learn how we're approaching internationalization in Vue Storefront and how to configure your application to use it.

::: tip i18n is not multi-tenancy!
::: warning i18n is not multi-tenancy!
This document explains only how to make a single shop instance available for multiple countries. If you need to build a system for multiple tenants we suggest creating an instance of Vue Storefront for each tenant and sharing common resources through an NPM package.
:::

Expand Down

0 comments on commit fad19fd

Please sign in to comment.