diff --git a/components/Projects.module.scss b/components/Projects.module.scss index d8019c7dbd..ddca4664da 100644 --- a/components/Projects.module.scss +++ b/components/Projects.module.scss @@ -10,18 +10,17 @@ } .project { - position: relative; max-width: 900px; margin: 0 auto 30px auto; - overflow: hidden; background: #fff; border-radius: 4px; + display: flex; } .projectImage { - float: left; - max-width: 300px; - height: 300px; + width: 30%; + min-width: 300px; + aspect-ratio: 1; overflow: hidden; img { @@ -32,11 +31,11 @@ } .projectInfo { - position: absolute; - top: 50%; - transform: translateY(-50%); - margin-left: 300px; padding: 15px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; h3 { font-size: 1.5em; @@ -62,6 +61,7 @@ .projectLogos { display: flex; + flex-wrap: wrap; justify-content: center; padding: 10px; } @@ -83,7 +83,17 @@ @media only screen and (max-width: 768px) { .projectImage { - display: none; + width: 100%; + height: 20vh; + aspect-ratio: unset; + + img { + height: unset; + width: 100%; + } + } + .project { + flex-direction: column; } .projectInfo { position: relative; diff --git a/components/Projects.tsx b/components/Projects.tsx index 0519a2a03a..78bffdcc0d 100644 --- a/components/Projects.tsx +++ b/components/Projects.tsx @@ -82,18 +82,20 @@ function ProjectItem({
{getMultilingualContent(description, locale)}