Skip to content

Commit

Permalink
Merge pull request #11 from jwade1327/layout-changes
Browse files Browse the repository at this point in the history
Update Breaking News and Insider layouts
  • Loading branch information
Shinsina authored Mar 13, 2023
2 parents 286391e + dd37024 commit 7f57644
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 20 deletions.
21 changes: 9 additions & 12 deletions packages/common/components/blocks/ad/promotion-sponsored.marko
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ import buildLinkUrl from '@science-medicine-group/package-common/utils/build-lin

$ const newsletter = getAsObject(input, "newsletter");
$ const { sectionName, date, content, linkLabelProps } = input;
$ const { adLocation, platformDesignator } = linkLabelProps;

$ const url = buildLinkUrl(get(content, "siteContext.url"));
$ const company = getAsObject(content, "company");

$ const linkLabel = `ad|${adLocation}|${platformDesignator}|${company.name}|${content.name}`;

$ const imgStyles = {
"font-size": "14px",
"line-height": 0,
Expand Down Expand Up @@ -45,19 +42,19 @@ $ const imgLinkStyles = {
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0">
<common-table-spacer-element height="9" />
<tr>
<td align="center" valign="center" width="123">
<marko-core-obj-value|{ value: image }| obj=content.company field="primaryImage" as="object">
<td align="center" valign="center">
<marko-core-obj-value|{ value: image }| obj=content field="primaryImage" as="object">
<marko-newsletter-imgix
src=image.src
alt=image.alt
options={ w: 180, h: 80, fit: "fill", auto: "format,compress" }
attrs={ border: 0, width: 90, style: imgStyles }
options={ w: 300, h: 50, fit: "fill", auto: "format,compress" }
attrs={ border: 0, width: 300, style: imgStyles }
>
<@link href=url target="_blank" attrs={ style: imgLinkStyles } />
</marko-newsletter-imgix>
</marko-core-obj-value>
</td>
<td align="left" valign="top">
<!-- <td align="left" valign="top">
<table role="presentation" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top" style="font-size:16px;line-height:19px;color:#202022;font-weight:700;">${company.name}</td>
Expand All @@ -66,7 +63,7 @@ $ const imgLinkStyles = {
<td align="left" valign="top" style="font-size:16px;line-height:22px;color:#202022;font-weight:400;">${content.teaser}</td>
</tr>
</table>
</td>
</td> -->
</tr>
</table>
</td>
Expand All @@ -77,12 +74,12 @@ $ const imgLinkStyles = {
</table>
</td>
</tr>
<common-table-spacer-element height="6" />
<!-- <common-table-spacer-element height="6" />
<tr>
<td align="left" valign="top" style="font-size:16px;line-height:23px;color:#3475b6;font-weight:400;padding: 0 0 0 123px;" class="wdth">
<a href=url target="_blank" style="text-decoration: none;color: #3475b6;" linklabel=linkLabel>${content.name}</a>
<a href=url target="_blank" style="text-decoration: none;color: #3475b6;">${content.name}</a>
</td>
</tr>
</tr> -->
<common-table-hr-element height="15" />
<common-table-spacer-element height="18" />
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion packages/common/components/blocks/footer.marko
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ $ const stealthLinkStyle = {

<tr>
<td align="left" valign="top" style=standardStyle>
You are receiving this email because you subscribed to receive relevant news from ${publicationName}. To update your email subscriptions, visit the LabPulse <a href=preferenceCenterUrl style=linkStyle>preference center</a>.
You are receiving this email because you subscribed to receive relevant news from ${publicationName}. To update your email subscriptions, visit ${publicationName}'s <a href=preferenceCenterUrl style=linkStyle>preference center</a>.
</td>
</tr>
<common-table-spacer-element height="19" />
Expand Down
4 changes: 1 addition & 3 deletions packages/common/components/layouts/breaking-news.marko
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ $ const nativeX = config.getAsObject("nativeX");
section-name="Main"
newsletter=newsletter
with-image=true
image-position="right"
image-position="top"
with-section=true
limit=1
skip=0
/>

<!-- Ad Slot 1 -->
Expand Down
3 changes: 1 addition & 2 deletions packages/common/components/layouts/insider.marko
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ $ const nativeX = config.getAsObject("nativeX");
date=date
section-name="Main"
newsletter=newsletter
with-image=true
image-position="right"
with-image=false
with-section=true
limit=10
skip=0
Expand Down
4 changes: 2 additions & 2 deletions packages/common/components/layouts/standard.marko
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ $ const nativeX = config.getAsObject("nativeX");
/>

<!-- Content list block -->
<!-- <common-content-list-block
<common-content-list-block
date=date
section-name="Editor's Note"
newsletter=newsletter
Expand All @@ -72,7 +72,7 @@ $ const nativeX = config.getAsObject("nativeX");
with-header=true
continue-reading=true
limit=1
/> -->
/>

</@body>
</common-body-wrapper-block>
Expand Down

0 comments on commit 7f57644

Please sign in to comment.