Skip to content

Commit

Permalink
Merge pull request #9 from FireIsGood/fix-projects
Browse files Browse the repository at this point in the history
Fix projects page images for mobile
  • Loading branch information
hazelthatsme authored Apr 30, 2024
2 parents 5c130aa + a32673a commit 4ea13fe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/components/project.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const { title, image, url, url_text, content } = Astro.props;

<style>
.project {
display: flex;
flex-direction: row;
display: grid;
grid-template-columns: auto 1fr;
align-items: center;
gap: 1rem;
margin: 1rem 0;
Expand All @@ -31,4 +31,13 @@ const { title, image, url, url_text, content } = Astro.props;
.project h2 {
margin: 0;
}
</style>

@media (width < 800px) {
.project {
grid-template-columns: 1fr;
}
.project .thumbnail {
max-height: unset;
}
}
</style>
5 changes: 5 additions & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ pre {
pre code {
background-color: transparent;
}

img {
max-width: 100%;
max-height: 100%;
}

0 comments on commit 4ea13fe

Please sign in to comment.