Skip to content
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
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Updated husky script to avoid warning

### Changed

- Started migrating styles from Styled Components to CSS Modules (ContactUsCard)

- CSS Modules Migration for ButtonLink
2 changes: 1 addition & 1 deletion components/blog/BlogPostContainer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const BlogPostContainer = ({ post, relatedPosts, latestPosts }) => {
$contentType='questions'
link='/contact'
linkText='Contact us'
$btnColorScheme='inverted-grey'
customBtnClass='inverted-grey'
/>
</RevealContentContainer>
</>
Expand Down
38 changes: 38 additions & 0 deletions components/buttons/ButtonLink/ButtonLink.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.buttonLink {
padding: 0.5rem 2rem;
color: var(--color-white);
background-color: var(--color-primary-content);
border-radius: 2rem;
cursor: pointer;
font-weight: bold;
font-size: 1.5rem;
text-align: center;
min-width: 16rem;
display: inline-block;
border: 1px solid var(--color-primary-content);
text-decoration: none;
transition: all 0.3s ease;

&:hover {
text-decoration: none;
}

// Color scheme variations
&.inverted-grey {
&:hover {
color: var(--color-primary-content);
background-color: var(--color-transparent);
}
}

&.inverted-white {
border: 1px solid var(--color-white);
color: var(--color-primary-content);
background-color: var(--color-white);

&:hover {
color: var(--color-white);
background-color: var(--color-transparent);
}
}
}
16 changes: 9 additions & 7 deletions components/buttons/ButtonLink/index.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import S from './styles';
import styles from './ButtonLink.module.scss';

/* The component supports the use of target with the property "openNewTab" to open the
link in a new tab.*/
export default function ButtonLink({
link,
children,
$colorScheme,
customBtnClass,
openNewTab,
}) {
const buttonClass = customBtnClass
? `${styles.buttonLink} ${styles[customBtnClass]}`
: styles.buttonLink;

return (
<S.ButtonLink
<a
href={link}
$colorScheme={$colorScheme}
className={buttonClass}
target={openNewTab ? '_blank' : undefined}
rel='noopener noreferrer'
>
{children}
</S.ButtonLink>
</a>
);
}
47 changes: 0 additions & 47 deletions components/buttons/ButtonLink/styles.js

This file was deleted.

3 changes: 1 addition & 2 deletions components/containers/TwoColumn/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default function TwoColumn({
bgColor,
link,
customBtnClass,
$btnColorScheme,
linkText = 'Learn more',
secondTextColumn,
openNewTab,
Expand All @@ -35,7 +34,7 @@ export default function TwoColumn({
{link && (
<ButtonLink
link={link}
$colorScheme={$btnColorScheme}
customBtnClass={customBtnClass}
openNewTab={openNewTab}
>
{linkText}
Expand Down
9 changes: 4 additions & 5 deletions pages/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { whoWeAre } from '@/utils/about';
import { useTheme } from 'styled-components';

export default function AboutUs() {

const theme = useTheme();

return (
Expand Down Expand Up @@ -166,7 +165,7 @@ export default function AboutUs() {
linkText='Our wiki'
openNewTab
link='https://github.com/Web-Dev-Path/web-dev-path/wiki'
$btnColorScheme='inverted-grey'
customBtnClass='inverted-grey'
color={theme.colors.primaryContent}
bgColor={theme.colors.lightBg}
$contentType='two-text-columns'
Expand All @@ -181,7 +180,7 @@ export default function AboutUs() {
}
linkText='Contact us'
link='/contact'
$btnColorScheme='inverted-grey'
customBtnClass='inverted-grey'
color={theme.colors.primaryContent}
bgColor={theme.colors.lightBg}
$contentType='second-text-column'
Expand Down Expand Up @@ -224,7 +223,7 @@ export default function AboutUs() {
$contentType='get-started'
link='mailto:[email protected]'
linkText='Ping us'
$btnColorScheme='inverted-grey'
customBtnClass='inverted-grey'
/>
</RevealContentContainer>
<RevealContentContainer>
Expand Down Expand Up @@ -261,7 +260,7 @@ export default function AboutUs() {
$contentType='questions'
link='/contact'
linkText='Contact us'
$btnColorScheme='inverted-grey'
customBtnClass='inverted-grey'
/>
</RevealContentContainer>
</div>
Expand Down
5 changes: 2 additions & 3 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import RevealContentContainer from '@/components/containers/RevealContentContain
import { useTheme } from 'styled-components';

export default function Home() {

const theme = useTheme();
return (
<>
Expand All @@ -16,7 +15,7 @@ export default function Home() {
altTag='Join the project'
content='Web Dev Path is an open-source initiative that provides hands-on experience in a simulated professional environment to people who seek to begin or move forward in their web development journey.'
link='/about'
$btnColorScheme='inverted-grey'
customBtnClass='inverted-grey'
bgColor={theme.colors.lightBg}
/>
</RevealContentContainer>
Expand Down Expand Up @@ -76,7 +75,7 @@ export default function Home() {
bgColor={theme.colors.primaryContent}
link='/about'
$contentType='non-profit'
$btnColorScheme='inverted-white'
customBtnClass='inverted-white'
/>
</RevealContentContainer>
</>
Expand Down
3 changes: 3 additions & 0 deletions styles/themes.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
:root {
--bg-contact-card: #ffffff;
--bg-color: #eaeaea;
--color-white: #ffffff;
--color-primary-content: #292929;
--color-transparent: transparent;
}

// placeholder colors
Expand Down