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

Update boilerplate store-theme newsletter component #244

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Store GraphQL is a middleware to access all VTEX APIs.
- [Search Result](https://github.com/vtex-apps/search-result/blob/master/docs/README.md)
- [Product Details](https://github.com/vtex-apps/product-details/blob/master/docs/README.md)
- [Store Components](https://github.com/vtex-apps/store-components/blob/master/docs/README.md)
- [Order Placed](https://github.com/vtex-apps/order-placed/blob/master/docs/README.md)
- [Order Placed](https://github.com/vtex-apps/order-placed/blob/master/docs/README.md)

### Store Pixel Apps

Expand Down
5 changes: 4 additions & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@
"vtex.store-form": "0.x",
"vtex.product-highlights": "2.x",
"vtex.product-specifications": "1.x",
"vtex.tab-layout": "0.x"
"vtex.tab-layout": "0.x",
"vtex.condition-layout": "2.x",
"vtex.css-handles": "1.x",
"vtex.store-newsletter": "1.x"
},
"peerDependencies": {
"vtex.reviews-and-ratings": "2.x"
Expand Down
10 changes: 9 additions & 1 deletion store/blocks/home/home.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"info-card#home",
"rich-text#question",
"rich-text#link",
"newsletter"
"newsletter-form"
]
},

Expand Down Expand Up @@ -99,5 +99,13 @@
"text": "\n**Reach us at**\nwww.vtex.com.br",
"blockClass": "link"
}
},

"newsletter-form": {
"children": [
"newsletter-input-name",
"newsletter-input-email",
"newsletter-submit"
]
}
}
44 changes: 43 additions & 1 deletion store/blocks/pdp/product.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"store.product": {
"children": [
"flex-layout.row#product-breadcrumb",
"flex-layout.row#product-main",
"condition-layout.product#availability",
"flex-layout.row#description",
"flex-layout.row#specifications-title",
"product-specification-group#table",
Expand Down Expand Up @@ -33,6 +33,17 @@
},
"children": ["product-description"]
},
"condition-layout.product#availability": {
"props": {
"conditions": [
{
"subject": "isProductAvailability"
}
],
"Then": "flex-layout.row#product-main",
"Else": "flex-layout.row#product-availability"
}
},
"flex-layout.row#product-main": {
"props": {
"colGap": 7,
Expand Down Expand Up @@ -130,6 +141,37 @@
"children": ["add-to-cart-button"]
},

"flex-layout.row#product-availability": {
"props": {
"colGap": 7,
"marginTop": 4,
"marginBottom": 7,
"paddingTop": 7
},
"children": ["flex-layout.col#stack", "flex-layout.col#right-col-availability"]
},
"flex-layout.col#right-col-availability": {
"props": {
"preventVerticalStretch": true,
"rowGap": 0,
"blockClass": "info-availability"
},
"children": [
"flex-layout.row#product-name",
"product-identifier.product",
"sku-selector",
"flex-layout.row#availability"
]
},
"flex-layout.row#availability": {
"props": {
"blockClass": "message-availability"
},
"children": [
"availability-subscriber"
]
},

"share#default": {
"props": {
"social": {
Expand Down
6 changes: 6 additions & 0 deletions store/blocks/product-summary/product-summary.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
]
},

"product-summary-name": {
"props": {
"tag": "div"
}
},

"product-summary-image#shelf": {
"props": {
"showBadge": false,
Expand Down
22 changes: 22 additions & 0 deletions styles/css/vtex.store-newsletter.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.newsletterForm {
max-width: 1528px;
margin: 0 auto;
padding: 100px;
display: flex;
justify-content: center;
background-color: #03054e;
}

.newsletterForm :global(.vtex-input-prefix__group) {
margin: 0 10px;
}

.formSubmitContainer :global(.vtex-button),
.newsletterForm :global(.vtex-styleguide-9-x-input) {
background-color: transparent;
color: #FFF;
}

.formSubmitContainer :global(.vtex-button) {
border: 0;
}