Преглед изворни кода

Static pages responsive

feature/1726
jovan.cirkovic пре 3 година
родитељ
комит
e24c822979

+ 3
- 1
src/components/About/AboutComponent.js Прегледај датотеку

import SectionImage2 from "../../assets/images/about/about-2.png"; import SectionImage2 from "../../assets/images/about/about-2.png";
import CheckOffersButton from "./CheckOffersButton/CheckOffersButton"; import CheckOffersButton from "./CheckOffersButton/CheckOffersButton";
import { AboutComponentContainer } from "./AboutComponent.styled"; import { AboutComponentContainer } from "./AboutComponent.styled";
import useIsMobile from "../../hooks/useIsMobile";


const AboutComponent = forwardRef((props, ref) => { const AboutComponent = forwardRef((props, ref) => {
const { isMobile } = useIsMobile();
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<AboutComponentContainer ref={ref}> <AboutComponentContainer ref={ref}>
image={SectionImage2} image={SectionImage2}
reverse reverse
/> />
<CheckOffersButton />
{!isMobile && <CheckOffersButton />}
</AboutComponentContainer> </AboutComponentContainer>
); );
}); });

+ 24
- 3
src/components/About/AboutHeader/AboutHeader.styled.js Прегледај датотеку



export const AboutHeaderContainer = styled(Box)` export const AboutHeaderContainer = styled(Box)`
margin: 72px; margin: 72px;

@media (max-width: 1200px) {
margin: 36px;
}

@media (max-width: 600px) {
margin: 52px 36px 36px 36px;
}
`; `;
export const AboutHeaderTitle = styled(Typography)` export const AboutHeaderTitle = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
font-size: 72px; font-size: 72px;
line-height: 98px; line-height: 98px;
color: ${selectedTheme.colors.primaryPurple}; color: ${selectedTheme.colors.primaryPurple};

@media (max-width: 600px) {
font-size: 36px;
line-height: 49px;
}
`; `;
export const AboutHeaderParagraph = styled(Typography)` export const AboutHeaderParagraph = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
font-size: 16px; font-size: 16px;
line-height: 22px; line-height: 22px;
color: ${selectedTheme.colors.primaryGrayText}; color: ${selectedTheme.colors.primaryGrayText};

@media (max-width: 600px) {
font-size: 14px;
}
`; `;
export const AboutHeaderLine = styled(Box)` export const AboutHeaderLine = styled(Box)`
border-top: 1px solid ${selectedTheme.colors.iconYellowColor};
width: 90px;
margin-bottom: 26px;
border-top: 1px solid ${selectedTheme.colors.iconYellowColor};
width: 90px;
margin-bottom: 26px;

@media (max-width: 600px) {
width: 54px;
}
`; `;

+ 10
- 3
src/components/About/AboutSection/AboutSection.js Прегледај датотеку

AboutSectionText, AboutSectionText,
AboutSectionTextContainer, AboutSectionTextContainer,
AboutSectionTitle, AboutSectionTitle,
CheckButton,
} from "./AboutSection.styled"; } from "./AboutSection.styled";


const AboutSection = (props) => { const AboutSection = (props) => {
console.log(props);
return ( return (
<AboutSectionContainer reverse={props.reverse}> <AboutSectionContainer reverse={props.reverse}>
<AboutSectionTextContainer> <AboutSectionTextContainer>
<AboutSectionTitle>{props.title}</AboutSectionTitle>
<AboutSectionText>{props.text}</AboutSectionText>
<AboutSectionTitle reverse={props.reverse}>
{props.title}
</AboutSectionTitle>
<AboutSectionText reverse={props.reverse}>
{props.text}
</AboutSectionText>
</AboutSectionTextContainer> </AboutSectionTextContainer>
<AboutSectionImage src={props.image} />
{props.reverse && <CheckButton />}
<AboutSectionImage src={props.image} reverse={props.reverse} />
</AboutSectionContainer> </AboutSectionContainer>
); );
}; };

+ 64
- 0
src/components/About/AboutSection/AboutSection.styled.js Прегледај датотеку

import { Box, Typography } from "@mui/material"; import { Box, Typography } from "@mui/material";
import styled from "styled-components"; import styled from "styled-components";
import selectedTheme from "../../../themes"; import selectedTheme from "../../../themes";
import CheckOffersButton from "../CheckOffersButton/CheckOffersButton";


