Skip to content

Commit

Permalink
Merge pull request #90 from jwade1327/remove-sponsored-label
Browse files Browse the repository at this point in the history
Remove sponsored label
  • Loading branch information
Shinsina authored Oct 24, 2024
2 parents f0d0e6e + a852676 commit c30f99e
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions packages/common/components/blocks/content/list-item.marko
Original file line number Diff line number Diff line change
Expand Up @@ -72,31 +72,12 @@ $ const ctaLinkAttrs = { style: ctaLinkStyles, ...linkAttrs };
<tr>
<td align="center" valign="top">
<table role="presentation" width="610" border="0" align="center" cellpadding="0" cellspacing="0" class="wrap003">

$ const labels = getAsArray(content, "labels");
<if(labels.includes("Sponsored"))>
$ const tag = (content.company) ? `Sponsored by ${get(content, "company.name")}` : "Sponsored Content";
<tr>
<td align="left" valign="top" style=sponsoredTagStyle>${tag}</td>
<td align="right" width="200">
<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>
<else-if(withSection)>
<if(withSection)>
<tr>
<td align="left" valign="top" style=tagStyle>${get(content, "primarySection.name")}</td>
</tr>
</else-if>
</if>

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

0 comments on commit c30f99e

Please sign in to comment.