generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'stage' into MWPW-147172
* stage: Mwpw-142267: Merch What's Included and Merch Mnemonic List (TwP) (#2554) MWPW-149124 Improve Focus Page for Performance Improvement Tiger Team (#2391) Correctly send the created PR slacks (#2566) MWPW-153167: caas-config change to enable hiding date detail information (#2553) MWPW-152016 - Localization target preview for transcreation (#2564) Relax CORS restrictions for module imports (#2549) MWPW-153600 [PEP] loader bar on PEP prompt is seen loaded Left to right in RTL locale (#2548) MWPW-146962 [milo] Text link behaving like button in FAQ section (#2530) MWPW-152280 MEP: Only preload fragments that are in the 1st section (#2525) MWPW-152697 Fix Marketo mobile horizontal scroll (#2514) MWPW-151513: Search results vanished when user clicks on Marquee CTA:Start free trail (#2406) MWPW-154013 PEP prompt redirection is broken in stage after the PEP dismissal PR merge (#2547) MWPW-153962: Introduce maslibs query parameter (#2544) Central georouting support (#2531) [MWPW-152278] Avoid empty CSS requests (#2524) MWPW-152918 Fix Marketo button font (#2513) # Conflicts: # libs/deps/merch-card.js
- Loading branch information
Showing
45 changed files
with
919 additions
and
167 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
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,4 +1,4 @@ | ||
<meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
<script src="/libs/scripts/scripts.js" type="module" crossorigin="use-credentials"></script> | ||
<script src="/libs/scripts/scripts.js" type="module"></script> | ||
<link rel="stylesheet" href="/libs/styles/styles.css"/> | ||
<link rel="icon" href="data:," size="any"/> |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.merch-mnemonic-list { | ||
display: flex; | ||
height: 380px; | ||
flex-flow: column; | ||
flex-wrap: wrap; | ||
} |
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,21 @@ | ||
import '../../deps/merch-mnemonic-list.js'; | ||
import '../../deps/merch-card.js'; | ||
import { createTag } from '../../utils/utils.js'; | ||
|
||
const init = async (el) => { | ||
const rows = el.querySelectorAll(':scope p:not([class])'); | ||
if (rows.length < 1) return; | ||
[...rows].forEach((paragraph) => { | ||
const merchMnemonicList = createTag('merch-mnemonic-list'); | ||
paragraph.setAttribute('slot', 'description'); | ||
const picture = paragraph.querySelector('picture'); | ||
const img = picture.querySelector('img'); | ||
const icon = createTag('merch-icon', { slot: 'icon', size: 's', src: img.src }); | ||
picture.remove(); | ||
if (icon) merchMnemonicList.appendChild(icon); | ||
if (paragraph) merchMnemonicList.appendChild(paragraph); | ||
el.appendChild(merchMnemonicList); | ||
}); | ||
}; | ||
|
||
export default init; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.merch-whats-included-container > .fragment { | ||
width: inherit; | ||
height: inherit; | ||
max-height: 100%; | ||
display: block; | ||
} | ||
|
||
.merch-whats-included-container .content h3 { | ||
margin: 0; | ||
} | ||
|
||
.merch-whats-included-container .fragment .container { | ||
display: contents; | ||
} | ||
|
||
.merch-whats-included-container .fragment .content { | ||
float: right; | ||
} | ||
|
||
.merch-whats-included-container .fragment .content a[is="checkout-link"] { | ||
margin-inline-start: var(--spacing-xxs); | ||
} | ||
|
||
@media screen and (max-width: 767px) { | ||
.merch-whats-included-container { | ||
position: fixed; | ||
overflow: hidden scroll; | ||
} | ||
|
||
.merch-mnemonic-list { | ||
height: auto; | ||
} | ||
|
||
.merch-whats-included-container .fragment .container { | ||
grid-auto-flow: row; | ||
} | ||
} |
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,30 @@ | ||
import '../../deps/merch-whats-included.js'; | ||
import { createTag } from '../../utils/utils.js'; | ||
|
||
const init = async (el) => { | ||
const styles = Array.from(el.classList); | ||
const mobileRows = styles.find((style) => /\d/.test(style)); | ||
const heading = el.querySelector('h3, h4'); | ||
const content = el.querySelector('.section'); | ||
|
||
const contentSlot = createTag( | ||
'div', | ||
{ slot: 'content' }, | ||
content.innerHTML, | ||
); | ||
const whatsIncluded = createTag( | ||
'merch-whats-included', | ||
{ mobileRows: mobileRows || 1 }, | ||
); | ||
if (heading) { | ||
heading.setAttribute('slot', 'heading'); | ||
whatsIncluded.appendChild(heading); | ||
} | ||
|
||
whatsIncluded.appendChild(contentSlot); | ||
const divsWithoutClass = contentSlot.querySelectorAll('div:not([class])'); | ||
divsWithoutClass.forEach((div) => div.remove()); | ||
el.replaceWith(whatsIncluded); | ||
}; | ||
|
||
export default init; |
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
Oops, something went wrong.