Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

US marketing card component - design updates #12590

Merged
merged 5 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 37 additions & 17 deletions dotcom-rendering/src/components/ExpandableMarketingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
headlineBold20,
neutral,
space,
textSans14,
textSans15,
textSansBold12,
textSansBold14,
Expand Down Expand Up @@ -110,13 +111,19 @@ const headingStyles = css`
justify-content: space-between;

${headlineBold17};
${from.leftCol} {
${from.wide} {
${headlineBold20};
}
`;

const kickerStyles = css`
${textSans15};
${from.leftCol} {
${textSans14};
}
${from.wide} {
${textSans15};
}
`;

const arrowStyles = css`
Expand Down Expand Up @@ -156,16 +163,21 @@ const sectionStyles = css`
gap: ${space[3]}px;
border-top: 1px solid ${neutral[100]};
padding-top: ${space[2]}px;
`;

h3 {
${headlineBold17};
}
const subheadingStyles = css`
${headlineBold17};
`;

p {
${textSans15}
margin-right: ${space[4]}px;
z-index: 1;
}
const paragraphStyles = css`
${textSans15}
margin-right: ${space[4]}px;
z-index: 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor - could this use getZindex() ?

Copy link
Contributor Author

@domlander domlander Oct 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit tricky. The component has a z-index of 8 as that is suitable for the other elements on the page. This z-index is so the text appears on top of the illustrations within the component. Given this is all within the component, I think it would add noise to getZIndex which controls the order of things at a page level.

`;

const ctaCalloutStyles = css`
${textSansBold14};
z-index: 1;
`;

const imageTopStyles = css`
Expand Down Expand Up @@ -259,37 +271,45 @@ export const ExpandableMarketingCard = ({
</section>
<div css={detailsStyles}>
<section css={sectionStyles}>
<h3>We’re independent</h3>
<p>
<h3 css={subheadingStyles}>
We’re independent
</h3>
<p css={paragraphStyles}>
With no billionaire owner or
shareholders, our journalism is funded
by readers
</p>
</section>
<section css={sectionStyles}>
<h3>We’re open</h3>
<p>
<h3 css={subheadingStyles}>We’re open</h3>
<p css={paragraphStyles}>
With misinformation threatening
democracy, we keep our fact-based news
paywall-free
</p>
</section>
<section css={sectionStyles}>
<h3>We’re global</h3>
<p>
<h3 css={subheadingStyles}>We’re global</h3>
<p css={paragraphStyles}>
With 200 years of history and staff
across America and the world, we offer
an outsider perspective on US news
</p>
</section>
<section css={sectionStyles}>
<p css={ctaCalloutStyles}>
Sign up for Guardian Headlines US
edition
</p>
</section>
<LinkButton
data-link-name="us-expandable-marketing-card cta-click"
priority="tertiary"
size="xsmall"
href={`${guardianBaseURL}/email-newsletters`}
href={`${guardianBaseURL}/info/2015/dec/08/daily-email-us`}
cssOverrides={buttonStyles}
>
View newsletters
Newsletter sign up
</LinkButton>
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const isNewUSUser = async () => {
// This check must happen AFTER we've ensured that the user is in the US.
const isNewUser = isFirstArticle();

return !hasUserSelectedNonUSEdition && !isNewUser;
return !hasUserSelectedNonUSEdition && isNewUser;
};

interface Props {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading