Skip to content

Commit

Permalink
Merge pull request #37 from jwade1327/senl
Browse files Browse the repository at this point in the history
Create SENL newsletter for all brands
  • Loading branch information
Shinsina authored Oct 9, 2023
2 parents 739ff05 + 844e28b commit e190a2f
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/common/components/layouts/marko.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@
},
"<common-radcast-layout>": {
"template": "./radcast.marko"
},
"<common-senl-layout>": {
"template": "./senl.marko"
}
}
78 changes: 78 additions & 0 deletions packages/common/components/layouts/senl.marko
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
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";
import defaultValue from "@parameter1/base-cms-marko-core/utils/default-value";

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

$ const emailX = config.get("emailX");
$ const nativeX = config.getAsObject("nativeX");
$ const { id, alias, name, pageNode } = input;

<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>

<!-- Content list block -->
<common-content-list-block
date=date
section-name="Main"
newsletter=newsletter
with-image=true
image-position=false
with-section=true
limit=1
skip=0
/>

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

<!-- Content list block -->
<common-content-list-block
date=date
section-name="Main"
newsletter=newsletter
with-image=false
with-section=true
limit=1
skip=1
/>

<!-- Native Ad -->
<common-ad-wrapper-block
date=date
newsletter=newsletter
promotion-component="advertisement-block"
placement-id=get(nativeX, `placements.${newsletter.alias}.slot-1`)
/>

<!-- Content list block -->
<common-content-list-block
date=date
section-name="Main"
newsletter=newsletter
with-image=false
with-section=true
skip=2
limit=1
/>

</@body>
</common-body-wrapper-block>
</@body>
</marko-newsletter-root>
10 changes: 10 additions & 0 deletions tenants/all/config/brands.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ module.exports = {
],
},
},
ame: {
publicationName: 'https://AuntMinnieEurope.com',
socialMedia: {
imagePath: '/files/base/smg/all/image/static/newsletter',
links: [
{ provider: 'facebook', href: 'https://www.facebook.com/auntminnie.radiology', target: '_blank' },
{ provider: 'twitter', href: 'https://twitter.com/AuntMinnie', target: '_blank' },
],
},
},
sab: {
logo: {
src: '/files/base/smg/all/image/static/sab/sab-logo.svg',
Expand Down
36 changes: 36 additions & 0 deletions tenants/all/config/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ const config = {
},
preferenceCenter: 'https://www.labpulse.com/user/subscribe',
},
'labpulse-senl': {
...brands.labPulse,
name: 'labpulse-SENL',
logo: {
src: '/files/base/smg/all/image/static/lab/Labpulse-SpecialEditionNewsletter.png',
footerWidth: 200,
},
preferenceCenter: 'https://www.labpulse.com/user/subscribe',
},
'drb-lfte': {
...brands.drb,
name: 'Dr. Bicuspid-Letter From The Editor',
Expand Down Expand Up @@ -84,6 +93,15 @@ const config = {
},
preferenceCenter: 'https://www.drbicuspid.com/user/subscribe',
},
'drb-senl': {
...brands.drb,
name: 'DrBicuspid-SENL',
logo: {
src: '/files/base/smg/all/image/static/drb/DrBiscuspid-SpecialEditionNewsletter.png',
footerWidth: 200,
},
preferenceCenter: 'https://www.drbicuspid.com/user/subscribe',
},
'am-lfte': {
...brands.am,
name: 'AuntMinnie-Letter From The Editor',
Expand Down Expand Up @@ -130,6 +148,24 @@ const config = {
},
preferenceCenter: 'https://www.auntminnie.com/user/subscribe',
},
'am-senl': {
...brands.am,
name: 'AuntMinnie-SENL',
logo: {
src: '/files/base/smg/all/image/static/am/auntminnie-SpecialEditionNewsletter.png',
footerWidth: 200,
},
preferenceCenter: 'https://www.auntminnie.com/user/subscribe',
},
'ame-senl': {
...brands.ame,
name: 'AuntMinnieEurope-SENL',
logo: {
src: '/files/base/smg/all/image/static/ame/AME-SpecialEditionNewsletter.png',
footerWidth: 200,
},
preferenceCenter: 'https://www.auntminnieeurope.com/user/subscribe',
},
};

module.exports = config;
32 changes: 32 additions & 0 deletions tenants/all/config/email-x.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ config
height: 250,
},
])
.setAdUnits('labpulse-senl', [
{
name: 'ad-slot-1',
id: '6523478bd423c99fb0f1701a',
width: 300,
height: 250,
},
])
.setAdUnits('drb-lfte', [
{
name: 'ad-slot-1',
Expand Down Expand Up @@ -97,6 +105,14 @@ config
height: 250,
},
])
.setAdUnits('drb-senl', [
{
name: 'ad-slot-1',
id: '652347b9d423c9192ef17048',
width: 300,
height: 250,
},
])
.setAdUnits('am-lfte', [
{
name: 'ad-slot-1',
Expand Down Expand Up @@ -137,13 +153,29 @@ config
height: 250,
},
])
.setAdUnits('am-senl', [
{
name: 'ad-slot-1',
id: '652347e6c6835c370c56d52f',
width: 300,
height: 250,
},
])
.setAdUnits('sab', [
{
name: 'ad-slot-1',
id: '638616fd58002a6962708cd2',
width: 300,
height: 250,
},
])
.setAdUnits('ame-senl', [
{
name: 'ad-slot-1',
id: '6523481fc6835ca12556d55d',
width: 300,
height: 250,
},
]);

module.exports = config;
18 changes: 15 additions & 3 deletions tenants/all/config/native-x.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ module.exports = {
'labpulse-breaking-news': {
'slot-1': '6406aca393fb8e0001c3ac2a',
},
'labpulse-senl': {
'slot-1': '652352981449000001cb3e63',
},
'drb-lfte': {
'slot-1': '638619dad6ced5000110a551',
'case-sponsor': '643d7f61b91bf50001eff980',
Expand All @@ -22,12 +25,12 @@ module.exports = {
'drb-breaking-news': {
'slot-1': '6406ad19e78b060001976ca1',
},
sab: {
'slot-1': '63861a1cadecb1000112fe8b',
},
'drb-case-of-the-week': {
'case-sponsor': '642310db713241000128c421',
},
'drb-senl': {
'slot-1': '6523526e1449000001cb3e32',
},
'am-lfte': {
'slot-1': '647e1c415150cb0001181028',
'case-sponsor': '647e1c36989f4f0001733285',
Expand All @@ -45,5 +48,14 @@ module.exports = {
'am-radcast': {
'slot-1': '64ff595396af9a00016aa6d4',
},
'am-senl': {
'slot-1': '652352441449000001cb3e0b',
},
sab: {
'slot-1': '63861a1cadecb1000112fe8b',
},
'ame-senl': {
'slot-1': '652352cd1449000001cb3ea4',
},
},
};
1 change: 1 addition & 0 deletions tenants/all/templates/am-senl.marko
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<common-senl-layout data=data />
1 change: 1 addition & 0 deletions tenants/all/templates/ame-senl.marko
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<common-senl-layout data=data />
1 change: 1 addition & 0 deletions tenants/all/templates/drb-senl.marko
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<common-senl-layout data=data />
1 change: 1 addition & 0 deletions tenants/all/templates/labpulse-senl.marko
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<common-senl-layout data=data />

0 comments on commit e190a2f

Please sign in to comment.