浏览代码

Responsiveness

pull/2/head
Jovan Petrovic 3 年前
父节点
当前提交
c01944d245

+ 13
- 5
src/components/Cards/FilterCard/FilterCard.styled.js 查看文件

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


export const FilterCardContainer = styled(Box)` export const FilterCardContainer = styled(Box)`
position: fixed;
border-radius: 0; border-radius: 0;
border-top-right-radius: 4px; border-top-right-radius: 4px;
margin-top: -24px;
height: calc(100% - 90px); height: calc(100% - 90px);
padding: 36px; padding: 36px;
background-color: white; background-color: white;
width: calc(100% / 12 * 2.4); width: calc(100% / 12 * 2.4);
position: fixed;
left: 0; left: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
background-color: white; background-color: white;
min-width: fit-content;
z-index: 9;
margin-top: -24px;
transition: all ease-in-out .36s;
@media (max-width: 900px) {
margin-left: -400px;
transition: all ease-in-out .36s;
}
@media (max-width: 600px) {
margin-top: -14px;
}
`; `;
export const Title = styled(Typography)` export const Title = styled(Typography)`
font-size: 24px; font-size: 24px;
`; `;


export const Footer = styled(Box)` export const Footer = styled(Box)`

position: "sticky"; position: "sticky";
bottom: 0; bottom: 0;
& div button { & div button {
scrollbar-width: thin; scrollbar-width: thin;
scrollbar-color: #ddd; scrollbar-color: #ddd;
${() => window.scrollbars.visible && `padding-right: 15px;`} ${() => window.scrollbars.visible && `padding-right: 15px;`}
`

`;

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

display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: ${(props) => (!props.halfwidth ? "no-wrap" : "wrap")}; flex-wrap: ${(props) => (!props.halfwidth ? "no-wrap" : "wrap")};
justify-content: space-between;
justify-content: start;
gap: 1rem;
`; `;
export const OfferCategory = styled(Box)` export const OfferCategory = styled(Box)`
font-family: "Open Sans"; font-family: "Open Sans";
color: ${selectedTheme.primaryText}; color: ${selectedTheme.primaryText};
line-height: 16px; line-height: 16px;
font-size: 12px; font-size: 12px;
width: 33%;
@media (max-width: 1000px) {
display: none;
}
`; `;
export const OfferPackage = styled(Box)` export const OfferPackage = styled(Box)`
font-family: "Open Sans"; font-family: "Open Sans";
color: ${selectedTheme.primaryText}; color: ${selectedTheme.primaryText};
line-height: 16px; line-height: 16px;
font-size: 12px; font-size: 12px;
width: 34%;
`; `;
export const OfferViews = styled(Box)` export const OfferViews = styled(Box)`
font-family: "Open Sans"; font-family: "Open Sans";
color: ${selectedTheme.primaryText}; color: ${selectedTheme.primaryText};
line-height: 16px; line-height: 16px;
font-size: 12px; font-size: 12px;
width: 34%;
@media (max-width: 1200px) {
display: none;
}
`; `;
export const OfferDescriptionTitle = styled(Box)` export const OfferDescriptionTitle = styled(Box)`
font-family: "Open Sans"; font-family: "Open Sans";
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 5; -webkit-line-clamp: 5;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
@media (max-width: 1500px) {
display: none;
}
`; `;
export const OfferDescription = styled(Box)` export const OfferDescription = styled(Box)`
flex: 3; flex: 3;
margin: auto 0; margin: auto 0;
padding-left: 35px; padding-left: 35px;
@media (max-width: 1500px) {
display: none;
}
`; `;
export const Line = styled(Box)` export const Line = styled(Box)`
border-left: 1px solid rgba(0, 0, 0, 0.15); border-left: 1px solid rgba(0, 0, 0, 0.15);
height: 100px; height: 100px;
width: 0; width: 0;
margin: auto 0; margin: auto 0;
@media (max-width: 1500px) {
display: none;
}
`; `;
export const DetailIcon = styled(Icon)` export const DetailIcon = styled(Icon)`
& svg { & svg {
background-color: ${selectedTheme.primaryPurple} !important; background-color: ${selectedTheme.primaryPurple} !important;
color: white !important; color: white !important;
} }
@media (max-width: 650px) {
display: none;
}
`; `;
export const MessageIcon = styled(IconButton)` export const MessageIcon = styled(IconButton)`
width: 40px; width: 40px;

+ 1
- 0
src/components/Dropdown/DropdownList/DropdownList.styled.js 查看文件

font-weight: 400; font-weight: 400;
padding-bottom: 10px; padding-bottom: 10px;
padding-top: 5px; padding-top: 5px;
padding-right: 0.9rem;
font-family: "Open Sans"; font-family: "Open Sans";
color: ${props => props.textcolor ? props.textcolor : selectedTheme.primaryText}; color: ${props => props.textcolor ? props.textcolor : selectedTheme.primaryText};
`; `;

+ 4
- 1
src/components/MarketPlace/Header/Header.styled.js 查看文件

margin-top: 20px; margin-top: 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
` `
export const HeaderLocation = styled(Box)` export const HeaderLocation = styled(Box)`
padding-top: 10px;
font-family: "Open Sans"; font-family: "Open Sans";
color: ${selectedTheme.primaryPurple}; color: ${selectedTheme.primaryPurple};
font-weight: 700; font-weight: 700;
` `
export const HeaderButton = styled(IconButton)` export const HeaderButton = styled(IconButton)`
padding: 2px 10px; padding: 2px 10px;
@media (max-width: 1500px) {
display: none;
}
` `
export const HeaderOptions = styled(Box)` export const HeaderOptions = styled(Box)`
display: flex; display: flex;

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

export const MarketPlaceContainer = styled(Box)` export const MarketPlaceContainer = styled(Box)`
height: 100%; height: 100%;
margin: 0 70px; margin: 0 70px;
@media (max-width: 600px) {
margin: 0 1.8rem;
}
`; `;

+ 2
- 2
src/layouts/MainLayout/MainLayout.js 查看文件

<MainLayoutContainer> <MainLayoutContainer>
{props.children} {props.children}
<Grid container maxHeight="xl"> <Grid container maxHeight="xl">
<LeftCard item xs={2} lg={3} xl={2.4} md={4} >
<LeftCard item xs={0} sm={0} md={3} lg={3} xl={2.4} >
{props.leftCard} {props.leftCard}
</LeftCard> </LeftCard>
<Content item xs={10} lg={9} xl={9.6} md={8} >
<Content item xs={12} sm={12} md={9} lg={9} xl={9.6} >
{props.content} {props.content}
</Content> </Content>
</Grid> </Grid>

正在加载...
取消
保存