feat(prateleira/description): Adiciona a prateleira de produto e seu css, altera imagem da descrição

This commit is contained in:
amanda almeida 2023-01-29 19:32:07 -03:00
parent dae5d86043
commit a22ddfe487
13 changed files with 302 additions and 69 deletions

View File

@ -24,6 +24,16 @@
height: 49px;
}
[class*="html--prateleira"] {
padding: 16px 40px 64px;
}
[class*="html--price"] {
display: flex;
flex-direction: column;
margin-bottom: 32px;
}
@media screen and (max-width: 1024px) {
[class*="html--product-main"] {
flex-direction: column;

View File

@ -1,7 +1,11 @@
{
"image#image1": {
"product-images#description": {
"props": {
"src": "https://agenciamagma.vtexassets.com/arquivos/ids/164491-1200-auto?v=637781133812700000&width=1200&height=auto&aspect=true"
"showNavigationArrows": false,
"showPaginationDots": false,
"thumbnailVisibility": "hidden",
"contentType": "images",
"blockClass": "description"
}
},
@ -71,31 +75,31 @@
]
},
"tab-content.item#description1": {
"children": ["image#image1", "product-description"],
"children": ["product-images#description", "product-description"],
"props": {
"tabId": "description1"
}
},
"tab-content.item#description2": {
"children": ["image#image1", "product-description"],
"children": ["product-images#description", "product-description"],
"props": {
"tabId": "description2"
}
},
"tab-content.item#description3": {
"children": ["image#image1", "product-description"],
"children": ["product-images#description", "product-description"],
"props": {
"tabId": "description3"
}
},
"tab-content.item#description4": {
"children": ["image#image1", "product-description"],
"children": ["product-images#description", "product-description"],
"props": {
"tabId": "description4"
}
},
"tab-content.item#description5": {
"children": ["image#image1", "product-description"],
"children": ["product-images#description", "product-description"],
"props": {
"tabId": "description5"
}

View File

@ -4,7 +4,7 @@
"html#breadcrumb",
"condition-layout.product#availability",
"tab-layout#description",
"shelf.relatedProducts",
"html#list-context.product-list#prateleira",
"product-questions-and-answers"
]
},
@ -191,5 +191,73 @@
"blockClass": "message-availability"
},
"children": ["availability-subscriber"]
},
"rich-text#prateleira": {
"props": {
"text": "Você também pode gostar:",
"blockClass": "title-prateleira"
}
},
"html#product-summary.shelf": {
"props": {
"testId": "vtex-product-summary",
"blockClass": "produto-prateleira"
},
"children": ["product-summary-image", "product-summary-name", "html#price"]
},
"html#price": {
"props": {
"blockClass": "price"
},
"children": [
"product-list-price#prateleira",
"product-selling-price#prateleira"
]
},
"product-list-price#prateleira": {
"props": {
"blockClass": "prateleira",
"message": "de {listPriceValue} por "
}
},
"product-selling-price#prateleira": {
"props": {
"blockClass": "prateleira"
}
},
"product-summary.shelf#slider": {
"props": {
"blockClass": "produto-prateleira"
},
"children": ["html#product-summary.shelf"]
},
"list-context.product-list#prateleira": {
"blocks": ["product-summary.shelf#slider"],
"children": ["slider-layout#prateleira"]
},
"html#list-context.product-list#prateleira": {
"props": {
"testId": "product-summary-list",
"blockClass": "prateleira"
},
"children": ["rich-text#prateleira", "list-context.product-list#prateleira"]
},
"slider-layout#prateleira": {
"props": {
"itemsPerPage": {
"desktop": 4,
"tablet": 3,
"phone": 2
},
"infinite": true,
"blockClass": "prateleira"
}
}
}

View File

@ -97,4 +97,20 @@
vertical-align: baseline;
color: #ffffff;
padding: 0.25rem 0.5rem 0.25rem 0.5rem;
}
.listPrice--prateleira {
font-size: 14px;
line-height: 19px;
text-align: center;
text-decoration-line: line-through;
color: #BABABA;
}
.sellingPrice--prateleira {
font-weight: 700;
font-size: 24px;
line-height: 33px;
text-align: center;
color: #000000;
}

View File

