Skip to content

Commit

Permalink
Merge pull request #88 from jwade1327/am-sponsored
Browse files Browse the repository at this point in the history
Fix ‘Sponsored’ article error
  • Loading branch information
B77Mills authored Sep 24, 2024
2 parents 224670e + b1253c8 commit 0781ecf
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions packages/common/components/blocks/content/list-item.marko
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import defaultValue from "@parameter1/base-cms-marko-core/utils/default-value";
import buildLinkUrl from '@science-medicine-group/package-common/utils/build-link-url';

$ const { content, ctaLinkStyle, advertiser } = input;
$ const company = (advertiser) ? advertiser : content.company;
$ const creativeId = get(input, "mindfulCreativeId");
$ const tenant = get(input, "mindfulTenant");
$ const url = buildLinkUrl(content.siteContext.url);
Expand Down Expand Up @@ -78,14 +79,16 @@ $ const ctaLinkAttrs = { style: ctaLinkStyles, ...linkAttrs };
<tr>
<td align="left" valign="top" style=sponsoredTagStyle>${tag}</td>
<td align="right" width="200">
<marko-newsletter-imgix
src=advertiser.image.src
alt=advertiser.image.alt
options={ w: 360, auto: "format,compress" }
attrs={ border: 0, width: 180 }
>
<@link href=advertiser.website target="_blank" attrs=imgLinkAttrs />
</marko-newsletter-imgix>
<marko-core-obj-value|{ value: image }| obj=company field="primaryImage" as="object">
<marko-newsletter-imgix
src=image.src
alt=image.alt
options={ w: 360, auto: "format,compress" }
attrs={ border: 0, width: 180 }
>
<@link href=url target="_blank" attrs=imgLinkAttrs />
</marko-newsletter-imgix>
</marko-core-obj-value>
</td>
</tr>
</if>
Expand All @@ -96,7 +99,9 @@ $ const ctaLinkAttrs = { style: ctaLinkStyles, ...linkAttrs };
</else-if>

<common-table-spacer-element height="6" />
</table>

<table role="presentation" width="610" border="0" align="center" cellpadding="0" cellspacing="0" class="wrap003">
<if(withImage && imagePosition === 'top' && content.primaryImage)>
<common-table-spacer-element height="6" />
<tr>
Expand Down

0 comments on commit 0781ecf

Please sign in to comment.