Skip to content

Commit

Permalink
(#471) Refine image layout on the About page for mobile devices:
Browse files Browse the repository at this point in the history
- Updated image grid to span full width on mobile.
- In the staff section, images remain aligned to the left, with text on the right. When the text exceeds the image height, it wraps beneath and occupies full width for better readability.
  • Loading branch information
marceloams committed Oct 9, 2024
1 parent 2ab7219 commit c4b53cb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
17 changes: 10 additions & 7 deletions src/components/about/PageTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,21 @@ const PageTemplateWrapper = styled.article`
}
@media ${({ theme }) => theme.device.mobile} {
display: flex;
flex-direction: column;
align-items: center;
overflow: hidden;
margin-top: 20px;
img {
max-width: 100%;
height: auto;
height: 100%;
float: left;
clear: left;
}
}
p {
margin-bottom: 12px;
}
.div-aux {
float: left;
width: 0px;
height: 170px;
}
}
`
Expand Down
6 changes: 3 additions & 3 deletions src/components/about/PhotoGridUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styled from 'styled-components/macro'

const Grid = styled.div`
@media ${({ theme }) => theme.device.mobile} {
grid-template-columns: repeat(2, minmax(0, 160px));
grid-template-columns: repeat(2, 1fr);
gap: 6px;
margin-top: 17px;
margin-bottom: 17px;
Expand All @@ -22,8 +22,8 @@ const Grid = styled.div`
const Image = styled.img`
@media ${({ theme }) => theme.device.mobile} {
width: 100%;
max-width: 160px;
height: 94px;
max-height: 250px;
height: auto;
}
@media ${({ theme }) => theme.device.desktop} {
width: 156px;
Expand Down
10 changes: 10 additions & 0 deletions src/components/about/ProjectPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const Project = () => (
<h2>Staff</h2>
<div className="content">
<img src="https://fallingfruit.org/ethan_welty.jpg" alt="" />
<div className="div-aux"></div>
<p>
<em>Executive Director</em>
<br />
Expand Down Expand Up @@ -136,6 +137,7 @@ const Project = () => (
<h2>Board of directors</h2>
<div className="content">
<img src="https://fallingfruit.org/jeff_wanner.jpg" alt="" />
<div className="div-aux"></div>
<p>
<em>President</em>
<br />
Expand All @@ -158,6 +160,7 @@ const Project = () => (
</div>
<div className="content">
<img src="https://fallingfruit.org/craig_durkin.jpg" alt="" />
<div className="div-aux"></div>
<p>
<b>Craig Durkin</b>
<br />
Expand All @@ -176,6 +179,7 @@ const Project = () => (
</div>
<div className="content">
<img src="https://fallingfruit.org/emily_sigman.jpg" alt="" />
<div className="div-aux"></div>
<p>
<b>Emily Sigman</b>
<br />
Expand Down Expand Up @@ -204,6 +208,7 @@ const Project = () => (
<h2>Board of advisors</h2>
<div className="content">
<img src="https://fallingfruit.org/alan_gibson.jpg" alt="" />
<div className="div-aux"></div>
<p>
<b>Alan Gibson</b>
<br />
Expand All @@ -226,6 +231,7 @@ const Project = () => (
</div>
<div className="content">
<img src="https://fallingfruit.org/ana_carolina_de_lima.jpg" alt="" />
<div className="div-aux"></div>
<p>
<b>Ana Carolina de Lima</b>
<br />
Expand All @@ -246,6 +252,7 @@ const Project = () => (
</div>
<div className="content">
<img src="https://fallingfruit.org/caleb_phillips.jpg" alt="" />
<div className="div-aux"></div>
<p>
<b>Caleb Phillips</b>
<br />
Expand All @@ -269,6 +276,7 @@ const Project = () => (
</div>
<div className="content">
<img src="https://fallingfruit.org/cristina_rubke.jpg" alt="" />
<div className="div-aux"></div>
<p>
<b>Cristina Rubke</b>
<br />
Expand All @@ -295,6 +303,7 @@ const Project = () => (
</div>
<div className="content">
<img src="https://fallingfruit.org/david_craft.jpg" alt="" />
<div className="div-aux"></div>
<p>
<b>David Craft</b>
<br />
Expand All @@ -315,6 +324,7 @@ const Project = () => (
</div>
<div className="content">
<img src="https://fallingfruit.org/tristram_stuart.jpg" alt="" />
<div className="div-aux"></div>
<p>
<b>Tristram Stuart</b>
<br />
Expand Down

0 comments on commit c4b53cb

Please sign in to comment.