Skip to content

Commit

Permalink
Merge branch 'main' into feature/fixing-ui-enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
Mujtabaa07 authored Jan 13, 2025
2 parents 38b8a86 + 1876bea commit 0a5a197
Show file tree
Hide file tree
Showing 12 changed files with 1,027 additions and 308 deletions.
132 changes: 132 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

99 changes: 79 additions & 20 deletions src/Pages/PremiumBeans.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import styled, { keyframes } from 'styled-components';

const Loader = styled.div`
background: linear-gradient(135deg, #FDF5E6, #FFE4B5);
height: 90vh;
height: 100vh;
width: 100%;
position:relative;
@media (max-width: 880px) {
height: 1700px;
}
`;


Expand Down Expand Up @@ -252,19 +254,68 @@ const CoffeeTapNozzle = styled.div`
border-radius: 0%;
`;
const CardsContainer = styled.div`
position: absolute;
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 500px;
justify-content: space-between;
width: 1000px;
@media (max-width: 1050px) {
margin:0;
place-items: center;
gap: 340px;
}
@media (max-width: 940px) {
margin:0;
place-items: center;
gap: 250px;
}
@media (max-width: 880px) {
margin:0;
place-items: center;
top:800px;
grid-template-columns: 1fr;
}
@media (max-width: 820px) {
margin:0;
place-items: center;
top:800px;
grid-template-columns: 1fr;
}
@media (max-width: 770px) {
margin: 0;
place-items: center;
top:800px;
grid-template-columns: 1fr;
}
@media (max-width: 600px) {
margin: 0;
place-items: center;
top:800px;
grid-template-columns: 1fr;
}
@media (max-width: 500px) {
margin:0;
place-items: center;
top:800px;
grid-template-columns: 1fr;
}
`;

const CardColumn = styled.div`
display: flex;
display: flex;
flex-direction: column;
gap: 40px;
@media (max-width: 880px) {
margin-top:100px;
}
`;

const Card = styled.div`
Expand All @@ -274,6 +325,12 @@ const Card = styled.div`
flex-direction: column;
align-items: center;
background: transparent;
@media (max-width: 880px) {
width: 480px;
}
@media (max-width: 600px) {
width: 240px;
}
`;

const CardImage = styled.div`
Expand Down Expand Up @@ -356,20 +413,8 @@ function PremiumBeans() {
},
];
return (
<Loader >
<CardsContainer>
{/* Left cards */}
<CardColumn>
{beans.slice(0, 2).map((bean) => (
<Card key={bean.id}>
<CardImage style={{ backgroundImage: `url(${bean.image})` }} />
<CardContent>
<CardTitle>{bean.title}</CardTitle>
<CardDescription>{bean.description}</CardDescription>
</CardContent>
</Card>
))}
</CardColumn>
<Loader >

<Container>
<CoffeeHeader>
<CoffeeButtonOne />
Expand Down Expand Up @@ -400,7 +445,22 @@ function PremiumBeans() {
<CoffeeFooter />
<CoffeeFooterAfter />
</Container>

<CardsContainer>
<CardColumn>
{/* Left cards */}
{beans.slice(0, 2).map((bean) => (
<Card key={bean.id}>
<CardImage style={{ backgroundImage: `url(${bean.image})` }} />
<CardContent>
<CardTitle>{bean.title}</CardTitle>
<CardDescription>{bean.description}</CardDescription>
</CardContent>
</Card>
))}
</CardColumn>
<CardColumn>
{/*Right Cards*/}
{beans.slice(2).map((bean) => (
<Card key={bean.id}>
<CardImage style={{ backgroundImage: `url(${bean.image})` }} />
Expand All @@ -415,5 +475,4 @@ function PremiumBeans() {
</Loader>
);
}

export default PremiumBeans;
Loading

0 comments on commit 0a5a197

Please sign in to comment.