diff --git a/2024/src/styled.d.ts b/2024/src/styled.d.ts index 19667354..389dfc26 100644 --- a/2024/src/styled.d.ts +++ b/2024/src/styled.d.ts @@ -41,6 +41,7 @@ declare module "styled-components" { subTitle: string } breakpoints: { + mobileSm: string mobile: string largerThanMobile: string } diff --git a/2024/src/templates/speaker.tsx b/2024/src/templates/speaker.tsx index 80b8b47a..a1678dc6 100644 --- a/2024/src/templates/speaker.tsx +++ b/2024/src/templates/speaker.tsx @@ -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; } ` @@ -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%; diff --git a/2024/src/theme.ts b/2024/src/theme.ts index f446329d..472a9196 100644 --- a/2024/src/theme.ts +++ b/2024/src/theme.ts @@ -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)", },