Skip to content

Commit

Permalink
init plans cards doc
Browse files Browse the repository at this point in the history
  • Loading branch information
3ch023 committed Sep 10, 2024
1 parent 2802011 commit 10aef7a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions .hlxignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ LICENSE
web-test-runner.config.mjs
codecov.yaml
libs/features/mas/*
!libs/features/mas/docs/*
23 changes: 23 additions & 0 deletions libs/features/mas/docs/plans.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

<!DOCTYPE html>
<html>
<head>
<title>Plans merch cards</title>
<meta name="access-control-allow-origin" content="*">
<meta name="robots" content="noindex, nofollow">
<meta name="nofollow-links" content="on">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="/libs/scripts/scripts.js" type="module"></script>
<script src="/libs/deps/mas/mas.js" type="module"></script>
<link rel="stylesheet" href="/libs/styles/styles.css">
</head>
<body>
<header></header>
<main>
<div>
<merch-card><merch-datasource path="/content/dam/sandbox/mas/catalog/creative-cloud-all-apps"></merch-datasource></merch-card>
</div>
</main>
<footer></footer>
</body>
</html>
3 changes: 2 additions & 1 deletion libs/features/mas/web-components/src/merch-datasource.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { AEM } from './aem.js';
import { createTag } from './utils.js';

const ATTR_AEM_BUCKET = 'aem-bucket';
const AEM_BUCKET = 'publish-p22655-e59341';

const VARIANTS = {
CATALOG: 'catalog',
Expand Down Expand Up @@ -210,7 +211,7 @@ export class MerchDataSource extends HTMLElement {
this.consonant = this.hasAttribute('consonant');
this.clearRefs();
const bucket =
this.getAttribute(ATTR_AEM_BUCKET) ?? 'publish-p22655-e59341';
this.getAttribute(ATTR_AEM_BUCKET) ?? AEM_BUCKET;
this.#aem = new AEM(bucket);
this.refresh(false);
}
Expand Down

0 comments on commit 10aef7a

Please sign in to comment.