Skip to content

Commit 080c340

Browse files
authored
Fixes teaser i provide (#202)
1 parent d60626f commit 080c340

2 files changed

Lines changed: 16 additions & 11 deletions

File tree

src/app/components/Provide.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const ProvideBody = styled(Body)`
118118
margin: 0;
119119
120120
@media (max-width: ${ProvideBreakpoint}) {
121-
font-size: 12px;
121+
font-size: 13px;
122122
}
123123
`;
124124

src/app/components/Trailer.tsx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ const ConsolesDiv = styled.div`
2222
display: flex;
2323
justify-content: space-around;
2424
gap: 30px;
25+
width: 100%;
2526
2627
@media (max-width: ${MobileBreakpoint}) {
2728
flex-direction: column;
29+
align-items: center;
2830
}
2931
`;
3032

@@ -52,22 +54,25 @@ const Agrupar = styled.div`
5254
align-items: center;
5355
justify-content: center;
5456
width: 100%;
57+
text-align: center;
5558
`;
5659

5760
const EnvelopeContainer = styled.div<{ isOpen?: boolean }>`
5861
position: relative;
59-
width: 500px;
60-
height: ${(props) => (props.isOpen ? 550 : 350)}px;
62+
width: min(500px, calc(50vw - 80px));
63+
height: auto;
64+
aspect-ratio: 500 / ${(props) => (props.isOpen ? 550 : 350)};
6165
display: flex;
6266
align-items: center;
6367
justify-content: center;
64-
transition: height 0.3s ease;
68+
transition: aspect-ratio 0.3s ease;
69+
margin: 0 auto;
70+
box-sizing: border-box;
6571
6672
@media (max-width: ${MobileBreakpoint}) {
67-
width: 90vw;
68-
height: ${(props) => (props.isOpen ? "auto" : "auto")};
73+
width: 100%;
74+
max-width: 500px;
6975
min-width: 200px;
70-
aspect-ratio: 500 / ${(props) => (props.isOpen ? 550 : 350)};
7176
}
7277
`;
7378

@@ -140,10 +145,10 @@ export default function Trailer() {
140145
alt="Open teaser"
141146
width={500}
142147
height={teaserOpen ? 550 : 350}
143-
onClick={() => !teaserOpen && setTeaserOpen(true)}
148+
onClick={() => setTeaserOpen((open) => !open)}
144149
style={{
145150
zIndex: 1,
146-
cursor: teaserOpen ? "default" : "pointer",
151+
cursor: "pointer",
147152
}}
148153
priority
149154
/>
@@ -178,10 +183,10 @@ export default function Trailer() {
178183
alt="Open aftermovie"
179184
width={500}
180185
height={aftermovieOpen ? 550 : 350}
181-
onClick={() => !aftermovieOpen && setAftermovieOpen(true)}
186+
onClick={() => setAftermovieOpen((open) => !open)}
182187
style={{
183188
zIndex: 1,
184-
cursor: aftermovieOpen ? "default" : "pointer",
189+
cursor: "pointer",
185190
}}
186191
priority
187192
/>

0 commit comments

Comments
 (0)