Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #691 from B77Mills/AddFromCompany
Browse files Browse the repository at this point in the history
Add display of content company on section feed nodes
  • Loading branch information
brandonbk authored Apr 21, 2023
2 parents ef25426 + f91e1c4 commit 1918a91
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import defaultValue from "@parameter1/base-cms-marko-core/utils/default-value";
$ const { site, i18n } = out.global;

$ const content = getAsObject(input, "node");
$ const { company } = content;
$ const withCompany = (company) ? defaultValue(input.withCompany, true) : false;
$ const primaryImage = getAsObject(content, "primaryImage");
$ const primarySection = getAsObject(content, "primarySection");
$ const containerAttrs = getAsObject(input, "containerAttrs");
Expand Down Expand Up @@ -97,6 +99,10 @@ $ const blockName = "section-feed-content-node";
/>
</else-if>

<if(withCompany)>
<marko-web-content-name class=`${blockName}__content-company` obj=content.company link=true />
</if>

<marko-web-content-sponsors|{ node }| block-name=blockName obj=content>
Sponsored By: <marko-web-content-name tag="span" block-name=blockName obj=node link=true />
</marko-web-content-sponsors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ fragment SectionFeedBlockContentFragment on Content {
alt
isLogo
}
company {
id
name
canonicalPath
}
... on ContentWebinar {
linkUrl
startDate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@
}
}

&__content-company {
font-weight: $theme-content-attribution-prefix-font-weight;
&::before {
margin-right: $theme-content-attribution-prefix-margin;
font-weight: $theme-content-attribution-prefix-font-weight;
content: "From";
}
}

.btn-primary {
margin-top: 10px;
}
Expand Down

0 comments on commit 1918a91

Please sign in to comment.