jovan.cirkovic 3 年之前
父節點
當前提交
0634b5d0f8

+ 2
- 4
src/components/Cards/CreateOfferCard/ThirdPart/ThirdPartCreateOffer.styled.js 查看文件

export const CreateOfferFormContainer = styled(Box)` export const CreateOfferFormContainer = styled(Box)`
padding-top: 20px; padding-top: 20px;
margin-top: 20px; margin-top: 20px;
width:100%;
width: 380px;
`; `;
export const PreviewCard = styled(ItemDetailsCard)`

`
export const PreviewCard = styled(ItemDetailsCard)``;

+ 13
- 1
src/components/Cards/ItemDetailsCard/ItemDetailsCard.styled.js 查看文件

margin: 18px 0; margin: 18px 0;
padding: 10px; padding: 10px;
padding-bottom: 65px; padding-bottom: 65px;
height: 656px;
}

@media screen and (max-width: 1200px) {
margin-left: 0;
} }
`; `;
export const OfferInfo = styled(Box)` export const OfferInfo = styled(Box)`
margin: 18px 0; margin: 18px 0;
@media (max-width: 600px) { @media (max-width: 600px) {
margin: 0; margin: 0;
flex: 0;
} }
`; `;
export const ButtonsContainer = styled(Box)` export const ButtonsContainer = styled(Box)`
flex-direction: column; flex-direction: column;
align-items: start; align-items: start;
} }
@media screen and (min-width: 600px) and (max-width: 1200px) {
display: none;
}
`; `;
export const Info = styled(Box)` export const Info = styled(Box)`
display: flex; display: flex;
font-weight: 600; font-weight: 600;
&:hover button { &:hover button {
color: white !important; color: white !important;
background-color: ${props => !props.disabled ? selectedTheme.primaryPurple : selectedTheme.primaryPurpleDisabled} !important;
background-color: ${(props) =>
!props.disabled
? selectedTheme.primaryPurple
: selectedTheme.primaryPurpleDisabled} !important;
} }
@media (max-width: 600px) { @media (max-width: 600px) {
height: 44px; height: 44px;

+ 5
- 1
src/components/Cards/ItemDetailsCard/OfferDetails/OfferDetails.js 查看文件

ScrollerHorizontal, ScrollerHorizontal,
ScrollerVertical, ScrollerVertical,
OfferInfoContainer, OfferInfoContainer,
DesciprtionPostDate,
} from "./OfferDetails.styled"; } from "./OfferDetails.styled";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import useScreenDimensions from "../../../../hooks/useScreenDimensions"; import useScreenDimensions from "../../../../hooks/useScreenDimensions";
import { formatDateLocale } from "../../../../util/helpers/dateHelpers";


const OfferDetails = (props) => { const OfferDetails = (props) => {
const offer = props.offer; const offer = props.offer;
const { t } = useTranslation(); const { t } = useTranslation();
const dimension = useScreenDimensions(); const dimension = useScreenDimensions();
const date = formatDateLocale(new Date(offer?.offer?._created));
return ( return (
<Details <Details
hasScrollBar={!props.showPublishButton} hasScrollBar={!props.showPublishButton}
})} })}
</ScrollerVertical> </ScrollerVertical>
)} )}
<OfferInfoContainer>
<OfferInfoContainer singleOffer={props.singleOffer}>
<OfferTitle singleOffer={props.singleOffer}> <OfferTitle singleOffer={props.singleOffer}>
{offer?.offer?.name} {offer?.offer?.name}
</OfferTitle> </OfferTitle>
<OfferDescriptionText showBarterButton={props.showExchangeButton}> <OfferDescriptionText showBarterButton={props.showExchangeButton}>
{offer?.offer?.description} {offer?.offer?.description}
</OfferDescriptionText> </OfferDescriptionText>
<DesciprtionPostDate>{date}</DesciprtionPostDate>
</OfferLittleDetails> </OfferLittleDetails>
</OfferInfoContainer> </OfferInfoContainer>
</Details> </Details>

+ 29
- 8
src/components/Cards/ItemDetailsCard/OfferDetails/OfferDetails.styled.js 查看文件

