Skip to content

Commit

Permalink
Merge pull request #40 from jwade1327/header-color
Browse files Browse the repository at this point in the history
Set specific header color for DrB 'In case you missed it' block
  • Loading branch information
Shinsina authored Oct 20, 2023
2 parents f7aee3b + 454265b commit 5b44bed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/common/components/blocks/content/list.marko
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import queryFragment from "@science-medicine-group/package-common/graphql/fragme

$ const { config } = out.global;

$ const { sectionName, date, newsletter } = input;
$ const { headerBackgroundColor, sectionName, date, newsletter } = input;

$ const withImage = defaultValue(input.withImage, true);
$ const imagePosition = defaultValue(input.imagePosition, 'right');
Expand All @@ -28,7 +28,7 @@ $ const queryParams = {
<marko-web-query|{ nodes }| name="newsletter-scheduled-content" collapsible=false params=queryParams>
<if(nodes.length)>
<if(withHeader)>
<common-list-header-element title=sectionName />
<common-list-header-element title=sectionName header-background-color=headerBackgroundColor />
</if>
<for|content| of=nodes>
<common-content-list-item-block
Expand Down
8 changes: 7 additions & 1 deletion packages/common/components/elements/list-header.marko
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import defaultValue from "@parameter1/base-cms-marko-core/utils/default-value";

$ const headerBackgroundColor = defaultValue(input.headerBackgroundColor, "#eff1f3");

$ const styles = { "background": `${headerBackgroundColor}` };

<tr>
<td align="center" valign="top">
<table role="presentation" width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="background: #eff1f3;">
<table role="presentation" width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style=styles>
<tr>
<td align="center" valign="middle" height="38">
<a href="#" target="_blank" style="font-size:15px;color: #000000;text-decoration: none;display: block;font-weight:700;font-family:'Roboto', Arial, sans-serif;text-transform: uppercase;padding: 0 24px;" >${input.title}</a>
Expand Down
1 change: 1 addition & 0 deletions tenants/all/templates/drb-lfte.marko
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ $ const resolvedToNodesConverter = ({ resolved }) => (resolved.map((node) => ({
with-image=true
image-position="right"
with-header=true
header-background-color="#fbd043"
continue-reading=false
limit=5
/>
Expand Down

0 comments on commit 5b44bed

Please sign in to comment.