Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VTEX practice #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@
"vtex.iframe": "0.x",
"vtex.breadcrumb": "1.x",
"vtex.sticky-layout": "0.x",
"vtex.add-to-cart-button": "0.x"
"vtex.add-to-cart-button": "0.x",
"vtex.condition-layout": "1.x",
"vtex.store-link": "0.x",
"vtex.modal-layout": "0.x",
"vtex.product-price": "1.x"
},
"$schema": "https://raw.githubusercontent.com/vtex/node-vtex-api/master/gen/manifest.schema"
}
32 changes: 32 additions & 0 deletions store/blocks/about-us.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

{
"store.custom#about-us":{
"blocks":["flex-layout.row#about-us"]
},
"flex-layout.row#about-us":{
"children":["image#about-us","flex-layout.col#text-about-us"]
},
"flex-layout.col#text-about-us":{
"children":["rich-text#about-title","rich-text#about-content"],
"props":{
"preventVerticalStretch": true
}
},
"rich-text#about-title":{
"props":{
"text": "# About Minimum Theme"
}

},
"rich-text#about-content":{
"props":{
"text": "### This is the *VTEX Minimum Theme* \n you can use it to test blocks usage and build your first store from scratch."
}
},
"image#about-us":{
"props":{
"src": "https://appliancetheme.vteximg.com.br/arquivos/cozinha-about-us.png",
"maxHeight":"600px"
}
}
}
192 changes: 190 additions & 2 deletions store/blocks/home.jsonc
Original file line number Diff line number Diff line change
@@ -1,15 +1,203 @@
{
"store.home": {
"blocks": [
"rich-text"
"rich-text",
"info-card#button-right",
"info-card#button-left",
"flex-layout.row",
"slider-layout#home",
"responsive-layout.desktop#desktop",
"responsive-layout.mobile#mobile",
"tab-layout#home",
"modal-trigger#first"
]
},
"rich-text": {
"props": {
"text": "VTEX Store Framework",
"text": "Hello World!",
"textAlignment": "CENTER",
"textPosition": "CENTER",
"font": "t-heading-1"
}
},
"info-card#button-right":{
"props":{
"isFullModeStyle": false,
"textPosition": "right",
"imageUrl": "https://appliancetheme.vteximg.com.br/arquivos/cozinha-rosa-min.png",
"headline": "Vintage Pink",
"subhead": "Give your kitchen a boho style adding vintage apparels.<br>Available until January 2020.",
"callToActionMode": "button",
"callToActionText": "Explore",
"callToActionUrl": "/sale/d",
"textAlignment": "center"
}
},
"info-card#button-left":{
"props":{
"isFullModeStyle": false,
"textPosition": "left",
"imageUrl": "https://appliancetheme.vteximg.com.br/arquivos/cozinha-cinza-min.png",
"headline": "Shining chrome",
"subhead": "Give your kitchen a cool style adding warm metallic finishes.<br>Available until January 2020.",
"callToActionMode": "link",
"callToActionText": "Go to Collection",
"callToActionUrl": "/sale/d",
"textAlignment": "center"
}
},
"flex-layout.row":{
"children": [
"info-card#rethink",
"rich-text#deletar"
]
},

"info-card#rethink": {
"props": {
"imageUrl": "https://appliancetheme.vteximg.com.br/arquivos/utensilios-cozinha-min.png",
"isFullModeStyle": true,
"headline": "Time to rethink your kitchen",
"callToActionText": "Discover",
"textPosition": "center"
}
},

"rich-text#deletar": {
"props": {
"text": "I'll be deleted soon"
}
},

"slider-layout#home": {
"children": ["image#brand1","image#brand2","image#brand3","image#brand4","image#brand5","image#brand6"],
"props": {
"autoplay": {
"timeout": 5000,
"stopOnHover": false
}
}
},

"image#brand1":{
"props":{
"src":"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square1.png",
"maxHeight":24
}
},
"image#brand2":{
"props":{
"src":"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square2.png",
"maxHeight":24
}
},
"image#brand3":{
"props":{
"src":"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square3.png",
"maxHeight":24
}
},
"image#brand4":{
"props":{
"src":"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square4.png",
"maxHeight":24
}
},
"image#brand5":{
"props":{
"src":"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square5.png",
"maxHeight":24
}
},
"image#brand6":{
"props":{
"src":"https://appliancetheme.vteximg.com.br/arquivos/flatflat-brand-logo-square6.png",
"maxHeight":24
}
},
"responsive-layout.desktop#desktop":{
"children": ["rich-text#desktop"]
},
"responsive-layout.mobile#mobile":{
"children":["rich-text#mobile"]
},

"rich-text#desktop": {
"props": {
"text": "# Your Coffee, Your Way \n ### New Coffee Makers Collection (I'm on desktop)",
"textPosition": "CENTER",
"textAlignment": "CENTER"
}
},

"rich-text#mobile": {
"props": {
"text": "# Your Coffee, Your Way \n ### New Coffee Makers Collection (I'm on mobile)",
"textPosition": "CENTER",
"textAlignment": "CENTER"
}
},
"tab-layout#home":{
"children":["tab-list#home","tab-content#home"]
},
"tab-list#home":{
"children":["tab-list.item#home1","tab-list.item#home2"]
},
"tab-list.item#home1":{
"props":{
"tabId": "majorAppliances",
"defaultActiveTab":true,
"label": "Major Appliances"
}
},
"tab-list.item#home2":{
"props":{
"tabId": "electronics",
"label": "Electronics"
}
},
"tab-content#home":{
"children":["tab-content.item#home1","tab-content.item#home2"]
},
"tab-content.item#home1":{
"children":["rich-text#home1"],
"props":{
"tabId": "majorAppliances"
}
},
"rich-text#home1":{
"props":{
"text": "The tab selected is Major Appliances",
"textPosition":"CENTER",
"font":"t-heading-3"
}
},
"tab-content.item#home2":{
"children":["rich-text#home2"],
"props":{
"tabId":"electronics"
}
},
"rich-text#home2":{
"props":{
"text":"The tab selected is Electronics",
"textPosition":"CENTER",
"font":"t-heading-3"
}

},
"modal-trigger#first":{
"children":["rich-text#trigger","modal-layout#first"]
},
"rich-text#trigger":{
"props":{
"text": "Click me"
}
},
"modal-layout#first":{
"props":{
"text":"Hello"
}
}

}
65 changes: 63 additions & 2 deletions store/blocks/product.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,68 @@
{
"store.product": {
"children": [

"breadcrumb",
"flex-layout.row#main"
]
},
"flex-layout.row#main":{
"props": {
"marginTop": 6
},
"children":[
"flex-layout.col#left",
"flex-layout.col#right"
]
},
"flex-layout.col#left":{
"children":[
"product-images"
]
},
"product-images":{
"props":{
"displayThumbnailsArrows": true
}
},
"flex-layout.col#right":{
"props": {
"preventVerticalStretch": true,
"verticalAlign": "middle"
},
"children":[
"product-name",
"product-identifier.product",
"product-price",
"flex-layout.row#qty-sku",
"shipping-simulator",
"buy-button"
]
},
"product-name":{
"props":{
"showSku":true,
"showBrandName":true
}
},
"product-price":{
"props":{
"showSavings":true,
"showListPrice": true

}
},
"flex-layout.row#qty-sku":{
"children":[
"sku-selector",
"product-quantity"
]

},
"buy-button": {
"props": {
"isOneClickBuy": true,
"showTooltipOnSkuNotSelected": false
}
}
}

}
26 changes: 26 additions & 0 deletions store/blocks/search-landing.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"store.custom#landing":{
"blocks":[
"image#landingbanner",
"search-result-layout.customQuery"
]
},
"image#landingbanner":{
"props":{
"src":"https://storecomponents.vteximg.com.br/arquivos/box.png",
"minWidth": "100%"
}
},
"search-result-layout.customQuery":{
"props":{
"querySchema":{
"orderByField": "OrderByReleaseDateDESC",
"hideUnavailableItems":true,
"maxItemsPerPage": 8,
"queryField": "Blue Top Retro Camera",
"mapField": "ft"
}
},
"blocks":["search-result-layout.desktop"]
}
}
19 changes: 18 additions & 1 deletion store/blocks/search.jsonc
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
{
"store.search": {
"blocks": ["search-result-layout"]
},
"search-result-layout": {
"blocks": [

"search-result-layout.desktop",
"search-result-layout.mobile",
"search-not-found-layout"
]
},
"search-result-layout.desktop":{
"children":[
"breadcrumb.search",
"search-title.v2",
"total-products.v2",
"order-by.v2",
"search-fetch-previous",
"search-content",
"filter-navigator.v3",
"search-fetch-more"
]
}
}
8 changes: 8 additions & 0 deletions store/routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"store.custom#about-us":{
"path": "/about-us"
},
"store.custom#landing":{
"path":"/landing"
}
}
4 changes: 4 additions & 0 deletions styles/css/vtex.rich-text.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.paragraph{
font-weight: 600;
font-style: italic;
}