Skip to content

Commit 2ce6b82

Browse files
committed
Fix: Responsivness
1 parent c7f1323 commit 2ce6b82

3 files changed

Lines changed: 22 additions & 7 deletions

File tree

src/App.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
display: flex;
99
flex-direction: column;
1010
max-width: 1024px;
11-
width: 100%;
11+
width: 96%;
12+
padding: 0 2%;
1213
}
1314
}
1415

@@ -38,9 +39,6 @@ div.filters {
3839
display: flex;
3940
align-items: center;
4041
justify-content: center;
41-
@media screen and (max-width: 480px) {
42-
flex-direction: column;
43-
}
4442
}
4543

4644
code {

src/components/Header.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,23 @@ const StyledHeader = styled.header`
3131
padding: 0px 12px 0 2px;
3232
border-radius: 20px;
3333
}
34+
@media screen and (max-width: 600px) {
35+
.logo {
36+
position: relative;
37+
top: 4px;
38+
svg {
39+
width: 80%;
40+
}
41+
}
42+
.filters {
43+
.search-input {
44+
width: 100px !important;
45+
}
46+
.show-count {
47+
display: none;
48+
}
49+
}
50+
}
3451
`;
3552

3653
const Header = ({ location, session, history, setSession }) => {
@@ -41,7 +58,7 @@ const Header = ({ location, session, history, setSession }) => {
4158

4259
return (
4360
<StyledHeader>
44-
<a onClick={() => history.push("/posts")}>
61+
<a className="logo" onClick={() => history.push("/posts")}>
4562
<Logo />
4663
</a>
4764
{location.pathname === "/posts" && <Filters />}

src/components/posts/Filters.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const Filters = ({ setFilter, filters, meta, tagList = [], postCount }) => {
5050
<Search
5151
size="small"
5252
allowClear
53-
className="field-width"
53+
className="field-width search-input"
5454
placeholder="Search..."
5555
defaultValue={search}
5656
onSearch={(value) => setFilter({ search: value })}
@@ -71,7 +71,7 @@ const Filters = ({ setFilter, filters, meta, tagList = [], postCount }) => {
7171
))}
7272
</Select> */}
7373
{meta && (
74-
<div>
74+
<div className="show-count">
7575
Showing {postCount} of {meta.count} posts.
7676
</div>
7777
)}

0 commit comments

Comments
 (0)