Skip to content

Commit

Permalink
Use Claude's suggestion on layout
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuamotoaki committed Nov 8, 2024
1 parent 5370b3b commit ec584b3
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -84,34 +84,40 @@ import { AstroSeo } from "@astrolib/seo";
.app-grid {
display: grid;
gap: 2rem;

grid-template-columns: 1fr;

article {
grid-column: span 2;
width: 100%;
}

@media (min-width: 768px) {
grid-template-columns: repeat(4, 1fr);


@media screen and (min-width: 768px) {
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
max-width: 100%;

article {
grid-column: span 2;
}

article:last-child:nth-child(2n - 1) {
grid-column-end: -2;
}
}

@media (min-width: 1280px) {
@media screen and (min-width: 1280px) {
grid-template-columns: repeat(6, 1fr);

article:last-child:nth-child(2n - 1) {
grid-column-end: auto
grid-column-end: auto;
}

article:last-child:nth-child(3n - 1) {
grid-column-end: -2;
}

article:nth-last-child(2):nth-child(3n + 1) {
grid-column-end: 4;
}

article:last-child:nth-child(3n - 2) {
grid-column-end: 5;
}
Expand Down

0 comments on commit ec584b3

Please sign in to comment.