Skip to content

Commit df6af83

Browse files
authored
Fix/layout overflow (#981)
* Added more style to the homepage * Added more style to the DevelopmentSection * Added more style to the social media * Replaced twitter icon * Added more style to About and Article Preview sections * Added more style to the Product Element * Added more style to the SearchResultsHeader * Added more style to ProductDetails mobile view
1 parent a001477 commit df6af83

17 files changed

Lines changed: 307 additions & 113 deletions

File tree

src/assets/1-prom-strona.png

-13.6 MB
Loading
-148 Bytes
Loading
154 Bytes
Loading

src/components/About.tsx

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,41 @@ import { SecondaryButton } from './buttons/SecondaryButton';
1010
import { ResponsiveImage } from './images/ResponsiveImage';
1111

1212
import { Text, TitleSection, WrapperSection } from '@Styles/GlobalStyle.css';
13-
import { color, fontSize, margin, padding } from '@Styles/theme';
13+
import { Device, color, fontSize, margin, padding } from '@Styles/theme';
1414

1515
const Wrapper = styled(WrapperSection)`
1616
grid-area: about;
17-
margin: 0;
17+
margin-top: 3rem;
1818
padding: 0;
1919
display: flex;
2020
flex-direction: column-reverse;
21+
text-align: center;
22+
23+
@media ${Device.mobile} {
24+
width: 100%;
25+
margin: 0 0.5rem;
26+
}
2127
`;
2228

2329
const MockUp = styled.div`
2430
height: 100%;
31+
display: flex;
32+
justify-content: center;
2533
2634
.gatsby-image-wrapper {
2735
width: 100%;
36+
img {
37+
width: 100%;
38+
max-width: 100%;
39+
display: block;
40+
41+
}
2842
2943
div {
30-
height: 17.8em !important;
44+
height: 10em !important;
45+
@media ${Device.mobile} {
46+
height: 14em !important;
47+
}
3148
}
3249
}
3350
`;

src/components/CompanyLogo.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ const LogoContainer = styled.div`
88
display: flex;
99
justify-content: center;
1010
align-items: center;
11-
margin-bottom: ${padding.normal};
11+
margin-bottom: ${padding.small};
1212
background-color: ${color.background.lightGray};
1313
border-radius: 0.5rem;
14-
padding: ${padding.normal};
15-
min-height: 80px;
14+
padding: ${padding.tiny};
15+
min-height: 60px;
1616
1717
img {
1818
max-width: 100%;
19-
max-height: 120px;
19+
max-height: 50px;
2020
object-fit: contain;
2121
}
2222
`;

src/components/DevelopmentSection.tsx

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { Device, color, fontSize, margin, padding } from '@Styles/theme';
1616

1717
const Info = styled.div`
1818
width: 100%;
19-
height: 12em;
2019
position: relative;
2120
margin: ${margin.small} 0;
2221
@@ -27,7 +26,6 @@ const Info = styled.div`
2726

2827
const TextSection = styled.div`
2928
margin-right: ${margin.normal};
30-
padding: 0 ${padding.normal};
3129
background-color: ${color.background.white};
3230
display: flex;
3331
flex-direction: column;
@@ -46,8 +44,9 @@ const Texts = styled.div`
4644
`;
4745

4846
const Column = styled(ContentColumn)`
47+
justify-content: flex-start;
4948
align-items: center;
50-
justify-content: center;
49+
gap: ${margin.small};
5150
`;
5251

5352
const Buttons = styled.div`
@@ -56,14 +55,20 @@ const Buttons = styled.div`
5655

5756
const DevelopmentTitle = styled(TitleSection)`
5857
margin-bottom: ${margin.normal};
58+
text-align: center;
5959
`;
6060

6161
const DevelopmentText = styled(Text)`
6262
margin-bottom: ${margin.big};
63+
text-align: center;
6364
`;
6465

6566
const Columns = styled(ColumnsLayout)`
6667
gap: ${margin.normal};
68+
align-items: flex-start;
69+
max-width: 100%;
70+
box-sizing: border-box;
71+
overflow: visible;
6772
`;
6873

6974
const ImgSection = styled.div`
@@ -89,7 +94,7 @@ const Container = styledContainerQuery(Wrapper)`
8994
display: flex;
9095
flex-direction: row;
9196
grid-area: development;
92-
min-height: 16.1em;
97+
min-height: 0;
9398
width: 100%;
9499
95100
@media ${Device.mobile} {
@@ -108,36 +113,9 @@ const Container = styledContainerQuery(Wrapper)`
108113
border-bottom: 8px solid ${color.background.red};
109114
border-right: none;
110115
margin-top: ${margin.small};
111-
112-
${Texts}{
113-
width: 100%;
114-
}
115-
116-
${Info}{
117-
height: 10em;
118-
}
119-
120-
${Columns}{
121-
flex-direction: column;
122-
}
123-
124-
${Column}{
125-
width: 100%;
126-
}
127-
128-
${Info}{
129-
height: 10em;
130-
}
131-
132-
${ImgSection}{
133-
.gatsby-image-wrapper {
134-
picture {
135-
img {
136-
height: 10em !important;
137-
}
138-
}
139-
}
140-
}
116+
${Texts} { width: 100%; }
117+
${Columns} { flex-direction: column; }
118+
${Column} { width: 100%; }
141119
}
142120
`;
143121

src/components/ScoreBar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ interface IScoreBar {
7777
export const ScoreBar: React.FC<IScoreBar> = ({ value, unit, animation, missingValuePlaceholder }) => {
7878
if (value !== undefined) {
7979
const knownValue = value !== null ? value : 0;
80-
const scoreText = unit ? `${knownValue} ${unit}` : knownValue.toString();
8180
return (
8281
<ValueBar value={knownValue} animation={animation}>
8382
<div className="value-belt" data-testid="value-belt" />

src/components/ScoreGauge.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import styled, { keyframes } from "styled-components";
33
import { lighten } from "polished";
44

55
import { seconds } from "app/generics";
6-
import { color, fontSize } from "@Styles/theme";
6+
import { Device, color, fontSize } from "@Styles/theme";
77

88
export interface IAnimation {
99
duration: seconds;
@@ -55,6 +55,11 @@ const GaugeWrapper = styled.div`
5555
display: flex;
5656
align-items: center;
5757
justify-content: center;
58+
@media ${Device.mobile} {
59+
width: ${SIZE * 0.5}px;
60+
height: ${SIZE * 0.5}px;
61+
margin-top: 10px;
62+
}
5863
5964
.label {
6065
position: absolute;
@@ -63,6 +68,10 @@ const GaugeWrapper = styled.div`
6368
z-index: 2;
6469
text-align: center;
6570
top: 32px;
71+
@media ${Device.mobile} {
72+
font-size: 14px;
73+
top: 10px;
74+
}
6675
}
6776
6877
.subtitle {
@@ -73,6 +82,10 @@ const GaugeWrapper = styled.div`
7382
font-size: 12px;
7483
color: ${color.text ? color.text.primary : "#000"};
7584
z-index: 2;
85+
@media ${Device.mobile} {
86+
font-size: 10px;
87+
top: 40px;
88+
}
7689
}
7790
`;
7891

src/components/social-media/SocialMedia.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ const Items = styled.div`
1313
display: flex;
1414
flex-direction: row;
1515
width: 80%;
16-
float: left;
1716
1817
@media ${Device.mobile} {
1918
width: 100%;
@@ -44,8 +43,11 @@ const Container = styledContainerQuery.div`
4443
height: 100%;
4544
grid-area: social-media;
4645
display: flex;
46+
flex-direction: column;
4747
align-items: center;
4848
justify-content: center;
49+
margin-bottom: 20px;
50+
gap: 40px;
4951
5052
@media ${Device.mobile} {
5153
padding: 30px 0;
@@ -75,7 +77,6 @@ const SocialMedia = () => {
7577
<Facebook />
7678
<Instagram />
7779
<Twitter />
78-
<Item />
7980
</Items>
8081
</Container>
8182
);

src/layout/footer/CommunitySections.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Facebook, Instagram, Twitter } from 'components/social-media/Icons';
22
import * as React from 'react';
33
import styled from 'styled-components';
4-
import { Device, padding } from 'styles/theme';
4+
import { Device, padding, textAlign } from 'styles/theme';
55
import { TextExternalLink, TextLink } from 'utils/browser/links';
66

77
import { urls } from '@App/website';
@@ -48,7 +48,7 @@ export const CommunitySections: React.FC<ICommunitySections> = (props) => (
4848
<TextLink label="Polityka prywatności" href={urls.pola.privacyPolicy()} />
4949
<TextExternalLink label="Uzupełnij dane o firmie" url={urls.external.links.newCompanyForm} />
5050
</FooterSection>
51-
<FooterSection title="Śledź nas na:">
51+
<FooterSection title="Śledź nas na:" textAlign="center">
5252
<div className="social-rows">
5353
<Facebook type="filled" />
5454
<Instagram type="filled" />

0 commit comments

Comments
 (0)