| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404 |
- import { Box, Container, Typography } from "@mui/material";
- import styled from "styled-components";
- import selectedTheme from "../../../themes";
- import { IconButton } from "../../Buttons/IconButton/IconButton";
- import { PrimaryButton } from "../../Buttons/PrimaryButton/PrimaryButton";
- import { Icon } from "../../Icon/Icon";
- import { ReactComponent as Eye } from "../../../assets/images/svg/eye-striked.svg";
- import { ReactComponent as Remove } from "../../../assets/images/svg/trash.svg";
- import { ReactComponent as Edit } from "../../../assets/images/svg/edit.svg";
- import { ReactComponent as Like } from "../../../assets/images/svg/like.svg";
- import { ReactComponent as Pin } from "../../../assets/images/svg/pin.svg";
-
- export const OfferCardContainer = styled(Container)`
- display: ${(props) => (props.skeleton ? "none" : "flex")};
- flex-direction: column;
- width: ${(props) => (!props.halfwidth ? "100%" : "49%")};
- box-sizing: border-box;
- margin: 10px 0;
- background-color: ${(props) =>
- props.sponsored === "true"
- ? selectedTheme.backgroundSponsoredColor
- : "white"};
- border-radius: 4px;
- ${(props) =>
- props.sponsored === "true" &&
- `border: 1px solid ${selectedTheme.borderSponsoredColor};`}
- padding: 16px;
- max-width: 2000px;
- height: 180px;
- position: relative;
- @media (max-width: 550px) {
- height: 194px;
- padding: 18px;
- padding-top: 12px;
- ${(props) =>
- props.vertical &&
- `
- height: 330px;
- width: 180px;
- margin: 0 18px;
- `}
- }
- `;
- export const OfferFlexContainer = styled(Container)`
- display: flex;
- flex-direction: row;
- margin: 0;
- padding: 0;
- max-height: 184px;
- @media (max-width: 600px) {
- ${(props) =>
- props.vertical &&
- `
- flex-direction: column;
- `}
- }
- `;
- export const OfferImage = styled.img`
- max-width: 144px;
- max-height: 144px;
- width: 144px;
- height: 144px;
- @media (max-width: 600px) {
- ${(props) =>
- !props.vertical &&
- `
- max-width: 108px;
- max-height: 108px;
- width: 108px;
- height: 108px;
- `}
- }
- `;
- export const OfferInfo = styled(Box)`
- display: flex;
- flex: 2;
- flex-direction: column;
- justify-content: space-between;
- margin-left: 18px;
- ${(props) =>
- props.vertical &&
- `
- margin-left: 0;
- margin-top: 5px;
- `}
- `;
- export const OfferTitle = styled(Typography)`
- font-family: "Open Sans";
- flex: 1;
- color: ${selectedTheme.primaryPurple};
- font-weight: 700;
- font-size: 24px;
- width: calc(100% - 120px);
- cursor: pointer;
- overflow: hidden;
- line-height: 33px;
- display: -webkit-box;
- -webkit-line-clamp: 1;
- -webkit-box-orient: vertical;
- max-height: 33px;
- margin-bottom: 28px;
- @media (max-width: 550px) {
- width: 100%;
- font-size: 18px;
- display: none;
- ${(props) =>
- props.vertical &&
- `
- display: flex;
- flex: none;
- position: relative;
- line-height: 22px;
- margin-top: 5px;
- font-size: 18px;
-
- `}
- }
- `;
- export const OfferAuthor = styled(Box)`
- display: flex;
- flex: 1;
- flex-direction: column;
- `;
- export const OfferAuthorName = styled(Typography)`
- font-family: "Open Sans";
- line-height: 22px;
- font-size: 16px;
- color: ${selectedTheme.primaryText};
- @media (max-width: 600px) {
- font-size: 14px;
- ${(props) =>
- props.vertical &&
- `
- line-height: 19px;
- font-size: 14px;
- position: absolute;
- bottom: 80px;
- `}
- }
- `;
- export const OfferLocation = styled(Typography)`
- font-family: "Open Sans";
- color: ${selectedTheme.primaryDarkText};
- line-height: 16px;
- font-size: 12px;
- ${(props) =>
- props.vertical &&
- `
- font-size: 12px;
- margin-top: 5px;
- position: absolute;
- bottom: 61px;
- `}
- `;
- export const OfferDetails = styled(Box)`
- display: flex;
- flex-direction: row;
- flex-wrap: ${(props) => (!props.halfwidth ? "no-wrap" : "wrap")};
- justify-content: start;
- gap: 1rem;
- @media (max-width: 650px) {
- flex-direction: column;
- justify-content: center;
- gap: 0;
- }
- `;
- export const OfferCategory = styled(Box)`
- font-family: "Open Sans";
- color: ${selectedTheme.primaryText};
- line-height: 16px;
- font-size: 12px;
- ${(props) =>
- props.vertical &&
- `
- position: absolute;
- bottom: 15px;
- `}
- `;
- export const OfferPackage = styled(Box)`
- font-family: "Open Sans";
- color: ${selectedTheme.primaryText};
- line-height: 16px;
- font-size: 12px;
- `;
- export const OfferViews = styled(Box)`
- font-family: "Open Sans";
- color: ${selectedTheme.primaryText};
- line-height: 16px;
- font-size: 12px;
- ${(props) =>
- props.vertical &&
- `
- display: none;
- `}
- `;
- export const OfferDescriptionTitle = styled(Box)`
- font-family: "Open Sans";
- font-size: 12px;
- color: ${selectedTheme.primaryDarkText};
- line-height: 16px;
- `;
- export const OfferDescriptionText = styled(Box)`
- font-family: "Open Sans";
- font-size: 16px;
- color: ${selectedTheme.primaryDarkText};
- line-height: 22px;
- max-width: calc(100% - 230px);
- max-height: 120px;
- overflow: hidden;
- display: -webkit-box;
- -webkit-line-clamp: 5;
- -webkit-box-orient: vertical;
- @media (max-width: 1500px) {
- display: none;
- }
- `;
- export const OfferDescription = styled(Box)`
- flex: 3;
- margin: auto 0;
- padding-left: 35px;
- @media (max-width: 1500px) {
- display: none;
- }
- `;
- export const Line = styled(Box)`
- border-left: 1px solid rgba(0, 0, 0, 0.15);
- height: 100px;
- width: 0;
- margin: auto 0;
- @media (max-width: 1500px) {
- display: none;
- }
- `;
- export const DetailIcon = styled(Icon)`
- & svg {
- width: 14px;
- position: relative;
- top: -1px;
- }
- `;
- export const DetailText = styled(Typography)`
- font-family: "Open Sans";
- color: ${selectedTheme.primaryText};
- line-height: 16px;
- font-size: 12px;
- position: relative;
- top: -2px;
- left: 3px;
- `;
- export const CheckButton = styled(PrimaryButton)`
- width: 180px;
- height: 48px;
- position: absolute;
- bottom: 9px;
- right: 9px;
- &:hover button {
- background-color: ${selectedTheme.primaryPurple} !important;
- color: white !important;
- }
- @media (max-width: 650px) {
- display: none;
- }
- `;
- export const MessageIcon = styled(IconButton)`
- ${(props) => !props.showMessageIcon && "display: none;"}
- width: 40px;
- height: 40px;
- position: absolute;
- top: 10px;
- right: 10px;
- background-color: ${selectedTheme.primaryIconBackgroundColor};
- border-radius: 100%;
- padding-top: 2px;
- text-align: center;
- @media (max-width: 600px) {
- width: 30px;
- height: 30px;
- top: 16px;
- right: 16px;
- padding: 0;
- ${(props) =>
- props.vertical &&
- `
- display: none;
- `}
- & button svg {
- width: 16px;
- height: 16px;
- position: relative;
- top: -3px;
- left: -2.4px;
- }
- }
- `;
- export const OfferImageContainer = styled(Box)`
- min-width: 144px;
- min-height: 144px;
- width: 144px;
- height: 144px;
- @media (max-width: 600px) {
- ${(props) =>
- !props.vertical
- ? `
- min-width: 108px;
- min-height: 108px;
- width: 108px;
- height: 108px;
- `
- : `margin-top: 4px;`}
- border-radius: 4px;
- overflow: hidden;
- box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.12);
- }
- `;
- export const OfferTitleAboveImage = styled(OfferTitle)`
- padding-bottom: 18px;
- padding-top: 5px;
- padding-left: 1px;
- display: block;
- width: 60%;
- max-width: 60%;
- height: 40px;
- line-height: 20px;
- text-overflow: ellipsis;
- overflow: hidden;
- white-space: nowrap;
- ${(props) => props.vertical && `display: none;`}
- @media (min-width: 551px) {
- display: none;
- }
- `;
- export const EyeIcon = styled(Eye)`
- width: 12px;
- height: 11px;
- @media (max-width: 600px) {
- position: relative;
- top: 1px !important;
- }
- `;
- export const RemoveIconContainer = styled(MessageIcon)`
- display: block;
- top: 18px;
- right: 18px;
-
- @media screen and (max-width: 600px) {
- position: absolute;
- display: block;
- right: 16px;
- top: 16px;
- }
- `;
- export const RemoveIcon = styled(Remove)``;
- export const EditIconContainer = styled(MessageIcon)`
- display: block;
- top: 18px;
- right: 76px;
-
- @media screen and (max-width: 600px) {
- position: absolute;
- display: block;
- right: 55px;
- top: 16px;
- }
- `;
- export const EditIcon = styled(Edit)``;
- export const LikeIconContainer = styled(MessageIcon)`
- display: block;
- opacity: ${(props) => (props.disabled ? "0.4" : "1")};
- ${(props) =>
- props.disabled &&
- `
- cursor: initial;
- & button {
- cursor: initial;
- }
- `}
- `;
- export const LikeIcon = styled(Like)`
- & path {
- stroke: ${(props) =>
- props.disabled
- ? selectedTheme.primaryPurpleDisabled
- : selectedTheme.primaryPurple};
- }
- `;
- export const PinIcon = styled(Pin)`
- position: absolute;
- top: 20px;
- right: 68px;
- @media (max-width: 600px) {
- top: 20px;
- right: 55px;
- }
- ${(props) =>
- props.isMyOffer &&
- `
- right: 134px;
- top: 26px;
- @media (max-width: 600px) {
- top: 20px;
- right: 94px;
- }
- `}
- `;
|