Skip to content

Commit f143c5e

Browse files
committed
Merge branch 'main' into refactor/to-scss-RelatedPosts
2 parents 8544bef + 94ef627 commit f143c5e

43 files changed

Lines changed: 638 additions & 771 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,23 +150,44 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
150150
- Added Faith to 'about us'
151151
- Updated Mariana's title in 'about us'
152152
- Updated outdated dependencies
153+
- Added Shayla to 'about us'
153154

154155
### Fixed
155156

156157
- Updated husky script to avoid warning
158+
- Resolved incorrect meta tag rendering for nested routes
159+
- Prevent horizontal page scroll caused by overflowing long titles
157160

158161
### Changed
159162

160163
- Migrating styles from Styled Components to CSS Modules
161-
- ContactUsCard
164+
- ContactUsCards
162165
- ContactUsForm
163166
- ButtonLink
164167
- SubmitButton
165168
- AuthorBio
169+
- BlogTag
166170
- PostContent
167171
- SearchBar
168172
- BlogPostsContainer
173+
- BlogPostContainer
169174
- RevealContentContainer
175+
- Member
176+
- Row
177+
- Container
178+
- Wrapper
179+
- Title
180+
- Decorations/Bracket
181+
- Decorations/Stick
182+
- TwoColumn
170183
- RelatedPosts
184+
- Extracted :root from themes.scss to globals.scss
171185
- Updated ContactUsForm's checkbox wrapper from div to label to enhance its accessibility
172186
- Updated SearchInput width to 100% for better styling
187+
- Updated the prop name to propStyles in Container component to fix the name conflict that introduced a styling bug
188+
- Updated altTag from TwoColumns component to comply with W3C standards
189+
- BlogPostContainer
190+
- about page
191+
- home(index) page
192+
- Created a combineClasses function to clean up conditional class handling
193+
- Rename RowAlignLeft to Row

components/blog/BlogPostContainer/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ import TwoColumn from '@/components/containers/TwoColumn';
33
import AuthorBio from '@/components/blog/AuthorBio';
44
import RelatedOrLatestPosts from '@/components/blog/RelatedPosts';
55
import PostContent from '@/components/blog/PostContent';
6-
import { useTheme } from 'styled-components';
76

87
const BlogPostContainer = ({ post, relatedPosts, latestPosts }) => {
9-
const theme = useTheme();
108
const { user } = post;
119
return (
1210
<>
@@ -27,12 +25,12 @@ const BlogPostContainer = ({ post, relatedPosts, latestPosts }) => {
2725
title='Still got questions?'
2826
content='Feel free to contact us.'
2927
image='/images/svg/square-brackets.svg'
30-
altTag='Hashtag'
31-
color={theme.colors.primaryContent}
32-
bgColor={theme.colors.white}
33-
$contentType='questions'
28+
altTag=''
29+
color='var(--color-primary-content)'
30+
bgColor='var(--color-white)'
3431
link='/contact'
3532
linkText='Contact us'
33+
customInnerClass='questions'
3634
customBtnClass='inverted-grey'
3735
/>
3836
</RevealContentContainer>

components/blog/BlogPostsContainer/BlogPostsContainer.module.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
@use '@/styles/mixins' as *;
2-
@use '@/styles/variables' as *;
1+
@use '@/styles/index' as *;
32

43
.blogContainer {
54
display: flex;

components/blog/BlogPostsContainer/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import Link from 'next/link';
22
import { BlogCardsColumns } from '@/components/containers/CardColumns/BlogCardsColumns';
33
import { BlogCard } from '@/components/containers/Card/BlogCard';
4-
import Title from '@/components/snippets/Title';
54
import RevealContentContainer from '@/components/containers/RevealContentContainer';
65
import { tagToHeading } from '@/utils/blogCategories';
76
import Container from '@/components/containers/Container';
@@ -28,11 +27,11 @@ const BlogPostsContainer = ({
2827
<section className={styles.blogContainer}>
2928
{heading ? (
3029
<Container>
31-
<Title title={heading} />
30+
<h2>{heading}</h2>
3231
</Container>
3332
) : tag ? (
3433
<Container>
35-
<Title title={tagToHeading[tag]} />
34+
<h2>{tagToHeading[tag]}</h2>
3635
</Container>
3736
) : null}
3837
{swipe ? (
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.tagLink {
2+
display: inline-block;
3+
padding: 0.5rem 1rem;
4+
background-color: var(--color-light-bg);
5+
border-radius: 2rem;
6+
font-weight: bold;
7+
}

components/blog/Tag/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
import S from './styles';
1+
import styles from './Tag.module.scss';
2+
import Link from 'next/link';
23

34
export const Tag = ({ text }) => {
4-
return <S.TagLink href={`/blog/category/${text}`}>{text}</S.TagLink>;
5+
return (
6+
<Link href={`/blog/category/${text}`} className={styles.tagLink}>
7+
{text}
8+
</Link>
9+
);
510
};

components/blog/Tag/styles.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

components/buttons/ButtonLink/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import styles from './ButtonLink.module.scss';
2+
import { combineClasses } from '@/utils/classnames';
23

34
export default function ButtonLink({
45
link,
56
children,
67
customBtnClass,
78
openNewTab,
89
}) {
9-
const buttonClass = customBtnClass
10-
? `${styles.buttonLink} ${styles[customBtnClass]}`
11-
: styles.buttonLink;
12-
10+
const buttonClass = combineClasses(styles.buttonLink, customBtnClass, styles);
1311
return (
1412
<a
1513
href={link}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@use '@/styles/variables' as *;
2+
3+
.container {
4+
margin: 0 auto;
5+
width: 90%;
6+
max-width: $large-desktop-breakpoint;
7+
}
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
import S from './styles';
1+
import styles from './Container.module.scss';
22

3-
export default function Container({ className, children, styles }) {
3+
export default function Container({ className, children, styles: propStyles }) {
44
return (
5-
<S.Container className={className} style={styles}>
5+
<div
6+
className={`${styles.container} ${className || ''}`}
7+
style={propStyles}
8+
>
69
{children}
7-
</S.Container>
10+
</div>
811
);
912
}

0 commit comments

Comments
 (0)