forked from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add recommendations block with ACDL (#11)
* Add recommendations block with ACDL2 * Fix array issue for product views * Fix enrichment position * Update recommendations context * Add schema validation for events * Fix ACDL2 and product view history bugs * Fix CLS * Use base design system * Update styles * Replace ACDL2 with mainline ACDL * Add viewHistory and cartSkus * Add storefront events to recommendations block * Optimize recommendations context * Add PLP widget version that uses ACDL * Add categoryContext to PLP * Remove optional category url path from PLP * Add categoryIds filter * Update autocomplete widget
- Loading branch information
Showing
28 changed files
with
999 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
helix-importer-ui | ||
scripts/preact.js | ||
scripts/htm.js | ||
scripts/acdl | ||
tools/picker | ||
scripts/widgets | ||
scripts/widgets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
blocks/product-recommendations/product-recommendations.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
main .section>div.product-recommendations-wrapper { | ||
max-width: 100%; | ||
padding: 0; | ||
text-align: left; | ||
margin: 0 0 5rem; | ||
} | ||
|
||
.product-recommendations { | ||
overflow: hidden; | ||
min-height: 512px; | ||
} | ||
|
||
.product-recommendations .scrollable { | ||
overflow-x: scroll; | ||
scroll-snap-type: x mandatory; | ||
padding-bottom: 1rem; | ||
} | ||
|
||
.product-recommendations .product-grid { | ||
display: inline-flex; | ||
flex-wrap: nowrap; | ||
gap: 2rem; | ||
margin: 0; | ||
} | ||
|
||
.product-recommendations .product-grid-item img { | ||
width: 100%; | ||
} | ||
|
||
.product-recommendations .product-grid .product-grid-item a { | ||
text-decoration: none; | ||
} | ||
|
||
.product-recommendations .product-grid .product-grid-item a:hover, | ||
.product-recommendations .product-grid .product-grid-item a:focus { | ||
text-decoration: underline; | ||
} | ||
|
||
.product-recommendations .product-grid .product-grid-item span { | ||
overflow: hidden; | ||
box-sizing: border-box; | ||
margin: 0; | ||
padding: .5rem 1rem 0 0; | ||
display: inline-block; | ||
} | ||
|
||
.product-recommendations .product-grid picture { | ||
background: none; | ||
display: block; | ||
width: 300px; | ||
aspect-ratio: 1 / 1.25; | ||
} | ||
|
||
.product-recommendations .product-grid img { | ||
display: inline-block; | ||
vertical-align: middle; | ||
width: 100%; | ||
object-fit: contain; | ||
background: none; | ||
} | ||
|
||
.product-recommendations .product-grid .placeholder { | ||
background-color: var(--color-neutral-500); | ||
scroll-snap-align: start; | ||
} | ||
|
||
.product-recommendations .product-grid .placeholder img { | ||
display: none; | ||
} | ||
|
||
.product-recommendations .product-grid-item { | ||
margin: 0; | ||
scroll-snap-align: start; | ||
} | ||
|
||
@media (width >= 900px) { | ||
.product-recommendations { | ||
min-height: 534px; | ||
} | ||
} |
Oops, something went wrong.