mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-26 14:07:00 -05:00
Refactor: Optimize card density
This commit is contained in:
@@ -40,7 +40,7 @@ export function ManufacturerCard({ company }: ManufacturerCardProps) {
|
||||
onClick={handleClick}
|
||||
>
|
||||
{/* Logo/Image Section */}
|
||||
<div className="aspect-[4/3] relative bg-gradient-to-br from-primary/20 via-primary/10 to-transparent overflow-hidden">
|
||||
<div className="aspect-[3/2] relative bg-gradient-to-br from-primary/20 via-primary/10 to-transparent overflow-hidden">
|
||||
{(company.card_image_url || company.card_image_id) ? (
|
||||
<img
|
||||
src={company.card_image_url || getCloudflareImageUrl(company.card_image_id, 'card')}
|
||||
@@ -67,7 +67,7 @@ export function ManufacturerCard({ company }: ManufacturerCardProps) {
|
||||
{/* Logo Display */}
|
||||
<div className="absolute inset-0 flex items-center justify-center">
|
||||
{company.logo_url ? (
|
||||
<div className="w-16 h-16 md:w-20 md:h-20 bg-background/90 rounded-xl overflow-hidden shadow-lg backdrop-blur-sm border border-border/50">
|
||||
<div className="w-12 h-12 md:w-16 md:h-16 bg-background/90 rounded-xl overflow-hidden shadow-lg backdrop-blur-sm border border-border/50">
|
||||
<img
|
||||
src={company.logo_url}
|
||||
alt={`${company.name} logo`}
|
||||
@@ -76,7 +76,7 @@ export function ManufacturerCard({ company }: ManufacturerCardProps) {
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div className="w-16 h-16 md:w-20 md:h-20 bg-background/90 rounded-xl shadow-lg backdrop-blur-sm border border-border/50 flex items-center justify-center">
|
||||
<div className="w-12 h-12 text-muted-foreground/30">
|
||||
{getCompanyIcon(company.company_type)}
|
||||
</div>
|
||||
)}
|
||||
@@ -85,9 +85,9 @@ export function ManufacturerCard({ company }: ManufacturerCardProps) {
|
||||
)}
|
||||
</div>
|
||||
|
||||
<CardContent className="p-4 space-y-3">
|
||||
<CardContent className="p-3 space-y-2">
|
||||
{/* Company Name */}
|
||||
<h3 className="text-lg font-semibold group-hover:text-primary transition-colors line-clamp-2 min-h-[3.5rem]">
|
||||
<h3 className="text-base font-semibold group-hover:text-primary transition-colors line-clamp-2">
|
||||
{company.name}
|
||||
</h3>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user