@ -1,42 +1,43 @@
.skuSelectorContainer--quickview .skuSelectorItemImage .frameAround, .skuSelectorContainer--quickview .skuSelectorItemImage .skuSelectorInternalBox {
border-radius: 50%;
/*
0 - 600PX: Phone
600 - 900px: Table portrait
900 - 1200px: Tablet landscape
[1200 - 1800] is where our nortal styles apply
1800px + : Big desktop
*/
/* Media Query M3 */
/* Grid breakpoints */
.container--produto-prateleira {
margin: 0;
}
.container :global(.vtex-modal-layout-0-x-triggerContainer) {
opacity: 0;
transition: opacity 200ms ease-in-out;
.container--produto-prateleira :global(.vtex-store-components-3-x-discountContainer) {
width: 100%;
}
.container:hover :global(.vtex-modal-layout-0-x-triggerContainer) {
opacity: 1;
.container--produto-prateleira :global(.vtex-store-components-3-x-discountInsideContainer) {
display: none;
}
@media screen and (max-width: 40em) {
.container :global(.vtex-modal-layout-0-x-triggerContainer) {
display: none;
}
.container--produto-prateleira .imageContainer {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
max-width: 314px;
height: 314.4px;
background: #EDEDED;
}
.nameContainer {
justify-content: start;
padding-top: 1rem;
padding-bottom: 1rem;
.container--produto-prateleira .nameContainer {
padding: 16px 0 8px;
}
.brandName {
font-weight: 600;
.container--produto-prateleira .nameContainer .productNameContainer {
max-width: 282.4px;
height: 50px;
}
.container--produto-prateleira .nameContainer .productBrand {
font-size: 18px;
color: #2E2E2E;
}
.container {
text-align: start;
}
.imageContainer {
line-height: 25px;
text-align: center;
color: #000000;
}
.image {
border-radius: 0.25rem;
}
.container--produto-prateleira .priceContainer {
padding: 0 0 32px;
}

View File

@ -6,4 +6,14 @@
1800px + : Big desktop
*/
/* Media Query M3 */
/* Grid breakpoints */
/* Grid breakpoints */
.container--title-prateleira {
display: flex;
justify-content: center;
}
.container--title-prateleira .paragraph--title-prateleira {
font-size: 24px;
line-height: 38px;
margin: 0 0 32px;
color: #575757;
}

View File

@ -1,31 +1,44 @@
.sliderLayoutContainer {
/*
0 - 600PX: Phone
600 - 900px: Table portrait
900 - 1200px: Tablet landscape
[1200 - 1800] is where our nortal styles apply
1800px + : Big desktop
*/
/* Media Query M3 */
/* Grid breakpoints */
.sliderLayoutContainer--prateleira {
background-color: transparent;
justify-content: center;
}
.sliderLayoutContainer--carousel {
background-color: #F0F0F0;
min-height: 450px;
.sliderLayoutContainer--prateleira .sliderTrackContainer--prateleira {
width: 95.96%;
}
.sliderTrackContainer {
max-width: 100%;
.sliderLayoutContainer--prateleira .slide--prateleira {
margin: 0 16px 0 0;
}
.paginationDotsContainer {
margin-top: .5rem;
margin-bottom: .5rem;
.sliderLayoutContainer--prateleira .sliderArrows--prateleira {
padding: 0;
margin: 0;
}
.layoutContainer--shelf {
margin-top: 20px;
margin-bottom: 20px;
max-width: 96rem;
min-height: 550px;
.sliderLayoutContainer--prateleira .sliderLeftArrow--prateleira {
left: -12px;
}
.slide--shelf {
margin-bottom: 25px;
padding-left: .5rem;
padding-right: .5rem;
min-height: 550px;
.sliderLayoutContainer--prateleira .sliderRightArrow--prateleira {
right: -12px;
}
.sliderLayoutContainer--prateleira .paginationDotsContainer {
align-items: center;
}
.sliderLayoutContainer--prateleira .paginationDot--prateleira {
width: 10px;
height: 10px;
margin: 0 6px;
background: #000000;
}
.sliderLayoutContainer--prateleira .paginationDot--prateleira--isActive {
width: 17px !important;
height: 17px !important;
background-color: white;
border: 0.5px solid #000000;
}

View File

@ -292,7 +292,7 @@
display: none;
}
.imageElement {
.productImagesContainer--description {
width: 50%;
max-height: 632px;
}

View File

@ -90,3 +90,19 @@
color: #ffffff;
padding: 0.25rem 0.5rem 0.25rem 0.5rem;
}
.listPrice--prateleira {
font-size: 14px;
line-height: 19px;
text-align: center;
text-decoration-line: line-through;
color: #BABABA;
}
.sellingPrice--prateleira {
font-weight: 700;
font-size: 24px;
line-height: 33px;
text-align: center;
color: #000000;
}

View File

@ -0,0 +1,41 @@
.container--produto-prateleira {
margin: 0;
:global(.vtex-store-components-3-x-discountContainer) {
width: 100%;
}
:global(.vtex-store-components-3-x-discountInsideContainer) {
display: none;
}
.imageContainer {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
max-width: 314px;
height: 314.4px;
background: #EDEDED;
}
.nameContainer {
padding: 16px 0 8px;
.productNameContainer {
max-width: 282.4px;
height: 50px;
}
.productBrand {
font-size: 18px;
line-height: 25px;
text-align: center;
color: #000000;
}
}
.priceContainer {
padding: 0 0 32px;
}
}

View File

@ -0,0 +1,11 @@
.container--title-prateleira {
display: flex;
justify-content: center;
.paragraph--title-prateleira {
font-size: 24px;
line-height: 38px;
margin: 0 0 32px;
color: #575757;
}
}

View File

@ -0,0 +1,43 @@
.sliderLayoutContainer--prateleira {
background-color: transparent;
justify-content: center;
.sliderTrackContainer--prateleira {
width: 95.96%;
}
.slide--prateleira {
margin: 0 16px 0 0;
}
.sliderArrows--prateleira {
padding: 0;
margin: 0;
}
.sliderLeftArrow--prateleira {
left: -12px;
}
.sliderRightArrow--prateleira {
right: -12px;
}
.paginationDotsContainer {
align-items: center;
}
.paginationDot--prateleira {
width: 10px;
height: 10px;
margin: 0 6px;
background: #000000;
}
.paginationDot--prateleira--isActive {
width: 17px !important;
height: 17px !important;
background-color: white;
border: 0.5px solid #000000;
}
}

View File

@ -330,7 +330,7 @@
}
}
.imageElement {
.productImagesContainer--description {
width: 50%;
max-height: 632px;
}