export const AboutSectionContainer = styled(Box)` export const AboutSectionContainer = styled(Box)`
${(props) => ${(props) =>
flex-direction: ${(props) => (props.reverse ? "row-reverse" : "row")}; flex-direction: ${(props) => (props.reverse ? "row-reverse" : "row")};
gap: 144px; gap: 144px;
margin-bottom: 72px; margin-bottom: 72px;

@media (max-width: 1069px) {
flex-direction: column;
}

@media (max-width: 1200px) {
${(props) =>
props.reverse
? `
margin-right: 36px
`
: `margin-left: 36px`};
}

@media (max-width: 1319px) {
gap: 54px;
}

@media (max-width: 600px) {
flex-direction: column;
margin-left: 0;
margin-right: 0;
margin-bottom: 36px;
gap: 27px;
${(props) => props.reverse && `text-align: right;`}
}
`; `;
export const AboutSectionTitle = styled(Typography)` export const AboutSectionTitle = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
line-height: 33px; line-height: 33px;
color: ${selectedTheme.colors.primaryPurple}; color: ${selectedTheme.colors.primaryPurple};
margin-bottom: 18px; margin-bottom: 18px;

@media (max-width: 1069px) {
${(props) => props.reverse && `margin-left: 36px;`}
}

@media (max-width: 600px) {
font-size: 18px;
}
`; `;
export const AboutSectionText = styled(Typography)` export const AboutSectionText = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
font-size: 16px; font-size: 16px;
line-height: 22px; line-height: 22px;
color: ${selectedTheme.colors.primaryGrayText}; color: ${selectedTheme.colors.primaryGrayText};

@media (max-width: 1069px) {
${(props) => props.reverse && `margin-left: 36px;`}
}

@media (max-width: 1160px) {
${(props) => props.reverse && `padding-bottom: 20px;`}
}

@media (max-width: 600px) {
font-size: 14px;
${(props) => props.reverse && `padding-bottom: 0;`}
}
`; `;
export const AboutSectionImage = styled.img` export const AboutSectionImage = styled.img`
display: flex; display: flex;
width: 648px; width: 648px;
height: 345px; height: 345px;
object-fit: cover; object-fit: cover;

@media (max-width: 1069px) {
width: 100%;
${(props) => props.reverse && `padding-bottom: 36px`}
}

@media (max-width: 600px) {
width: 100%;
${(props) =>
!props.reverse ? `padding-left: 36px` : `padding-right: 36px`}
}
`; `;
export const AboutSectionTextContainer = styled(Box)` export const AboutSectionTextContainer = styled(Box)`
display: flex; display: flex;
flex: 1; flex: 1;
flex-direction: column; flex-direction: column;

@media (max-width: 600px) {
margin: 0 36px;
}
`; `;
export const CheckButton = styled(CheckOffersButton)``;

+ 15
- 0
src/components/About/CheckOffersButton/CheckOffersButton.styled.js Прегледај датотеку

color: white; color: white;
background-color: ${selectedTheme.colors.primaryPurple} !important; background-color: ${selectedTheme.colors.primaryPurple} !important;
} }

@media (max-width: 1160px) {
bottom: -16px;
}

@media (max-width: 1200px) {
right: 16px;
}

@media (max-width: 600px) {
position: relative;
bottom: 0;
right: 18px;
align-self: flex-end;
}
`; `;

+ 18
- 0
src/components/Footer/AboutFooter.styled.js Прегледај датотеку

display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 0 72px; padding: 0 72px;

@media (max-width: 600px) {
height: 91px;
padding: 0 36px;
}
`; `;
export const AboutFooterText = styled(Typography)` export const AboutFooterText = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
text-align: center; text-align: center;
position: relative; position: relative;
top: 61px; top: 61px;

@media (max-width: 600px) {
font-size: 14px;
top: 30px;
}
`; `;
export const ButtonContainer = styled(Link)` export const ButtonContainer = styled(Link)`
width: fit-content; width: fit-content;
text-align: right; text-align: right;
position: relative; position: relative;
top: 29px; top: 29px;

@media (max-width: 600px) {
top: -38px;
}
`; `;
export const LinkText = styled(Typography)` export const LinkText = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
color: ${selectedTheme.colors.primaryGrayText}; color: ${selectedTheme.colors.primaryGrayText};
position: relative; position: relative;
top: 8px; top: 8px;

@media (max-width: 600px) {
display: none;
}
`; `;


export const Arrow = styled(ArrowButton)` export const Arrow = styled(ArrowButton)`

+ 5
- 1
src/components/Header/AboutHeader/AboutHeader.styled.js Прегледај датотеку

