Skip to content

Commit bd6d3ff

Browse files
Merge pull request #154 from Web-Dev-Path/fix/blog-search-styling
Adjusting blog container and titles styling
2 parents b21f6e1 + 013cf4f commit bd6d3ff

File tree

7 files changed

+27
-31
lines changed

7 files changed

+27
-31
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
8282
## Unreleased
8383

8484
### Added
85+
8586
- Blog page which pulls content from dev.to
8687

8788
### Fixed
8889

8990
- replaced next/legacy/image with next/image
9091
- removed unused function in api/register.js
9192
- adjusted contact form message on mobile
92-
93+
- blog container and title styling

components/blog/BlogPostsContainer.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,14 @@ const BlogPostsContainer = ({
5555
)
5656
}
5757
{viewall && posts.length >= 3 ? (
58-
<Link
59-
className={styles.viewAll}
60-
href={tag ? `/blog/category/${tag}` : '/blog/category/all'}
61-
>
62-
view all
63-
</Link>
58+
<Container>
59+
<Link
60+
className={styles.viewAll}
61+
href={tag ? `/blog/category/${tag}` : '/blog/category/all'}
62+
>
63+
view all
64+
</Link>
65+
</Container>
6466
) : null}
6567
</div>
6668
</RevealContentContainer>

pages/blog/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ export default function Blog({ posts }) {
1515
<>
1616
<div className={styles.blogSearch}>
1717
<Title customClass='blogTitle' title='Latest Posts' />
18-
{/*
19-
<SearchBar />
20-
*/}
18+
{/* <SearchBar /> */}
2119
</div>
2220
<BlogPostsContainer posts={latestPosts} />
2321
<BlogPostsContainer posts={nextJsPosts} tag='nextjs' />

styles/Blog.module.scss

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,32 @@
44
.blogContainer {
55
display: flex;
66
flex-direction: column;
7+
margin: 3rem 0;
78
}
89

910
.viewAll {
1011
font-size: 1.5rem;
1112
font-weight: bold;
12-
margin: -6rem 6.5rem 4rem 0;
13-
text-align: right;
13+
position: relative;
14+
top: -3rem;
15+
display: block;
16+
text-align: center;
1417

15-
@include mobile {
16-
text-align: center;
17-
margin: -5rem auto 4rem auto;
18+
@include desktop {
19+
float: right;
20+
top: -5rem;
1821
}
1922
}
2023

2124
.blogSearch {
2225
display: flex;
23-
justify-content: space-between;
2426
align-items: center;
27+
padding-top: 2.5rem;
28+
margin-bottom: -2.5rem;
29+
//TO-DO: Add the style below back when implementing search functionality
30+
// margin: 0 auto;
31+
// width: 90%;
32+
// max-width: $large-desktop-breakpoint;
2533

2634
@include mobile {
2735
flex-direction: column-reverse;

styles/CardsColumns.module.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
.swiper {
1616
margin-bottom: 5rem;
17-
padding: 0 1rem;
1817

1918
:global(.swiper-pagination-bullet-active) {
2019
background-color: $dark-bg-color;

styles/SearchBar.module.scss

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,9 @@
1111
box-shadow: 2px 4px 8px 3px rgba(0, 0, 0, 0.08);
1212
font-size: 1.2rem;
1313

14-
@include tablet {
15-
margin-right: 4rem;
16-
}
17-
18-
@include desktop {
19-
margin-right: 4.5rem;
20-
}
21-
22-
@include medium-desktop {
23-
margin-right: 6rem;
24-
}
25-
2614
@include mobile {
2715
width: 80%;
28-
margin: 3rem auto 0 auto;
16+
margin: 3rem auto;
2917
}
3018

3119
input[type='search'] {

styles/Title.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
.title {
55
&.blogTitle {
66
align-self: flex-start;
7-
margin: 0 auto;
7+
margin: 0 auto 1rem;
88
width: 90%;
99
max-width: $large-desktop-breakpoint;
1010
}

0 commit comments

Comments
 (0)