${(props) => ${(props) =>
!props.singleOffer && !props.singleOffer &&
` `
position: absolute;
bottom: 45px;
position: relative;
top: 180px;
height: 0;
`} `}
@media (max-width: 600px) { @media (max-width: 600px) {
padding: 0 8px; padding: 0 8px;
position: absolute; position: absolute;
top: 270px; top: 270px;
left: 18px;
justify-content: start; justify-content: start;
} }
`; `;
margin: 0 9px; margin: 0 9px;
} */ } */
`; `;
export const OfferInfoContainer = styled(Box)``;
export const OfferInfoContainer = styled(Box)`
@media screen and (min-width: 600px) and (max-width: 1200px) {
${(props) => props.singleOffer && `flex: 2`};
}
`;
export const OfferDescriptionTitle = styled(Box)` export const OfferDescriptionTitle = styled(Box)`
font-family: "Open Sans"; font-family: "Open Sans";
font-size: 12px; font-size: 12px;
font-size: 16px; font-size: 16px;
color: ${selectedTheme.primaryDarkText}; color: ${selectedTheme.primaryDarkText};
line-height: 22px; line-height: 22px;
padding-bottom: 20px;
max-width: ${(props) =>
props.showBarterButton ? "calc(100% - 230px)" : "100%"};
/* padding-bottom: 20px; */
max-width: 100%;
/* max-width: ${(props) =>
props.showBarterButton ? "calc(100% - 230px)" : "100%"}; */
@media (max-width: 600px) { @media (max-width: 600px) {
font-size: 14px; font-size: 14px;
max-width: 100%; max-width: 100%;
max-height: 100px;
} }
/* max-width: calc(100% - 230px); */ /* max-width: calc(100% - 230px); */
/* overflow: hidden; */ /* overflow: hidden; */
-webkit-line-clamp: 5; -webkit-line-clamp: 5;
-webkit-box-orient: vertical; */ -webkit-box-orient: vertical; */
`; `;
export const DesciprtionPostDate = styled(Typography)`
display: none;
font-family: "Open Sans";
font-size: 12px;
color: ${selectedTheme.primaryText};
&::before {
content: "Objavljeno: ";
@media (max-width: 600px) {
font-size: 9px;
font-family: "Open Sans";
}
}
@media screen and (min-width: 600px) and (max-width: 1200px) {
display: block;
align-self: flex-end;
}
`;
export const OfferImage = styled.img` export const OfferImage = styled.img`
min-width: 144px; min-width: 144px;
min-height: 144px; min-height: 144px;

+ 6
- 6
src/components/Cards/OfferCard/OfferCard.js 查看文件

></OfferImage> ></OfferImage>
</OfferImageContainer> </OfferImageContainer>
<OfferInfo vertical={props.vertical}> <OfferInfo vertical={props.vertical}>
<OfferTitle
vertical={props.vertical}
onClick={() => routeToItem(props?.offer?._id)}
>
{props?.offer?.name}
</OfferTitle>
<OfferTitle
vertical={props.vertical}
onClick={() => routeToItem(props?.offer?._id)}
>
{props?.offer?.name}
</OfferTitle>
<OfferAuthor> <OfferAuthor>
<OfferAuthorName vertical={props.vertical}> <OfferAuthorName vertical={props.vertical}>
{props?.offer?.user?.company?.name} {props?.offer?.user?.company?.name}

+ 9
- 9
src/components/Cards/OfferCard/OfferCard.styled.js 查看文件

${(props) => ${(props) =>
props.vertical && props.vertical &&
` `
height: 330px;
height: 373px;
width: 180px; width: 180px;
margin: 0 18px; margin: 0 18px;
`} `}
line-height: 19px; line-height: 19px;
font-size: 14px; font-size: 14px;
position: absolute; position: absolute;
bottom: 80px;
bottom: 125px;
`} `}
} }
`; `;
font-size: 12px; font-size: 12px;
margin-top: 5px; margin-top: 5px;
position: absolute; position: absolute;
bottom: 61px;
bottom: 105px;
`} `}
`; `;
export const OfferDetails = styled(Box)` export const OfferDetails = styled(Box)`
props.vertical && props.vertical &&
` `
position: absolute; position: absolute;
bottom: 15px;
bottom: 60px;
`} `}
`; `;
export const OfferPackage = styled(Box)` export const OfferPackage = styled(Box)`
right: 18px; right: 18px;


@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
position: absolute;
display: block; display: block;
right: 16px;
top: 16px;
position: absolute;
top: 325px;
left: 18px;
} }
`; `;
export const RemoveIcon = styled(Remove)``; export const RemoveIcon = styled(Remove)``;
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
position: absolute; position: absolute;
display: block; display: block;
right: 55px;
top: 16px;
left: 59px;
top: 325px;
} }
`; `;
export const EditIcon = styled(Edit)``; export const EditIcon = styled(Edit)``;

+ 3
- 0
src/components/ItemDetails/ItemDetails.styled.js 查看文件

width: 14px; width: 14px;
} }
} }
@media screen and (max-width: 1200px) {
margin-left: 0;
}
`; `;


export const OfferIconText = styled(Typography)` export const OfferIconText = styled(Typography)`

