Skip to content

Commit

Permalink
Merge pull request #16 from jwade1327/test-template
Browse files Browse the repository at this point in the history
Create testing template for ads
  • Loading branch information
Shinsina authored Apr 21, 2023
2 parents 7a1e962 + 39eaf27 commit 450c54b
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tenants/all/config/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ const config = {
},
preferenceCenter: 'https://www.drbicuspid.com/user/subscribe',
},
'testing-template': {
...brands.drb,
name: 'Test Template',
logo: {
src: '/files/base/smg/all/image/static/drb/DrB_EmailHeader_BreakingNews_v3.jpg',
footerWidth: 200,
},
preferenceCenter: 'https://www.drbicuspid.com/user/subscribe',
},
};

module.exports = config;
38 changes: 38 additions & 0 deletions tenants/all/config/email-x.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,44 @@ config
width: 300,
height: 250,
},
])
.setAdUnits('testing-template', [
{
name: 'ad-slot-1',
id: '6442c99cf620c9c4d389373b',
width: 300,
height: 250,
},
{
name: 'ad-slot-2',
id: '6442c9b0f89e58c61a4c61f3',
width: 300,
height: 250,
},
{
name: 'ad-slot-3',
id: '6442c9c3f89e5840fe4c61fd',
width: 300,
height: 250,
},
{
name: 'ad-slot-4',
id: '6442c9d7f89e588a7c4c6210',
width: 300,
height: 250,
},
{
name: 'ad-slot-5',
id: '6442c9e6f620c931f1893772',
width: 300,
height: 250,
},
{
name: 'ad-slot-6',
id: '6442c9f8f620c98e9d893785',
width: 300,
height: 250,
},
]);

module.exports = config;
73 changes: 73 additions & 0 deletions tenants/all/templates/testing-template.marko
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import { get } from "@parameter1/base-cms-object-path";
import { parseBooleanHeader } from "@parameter1/base-cms-utils";
import queryFragment from "@science-medicine-group/package-common/graphql/fragments/content-list";

$ const { website, config, req } = out.global;
$ const { newsletter, date } = data;

$ const emailX = config.get("emailX");

<marko-newsletter-root
title=newsletter.name
description=newsletter.description
date=date
>
<@head>
<common-head-block />
</@head>
<@body style="padding:0; margin:0;font-family: 'Roboto', Arial, sans-serif; -webkit-text-size-adjust:100%;">
<common-body-wrapper-block newsletter=newsletter date=date>
<@body>

<!-- Ad Slot 1 -->
<common-ad-wrapper-block
newsletter=newsletter
promotion-component="advertisement-block"
ad-unit=emailX.getAdUnit({ name: 'ad-slot-1', alias: newsletter.alias })
date=date
/>

<!-- Ad Slot 2 -->
<common-ad-wrapper-block
newsletter=newsletter
promotion-component="advertisement-block"
ad-unit=emailX.getAdUnit({ name: 'ad-slot-2', alias: newsletter.alias })
date=date
/>

<!-- Ad Slot 3 -->
<common-ad-wrapper-block
newsletter=newsletter
promotion-component="advertisement-block"
ad-unit=emailX.getAdUnit({ name: 'ad-slot-3', alias: newsletter.alias })
date=date
/>

<!-- Ad Slot 4 -->
<common-ad-wrapper-block
newsletter=newsletter
promotion-component="advertisement-block"
ad-unit=emailX.getAdUnit({ name: 'ad-slot-4', alias: newsletter.alias })
date=date
/>

<!-- Ad Slot 5 -->
<common-ad-wrapper-block
newsletter=newsletter
promotion-component="advertisement-block"
ad-unit=emailX.getAdUnit({ name: 'ad-slot-5', alias: newsletter.alias })
date=date
/>

<!-- Ad Slot 6 -->
<common-ad-wrapper-block
newsletter=newsletter
promotion-component="advertisement-block"
ad-unit=emailX.getAdUnit({ name: 'ad-slot-6', alias: newsletter.alias })
date=date
/>

</@body>
</common-body-wrapper-block>
</@body>
</marko-newsletter-root>

0 comments on commit 450c54b

Please sign in to comment.