export const LinkRoute = styled(Link)` export const LinkRoute = styled(Link)`
text-decoration: none; text-decoration: none;
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
font-weight: ${props => props.selected ? "600" : "400"};
font-weight: ${(props) => (props.selected ? "600" : "400")};
font-size: 16px; font-size: 16px;
line-height: 22px; line-height: 22px;
letter-spacing: 0.02em; letter-spacing: 0.02em;
&:hover { &:hover {
border-bottom: 1px solid ${selectedTheme.colors.iconYellowColor}; border-bottom: 1px solid ${selectedTheme.colors.iconYellowColor};
} }

@media (max-width: 600px) {
display: none;
}
`; `;

+ 36
- 0
src/components/Prices/Plan/Plan.styled.js Прегледај датотеку

${(props) => !props.highlighted && `margin-top: 36px;`} ${(props) => !props.highlighted && `margin-top: 36px;`}
${(props) => ${(props) =>
props.highlighted && `box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.12);`} props.highlighted && `box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.12);`}

@media (max-width: 600px) {
min-width: 303px;
width: 100%;
height: fit-content;
padding: 36px 18px;
margin-top: 0;
}
`; `;
export const PlanTitle = styled(Typography)` export const PlanTitle = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
margin-top: 7px; margin-top: 7px;
color: ${(props) => color: ${(props) =>
props.highlighted ? "white" : selectedTheme.colors.primaryGrayText}; props.highlighted ? "white" : selectedTheme.colors.primaryGrayText};

@media (max-width: 600px) {
font-size: 14px;
}
`; `;
export const PlanPriceContainer = styled(Box)` export const PlanPriceContainer = styled(Box)`
width: 100%; width: 100%;
flex: 1; flex: 1;
color: ${(props) => color: ${(props) =>
props.highlighted ? "white" : selectedTheme.colors.primaryPurple}; props.highlighted ? "white" : selectedTheme.colors.primaryPurple};

@media (max-width: 600px) {
font-size: 18px;
}
`; `;
export const PlanPriceMonthly = styled(Typography)` export const PlanPriceMonthly = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
props.highlighted props.highlighted
? selectedTheme.colors.iconProfileColor ? selectedTheme.colors.iconProfileColor
: selectedTheme.colors.primaryGrayText}; : selectedTheme.colors.primaryGrayText};

@media (max-width: 600px) {
font-size: 14px;
}
`; `;
export const PlanDetail = styled(Box)` export const PlanDetail = styled(Box)`
display: flex; display: flex;
props.highlighted props.highlighted
? selectedTheme.colors.primaryYellow ? selectedTheme.colors.primaryYellow
: selectedTheme.colors.primaryPurple}; : selectedTheme.colors.primaryPurple};

@media (max-width: 600px) {
font-size: 14px;
}
`; `;
export const PlanDetailDescription = styled(Typography)` export const PlanDetailDescription = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
line-height: 22px; line-height: 22px;
color: ${(props) => color: ${(props) =>
props.highlighted ? "white" : selectedTheme.colors.primaryGrayText}; props.highlighted ? "white" : selectedTheme.colors.primaryGrayText};

@media (max-width: 600px) {
font-size: 14px;
font-weight: 400;
}
`; `;
export const Line = styled(Box)` export const Line = styled(Box)`
width: 100%; width: 100%;
: selectedTheme.colors.primaryPurple}; : selectedTheme.colors.primaryPurple};
} }
} }

@media (max-width: 600px) {
svg {
width: 18px;
height: 18px;
}
}
`; `;

+ 10
- 0
src/components/Prices/PricesComponent.styled.js Прегледај датотеку

export const PricesComponentContainer = styled(Box)` export const PricesComponentContainer = styled(Box)`
padding: 72px; padding: 72px;
background: white; background: white;

@media (max-width: 600px) {
padding: 36px;
}
`; `;
export const PlansContainer = styled(Box)` export const PlansContainer = styled(Box)`
display: flex; display: flex;
gap: 50px; gap: 50px;
margin-top: 46px; margin-top: 46px;
margin-bottom: 36px; margin-bottom: 36px;

@media (max-width: 600px) {
flex-direction: column;
gap: 27px;
}
`; `;
export const TruckIcon = styled(Truck)``; export const TruckIcon = styled(Truck)``;
export const CartIcon = styled(Cart)``; export const CartIcon = styled(Cart)``;
export const SendIcon = styled(Send)``; export const SendIcon = styled(Send)``;

export const PricesAltText = styled(Typography)` export const PricesAltText = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
font-style: normal; font-style: normal;

