chore: fixes card ui background
This commit is contained in:
+18
-15
@@ -7,24 +7,27 @@ export default function RateCard({ provider, rate, href, isBest, index, formatCu
|
|||||||
className={`rate-card ${isBest ? 'best' : ''}`}
|
className={`rate-card ${isBest ? 'best' : ''}`}
|
||||||
style={{ animationDelay: `${index * 0.1}s` }}
|
style={{ animationDelay: `${index * 0.1}s` }}
|
||||||
>
|
>
|
||||||
<div className="rate-card-header">
|
{logo && (
|
||||||
<div className="provider-info">
|
<div className="provider-logo-background">
|
||||||
{logo && (
|
<img
|
||||||
<img
|
src={logo}
|
||||||
src={logo}
|
alt={`${provider} logo`}
|
||||||
alt={`${provider} logo`}
|
className="provider-logo-faded"
|
||||||
className="provider-logo"
|
/>
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<h3 className="provider-name">{provider}</h3>
|
|
||||||
</div>
|
</div>
|
||||||
{isBest && <span className="best-badge">Best Rate</span>}
|
)}
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="rate-value">{formatCurrency(rate)}</div>
|
<div className="rate-card-content">
|
||||||
|
<div className="rate-card-header">
|
||||||
|
<h3 className="provider-name">{provider}</h3>
|
||||||
|
{isBest && <span className="best-badge">Best Rate</span>}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="rate-card-footer">
|
<div className="rate-value">{formatCurrency(rate)}</div>
|
||||||
<span className="visit-link">Visit provider →</span>
|
|
||||||
|
<div className="rate-card-footer">
|
||||||
|
<span className="visit-link">Visit provider →</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
|||||||
+37
-15
@@ -509,6 +509,7 @@ strong {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.rate-card {
|
.rate-card {
|
||||||
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--spacing-md);
|
gap: var(--spacing-md);
|
||||||
@@ -520,6 +521,7 @@ strong {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
animation: fadeInUp 0.6s ease forwards;
|
animation: fadeInUp 0.6s ease forwards;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: var(--color-accent);
|
background: var(--color-accent);
|
||||||
@@ -530,14 +532,16 @@ strong {
|
|||||||
color: var(--color-primary);
|
color: var(--color-primary);
|
||||||
transform: translateX(4px);
|
transform: translateX(4px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.provider-logo-faded {
|
||||||
|
opacity: 0.15;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.best {
|
&.best {
|
||||||
border-width: 2px;
|
border-width: 2px;
|
||||||
background: var(--color-accent);
|
background: var(--color-accent);
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
content: '';
|
content: '';
|
||||||
@@ -547,6 +551,7 @@ strong {
|
|||||||
right: 0;
|
right: 0;
|
||||||
height: 3px;
|
height: 3px;
|
||||||
background: var(--color-primary);
|
background: var(--color-primary);
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@@ -563,6 +568,36 @@ strong {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.provider-logo-background {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
width: 120px;
|
||||||
|
height: 120px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.provider-logo-faded {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
opacity: 0.12;
|
||||||
|
filter: grayscale(100%);
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rate-card-content {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--spacing-md);
|
||||||
|
}
|
||||||
|
|
||||||
.rate-card-header {
|
.rate-card-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -570,19 +605,6 @@ strong {
|
|||||||
gap: var(--spacing-sm);
|
gap: var(--spacing-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.provider-info {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: var(--spacing-sm);
|
|
||||||
}
|
|
||||||
|
|
||||||
.provider-logo {
|
|
||||||
width: 32px;
|
|
||||||
height: 32px;
|
|
||||||
object-fit: contain;
|
|
||||||
border-radius: var(--radius-sm);
|
|
||||||
}
|
|
||||||
|
|
||||||
.provider-name {
|
.provider-name {
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|||||||
Reference in New Issue
Block a user