Skip to content

Commit

Permalink
Merge pull request #483 from SStan-prog/scott-stanfel-patch-4
Browse files Browse the repository at this point in the history
improve speaker cropping on mobile/tablet
  • Loading branch information
martinheidegger authored Nov 7, 2024
2 parents 8eaa419 + f02dd3f commit 3c72ebd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions 2024/src/styled.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ declare module "styled-components" {
subTitle: string
}
breakpoints: {
mobileSm: string
mobile: string
largerThanMobile: string
}
Expand Down
14 changes: 10 additions & 4 deletions 2024/src/templates/speaker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ type Props = {
}

const SpeakerBox = styled.div`
display: flex;
flex-direction: row;
display: grid;
grid-template-columns: 25% 1fr;
margin: 2em 0;
padding: 0 2.5rem;
${({ theme }) => theme.breakpoints.mobile} {
grid-template-columns: 45% 1fr;
}
${({ theme }) => theme.breakpoints.mobileSm} {
display: flex;
flex-direction: column;
}
`
Expand All @@ -48,13 +53,14 @@ const SpeakerSide = styled.div`
font-size: 1.8rem;
margin: 0 3em;
${({ theme }) => theme.breakpoints.mobile} {
${({ theme }) => theme.breakpoints.mobileSm} {
margin: 2em 0;
}
`
const Avatar = styled(Image)`
width: 100%;
max-width: 273px;
aspect-ratio: 1 / 1;
${({ theme }) => theme.breakpoints.mobile} {
max-width: 100%;
Expand Down
1 change: 1 addition & 0 deletions 2024/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const theme: DefaultTheme = {
subTitle: "2.6rem",
},
breakpoints: {
mobileSm: "@media (max-width: 600px)",
mobile: "@media (max-width: 860px)",
largerThanMobile: "@media (min-width: 861px)",
},
Expand Down

0 comments on commit 3c72ebd

Please sign in to comment.