+ 36
- 37
src/components/Profile/ProfileOffers/ProfileOffers.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 {ReactComponent as Search} from "../../../assets/images/svg/magnifying-glass.svg"
import {ReactComponent as Refresh} from "../../../assets/images/svg/refresh.svg"
import { ReactComponent as Search } from "../../../assets/images/svg/magnifying-glass.svg";
import { ReactComponent as Refresh } from "../../../assets/images/svg/refresh.svg";
import { TextField } from "../../TextFields/TextField/TextField"; import { TextField } from "../../TextFields/TextField/TextField";
import { Icon } from "../../Icon/Icon"; import { Icon } from "../../Icon/Icon";
import Select from "../../Select/Select"; import Select from "../../Select/Select";
} }
`; `;
export const OffersIcon = styled(Refresh)` export const OffersIcon = styled(Refresh)`
width: 18px;
height: 18px;
& path {
stroke: ${selectedTheme.primaryDarkTextThird};
}
@media (max-width: 600px) {
width: 12px;
height: 12px;
}
`
width: 18px;
height: 18px;
& path {
stroke: ${selectedTheme.primaryDarkTextThird};
}
@media (max-width: 600px) {
width: 12px;
height: 12px;
}
`;
export const SearchInput = styled(TextField)` export const SearchInput = styled(TextField)`
position: relative;
top: 15px;
& div fieldset {
border-color: ${selectedTheme.primaryPurple} !important;
}
@media (max-width: 600px) {
top: 5px;
height: 46px;
& div {
background-color: white;
}
position: relative;
top: 15px;
& div fieldset {
border-color: ${selectedTheme.primaryPurple} !important;
}
@media (max-width: 600px) {
top: 5px;
height: 46px;
& div {
background-color: white;
} }
`
}
`;
export const SearchIcon = styled(Search)` export const SearchIcon = styled(Search)`
width: 18px;
height: 18px;
`
width: 18px;
height: 18px;
`;
export const IconContainer = styled(Icon)` export const IconContainer = styled(Icon)`
cursor: pointer;
position: relative;
top: 4px;
`
cursor: pointer;
position: relative;
top: 4px;
`;
export const HeaderSelect = styled(Select)` export const HeaderSelect = styled(Select)`
width: 210px; width: 210px;
height: 35px; height: 35px;
margin: 2px; margin: 2px;
} }
`; `;
export const DownArrow = styled(Down)`
`
export const DownArrow = styled(Down)``;
export const OffersContainer = styled(Box)` export const OffersContainer = styled(Box)`
margin-top: 30px;
`
margin-top: 30px;
`;
export const OffersScroller = styled(HorizontalScroller)` export const OffersScroller = styled(HorizontalScroller)`
height: 330px;
height: 373px;
margin-left: 0; margin-left: 0;
& div { & div {
margin-left: 0; margin-left: 0;
margin-right: 0; margin-right: 0;
} }
`
`;

+ 4
- 0
src/components/Scroller/VerticalScroller.styled.js 查看文件

padding-right: 5px; padding-right: 5px;
height: 594px; height: 594px;


@media screen and (max-width: 1200px) {
height: 465px;
}

@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
width: 100%; width: 100%;
} }

+ 2
- 2
src/components/UserReviews/UserReviews.styled.js 查看文件

? props.numOfReviews * 185 + 82 + "px" ? props.numOfReviews * 185 + 82 + "px"
: `calc(100% - 90px)`}; */ : `calc(100% - 90px)`}; */
/* max-height: 100vh; */ /* max-height: 100vh; */
@media (max-width: 1200px) {
/* @media (max-width: 1200px) {
padding: 0 50px; padding: 0 50px;
}
} */
@media (max-width: 600px) { @media (max-width: 600px) {
position: relative; position: relative;
top: -45px; top: -45px;

+ 5
- 1
src/layouts/ItemDetailsLayout/ItemDetailsLayout.styled.js 查看文件

/* flex: 1; */ /* flex: 1; */
height: 100%; height: 100%;
@media (max-width: 1200px) { @media (max-width: 1200px) {
padding-right: 60px;
padding-right: 36px;
} }
@media (max-width: 600px) { @media (max-width: 600px) {
padding-left: 18px; padding-left: 18px;
border-top-right-radius: 4px; border-top-right-radius: 4px;
${(props) => props.singleOffer && `width: 100%`} ${(props) => props.singleOffer && `width: 100%`}
} }

@media screen and (max-width: 1200px) {
margin-left: 0;
}
`; `;
export const Content = styled(Grid)` export const Content = styled(Grid)`
width: 100%; width: 100%;

Loading…
取消
儲存