Skip to content

Commit

Permalink
style: adjust grid layout and responsive design in ranking page
Browse files Browse the repository at this point in the history
  • Loading branch information
jagcruz committed Sep 9, 2024
1 parent 977e257 commit 0d11938
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/layouts/Base.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
/*
Breakpoints:
- Extra Small: 411px
- Small: 640px
- Medium: 768px
- Large: 1024px
Expand Down
19 changes: 14 additions & 5 deletions src/pages/ranking/[user].astro
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,8 @@ const totalCards = formatNumber(cards.length, DIGITS);
}

.user-wrapper {
grid-column: 1 / 2;
position: sticky;
top: 4.7rem;
height: 56vh;
position: relative;
grid-column: 1 / 3;
display: flex;
flex-direction: column;
align-items: center;
Expand All @@ -101,6 +99,13 @@ const totalCards = formatNumber(cards.length, DIGITS);
background-color: var(--card-bgcolor-1);
font-family: var(--font-family-primary);

@media (width > 640px) {
grid-column: 1 / 2;
position: sticky;
top: 4.7rem;
height: 56vh;
}

& .back-button {
z-index: 10;
padding: 0.5rem;
Expand Down Expand Up @@ -228,11 +233,15 @@ const totalCards = formatNumber(cards.length, DIGITS);
}

.cards-wrapper {
grid-column: 2 / 3;
grid-column: 1 / 3;
display: flex;

border-color: var(--primary-color);
background-color: #0a0514;

@media (width > 640) {
grid-column: 2 / 3;
}
}
}

Expand Down

0 comments on commit 0d11938

Please sign in to comment.