+ 12
- 3
src/components/Prices/PricesHeader/PricesHeader.styled.js Прегледај датотеку

color: ${selectedTheme.colors.primaryPurple}; color: ${selectedTheme.colors.primaryPurple};
display: flex; display: flex;
flex: 1; flex: 1;

@media (max-width: 600px) {
font-size: 36px;
line-height: 49px;
}
`; `;
export const PricesHeaderLine = styled(Box)` export const PricesHeaderLine = styled(Box)`
border-top: 1px solid ${selectedTheme.colors.iconYellowColor};
width: 90px;
margin-bottom: 26px;
border-top: 1px solid ${selectedTheme.colors.iconYellowColor};
width: 90px;
margin-bottom: 26px;

@media (max-width: 600px) {
width: 54px;
}
`; `;
export const PricesHeaderContainer = styled(Box)` export const PricesHeaderContainer = styled(Box)`
display: flex; display: flex;

+ 6
- 2
src/components/PrivacyPolicy/PrivacyPolicyComponent.styled.js Прегледај датотеку

import styled from "styled-components"; import styled from "styled-components";


export const PrivacyPolicyContainer = styled(Box)` export const PrivacyPolicyContainer = styled(Box)`
margin: 72px;
`
margin: 72px;

@media (max-width: 600px) {
margin: 36px 36px 69px 36px;
}
`;

+ 16
- 3
src/components/PrivacyPolicy/PrivacyPolicyHeader/PrivacyPolicyHeader.styled.js Прегледај датотеку

font-size: 72px; font-size: 72px;
line-height: 98px; line-height: 98px;
color: ${selectedTheme.colors.primaryPurple}; color: ${selectedTheme.colors.primaryPurple};

@media (max-width: 600px) {
font-size: 36px;
line-height: 49px;
}
`; `;
export const PrivacyPolicyHeaderParagraph = styled(Typography)` export const PrivacyPolicyHeaderParagraph = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
font-size: 16px; font-size: 16px;
line-height: 22px; line-height: 22px;
color: ${selectedTheme.colors.primaryGrayText}; color: ${selectedTheme.colors.primaryGrayText};

@media (max-width: 600px) {
font-size: 14px;
}
`; `;
export const PrivacyPolicyHeaderLine = styled(Box)` export const PrivacyPolicyHeaderLine = styled(Box)`
border-top: 1px solid ${selectedTheme.colors.iconYellowColor};
width: 90px;
margin-bottom: 26px;
border-top: 1px solid ${selectedTheme.colors.iconYellowColor};
width: 90px;
margin-bottom: 26px;

@media (max-width: 600px) {
width: 54px;
}
`; `;

+ 9
- 1
src/components/PrivacyPolicy/PrivacyPolicySection/PrivacyPolicySection.styled.js Прегледај датотеку

import selectedTheme from "../../../themes"; import selectedTheme from "../../../themes";


export const PrivacyPolicySectionContainer = styled(Box)` export const PrivacyPolicySectionContainer = styled(Box)`
margin-top: 25px;
margin-top: 25px;
`; `;
export const PrivacyPolicySectionTitle = styled(Typography)` export const PrivacyPolicySectionTitle = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
line-height: 33px; line-height: 33px;
color: ${selectedTheme.colors.primaryPurple}; color: ${selectedTheme.colors.primaryPurple};
margin-bottom: 18px; margin-bottom: 18px;

@media (max-width: 600px) {
font-size: 18px;
}
`; `;
export const PrivacyPolicySectionText = styled(Typography)` export const PrivacyPolicySectionText = styled(Typography)`
font-family: ${selectedTheme.fonts.textFont}; font-family: ${selectedTheme.fonts.textFont};
font-size: 16px; font-size: 16px;
line-height: 22px; line-height: 22px;
color: ${selectedTheme.colors.primaryGrayText}; color: ${selectedTheme.colors.primaryGrayText};

@media (max-width: 600px) {
font-size: 14px;
}
`; `;

+ 1
- 1
src/store/saga/locationsSaga.js Прегледај датотеку

try { try {
const data = yield call(attemptFetchLocations); const data = yield call(attemptFetchLocations);
if (!data?.data) throw new Error(); if (!data?.data) throw new Error();
yield put(setLocations(data.data.value));
yield put(setLocations(data.data));
yield put(fetchLocationsSuccess()); yield put(fetchLocationsSuccess());
} catch (e) { } catch (e) {
yield put(fetchLocationsError()); yield put(fetchLocationsError());

Loading…
Откажи
Сачувај