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

[TITAN-293] feat: ✨ Added Promo section component to the Front Page #14

Merged
merged 18 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
7285092
feat: :sparkles: Added Promo section component to the Front Page
alvarocavalcanti Apr 6, 2023
12866f9
feat: :sparkles: Added CTA to the PromoSection component
alvarocavalcanti Apr 7, 2023
10054be
refactor: :lipstick: Refactored button styling to the global scope
alvarocavalcanti Apr 7, 2023
a254175
refactor: :recycle: Using showCta flag instead of two props to displa…
alvarocavalcanti Apr 7, 2023
ca678fc
style: :recycle: Using the section style from the global scss
alvarocavalcanti Apr 7, 2023
a5b30d7
refactor: :recycle: Extracted CtaButton component into its own module
alvarocavalcanti Apr 7, 2023
23e81fe
refactor: :recycle: Moved showCta into the props of CtaButton
alvarocavalcanti Apr 11, 2023
d760ae7
refactor: :recycle: Lifted CtaButton state to PromoSection
alvarocavalcanti Apr 11, 2023
b61de62
feat: :sparkles: Added Promo section component to the Front Page
alvarocavalcanti Apr 6, 2023
42ee3bb
feat: :sparkles: Added CTA to the PromoSection component
alvarocavalcanti Apr 7, 2023
7fee864
refactor: :lipstick: Refactored button styling to the global scope
alvarocavalcanti Apr 7, 2023
34fcb48
refactor: :recycle: Using showCta flag instead of two props to displa…
alvarocavalcanti Apr 7, 2023
8c7d74a
style: :recycle: Using the section style from the global scss
alvarocavalcanti Apr 7, 2023
2c465d0
refactor: :recycle: Extracted CtaButton component into its own module
alvarocavalcanti Apr 7, 2023
72fd518
refactor: :recycle: Moved showCta into the props of CtaButton
alvarocavalcanti Apr 11, 2023
2b6149f
refactor: :recycle: Lifted CtaButton state to PromoSection
alvarocavalcanti Apr 11, 2023
6b863d0
Merge branch 'TITAN-293' of github.com:wpengine/atlas-shopify-bluepri…
alvarocavalcanti Apr 11, 2023
e9266d3
Merge branch 'main' of github.com:wpengine/atlas-shopify-blueprint in…
alvarocavalcanti Apr 11, 2023
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
19 changes: 19 additions & 0 deletions components/PromoSection/PromoSection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
alvarocavalcanti marked this conversation as resolved.
Show resolved Hide resolved
import { Container } from '../Container';
import classNames from 'classnames';
import styles from './PromoSection.module.scss';

const cx = classNames.bind(styles);
RossoMaguire marked this conversation as resolved.
Show resolved Hide resolved

const PromoSection = () => {
return (
<div className={cx(['section', styles.component])}>
RossoMaguire marked this conversation as resolved.
Show resolved Hide resolved
<Container>
<h1 className={cx(styles.title)}>Promo Banners</h1>
<div className={cx(styles.description)}>You can use this component to promote articles or specific products.</div>
</Container>
RossoMaguire marked this conversation as resolved.
Show resolved Hide resolved
</div>
);
};

export default PromoSection;
27 changes: 27 additions & 0 deletions components/PromoSection/PromoSection.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.component {
@import 'styles/css-variables';

background-color: var(--wpe--color--grey);

h2 {
padding: 2em;
}

.section {
alvarocavalcanti marked this conversation as resolved.
Show resolved Hide resolved
display: flex;
}

.title {
text-align: center;
font-size: 50px;
padding: 1em;
margin-bottom: 0em;
}

.description {
padding: 1rem 0;
text-align: center;
margin-top: auto;
width: 100%;
}
}
1 change: 1 addition & 0 deletions components/PromoSection/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as PromoSection } from './PromoSection.js';
1 change: 1 addition & 0 deletions components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export { NavigationMenu } from './NavigationMenu';
export { PostInfo } from './PostInfo';
export { ProductCard } from './ProductCard';
export { ProductSection } from './ProductSection';
export { PromoSection } from './PromoSection';
export { SkipNavigationLink } from './SkipNavigationLink';
export { TestimonialsSection } from './TestimonialsSection';
export { Hero } from './Hero';
Expand Down
5 changes: 2 additions & 3 deletions wp-templates/front-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
TestimonialsSection,
} from '../components';
import productsStub from '../data/stubs/products';
import { PromoSection } from '../components/PromoSection';
RossoMaguire marked this conversation as resolved.
Show resolved Hide resolved

export default function Component(props) {
const { title: siteTitle, description: siteDescription } =
Expand Down Expand Up @@ -40,9 +41,7 @@ export default function Component(props) {
<ProductSection heading='Latest Products' products={latestProducts} />
<TestimonialsSection />
<ProductSection heading='On Sale' products={saleProducts} />
{/*
<div>promo banner</div>
*/}
<PromoSection />
</Main>
<Footer title={siteTitle} menuItems={footerMenu} />
</>
Expand Down