Skip to content

Commit a24d99c

Browse files
author
Ali Obaji
committed
feat(home): now ipad responsive
1 parent 25f8b53 commit a24d99c

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed

pages/home.css

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,26 @@
4949

5050
.container .cards-deck {
5151
display: grid;
52-
grid-template-columns: repeat(auto-fill, 340px);
52+
grid-template-columns: repeat(auto-fill, 100%);
5353
grid-auto-rows: 450px;
5454

5555
grid-gap: 20px;
5656
}
5757

58-
@media (min-width: 991px) {
58+
@media (min-width: 768px) {
59+
.container {
60+
grid-template-rows: auto 12rem auto;
61+
}
5962

63+
.container .cards-deck {
64+
grid-template-columns: repeat(auto-fill, 320px);
65+
}
66+
}
67+
68+
@media (min-width: 991px) {
69+
.container {
70+
grid-template-rows: auto 33rem auto;
71+
}
6072
}
6173

6274
@media (min-width: 1200px) {

pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ IndexPage.getInitialProps = async ({query}) => {
8383
const {entries, total, skip, limit} = await getBlogPostEntries({
8484
tag: query.tag ? query.tag.toString() : '',
8585
skip: page - 1,
86-
limit: 1,
86+
limit: 2,
8787
});
8888

8989
// TODO: need to move outside

shared/components/footer/styles.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ footer .dev-team {
1212
color: red;
1313
}
1414

15+
@media (min-width: 768px) {
16+
footer {
17+
padding: 1rem 3rem;
18+
}
19+
}
20+
1521
@media (min-width: 1200px) {
1622
footer {
1723
padding: 1rem 5.5rem;

shared/components/layout/layout.component.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
padding: 2rem 1rem;
33
}
44

5+
@media (min-width: 768px) {
6+
.layout {
7+
padding: 2rem 3rem;
8+
}
9+
}
10+
511
@media (min-width: 1200px) {
612
.layout {
713
padding: 2rem 2.5rem;

0 commit comments

Comments
 (0)