Skip to content

Commit 5278c9f

Browse files
Refactor: Improve featured clubs mobile view
1 parent 2b995d6 commit 5278c9f

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

src/components/FeaturedClubCard.tsx

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -79,29 +79,31 @@ const FeaturedClubCard = ({ club }: { club: FeaturedClubProps }) => {
7979

8080
// Render advanced card with sections
8181
return (
82-
<div className={`${club.bgColor} p-6 rounded-xl backdrop-blur-md overflow-hidden relative group transition-all duration-300 border border-alien-gold/20 hover:border-alien-gold/40`}>
82+
<div className={`${club.bgColor} p-4 sm:p-6 rounded-xl backdrop-blur-md overflow-hidden relative group transition-all duration-300 border border-alien-gold/20 hover:border-alien-gold/40`}>
8383
<div className="absolute inset-0 bg-gradient-to-b from-transparent via-alien-space-dark/60 to-alien-space-dark/90 z-0"></div>
8484

8585
<div className="relative z-10">
86-
<div className="flex flex-row gap-6 items-stretch">
86+
<div className="flex flex-col lg:flex-row gap-4 lg:gap-6 items-stretch">
8787
{/* Left sidebar with icon, meta and actions */}
88-
<aside className="w-60 min-w-[15rem] bg-alien-space-dark/60 border border-alien-gold/20 rounded-lg p-4 backdrop-blur-sm flex flex-col justify-between">
88+
<aside className="w-full lg:w-64 lg:min-w-[16rem] bg-alien-space-dark/60 border border-alien-gold/20 rounded-lg p-4 backdrop-blur-sm flex flex-col justify-between">
8989
<div>
90-
<div className="p-4 bg-alien-space-dark/80 rounded-xl border border-alien-gold/30 group-hover:border-alien-gold/50 transition-all duration-300 inline-block">
91-
{club.icon}
90+
<div className="flex items-start justify-between lg:flex-col lg:items-start gap-3">
91+
<div className="p-3 lg:p-4 bg-alien-space-dark/80 rounded-xl border border-alien-gold/30 group-hover:border-alien-gold/50 transition-all duration-300 inline-block">
92+
{club.icon}
93+
</div>
94+
<span className={`px-3 py-1 text-xs ${club.categoryColor} rounded-full font-medium backdrop-blur-sm h-fit`}>
95+
{club.category}
96+
</span>
9297
</div>
93-
<span className={`mt-3 inline-block px-3 py-1 text-xs ${club.categoryColor} rounded-full font-medium backdrop-blur-sm`}>
94-
{club.category}
95-
</span>
96-
<h3 className="mt-4 text-xl font-bold text-alien-gold font-nasalization group-hover:text-alien-gold-light transition-colors">
98+
<h3 className="mt-4 text-lg lg:text-xl font-bold text-alien-gold font-nasalization group-hover:text-alien-gold-light transition-colors">
9799
{club.name}
98100
</h3>
99-
<p className="text-gray-200 mt-2 text-sm font-[Exo] leading-relaxed">
101+
<p className="text-gray-200 mt-2 text-xs lg:text-sm font-[Exo] leading-relaxed">
100102
{club.description}
101103
</p>
102104
</div>
103-
<div className="mt-4">
104-
<div className="flex items-center bg-alien-space-dark/60 px-3 py-2 rounded-full backdrop-blur-sm mb-3">
105+
<div className="mt-4 space-y-3">
106+
<div className="flex items-center bg-alien-space-dark/60 px-3 py-2 rounded-full backdrop-blur-sm">
105107
<Users className="h-4 w-4 text-alien-green mr-2" />
106108
<span className="text-sm text-alien-green font-medium">
107109
{club.members.toLocaleString()} members
@@ -118,34 +120,34 @@ const FeaturedClubCard = ({ club }: { club: FeaturedClubProps }) => {
118120

119121
{/* Right content with sections */}
120122
<div className="flex-1">
121-
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
123+
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3 lg:gap-4">
122124
{club.sections.map((section, index) => (
123-
<div key={index} className="bg-alien-space-dark/60 border border-alien-gold/20 backdrop-blur-sm rounded-lg p-4">
124-
<div className="flex items-center text-alien-gold text-sm font-nasalization mb-3">
125+
<div key={index} className="bg-alien-space-dark/60 border border-alien-gold/20 backdrop-blur-sm rounded-lg p-3 lg:p-4">
126+
<div className="flex items-center text-alien-gold text-xs lg:text-sm font-nasalization mb-2 lg:mb-3">
125127
{section.icon}
126128
<span className="ml-2">{section.title}</span>
127129
</div>
128-
<p className="text-xs text-gray-300 font-[Exo] mb-4">{section.description}</p>
130+
<p className="text-xs text-gray-300 font-[Exo] mb-3 lg:mb-4">{section.description}</p>
129131

130132
{/* Special handling for EcoFlow product carousel */}
131133
{club.name === 'Δ EcoFlow' && section.title === 'Eco Products Catalog' ? (
132134
<div className="mt-4">
133135
<EcoProductCarousel />
134136
</div>
135137
) : (
136-
<div className="grid grid-cols-2 gap-2">
138+
<div className="grid grid-cols-1 sm:grid-cols-2 gap-2">
137139
{section.platforms.sort((a, b) => a.name.localeCompare(b.name)).map((platform, pIndex) => (
138140
<Button
139141
key={pIndex}
140142
variant="ghost"
141143
size="sm"
142-
className={`${section.color} text-white hover:bg-white/20 text-xs h-8 justify-start font-[Exo] w-full`}
144+
className={`${section.color} text-white hover:bg-white/20 text-xs h-auto py-2 justify-start font-[Exo] w-full`}
143145
onClick={() => platform.url && window.open(platform.url, '_blank')}
144146
disabled={!platform.url}
145147
>
146-
{platform.icon && <img src={platform.icon} alt={platform.name} className="h-3 w-3 mr-1 flex-shrink-0" />}
147-
{!platform.icon && <ExternalLink className="h-3 w-3 mr-1 flex-shrink-0" />}
148-
<span className="truncate">{platform.name}</span>
148+
{platform.icon && <img src={platform.icon} alt={platform.name} className="h-4 w-4 mr-2 flex-shrink-0 rounded" />}
149+
{!platform.icon && <ExternalLink className="h-4 w-4 mr-2 flex-shrink-0" />}
150+
<span className="truncate text-left">{platform.name}</span>
149151
</Button>
150152
))}
151153
</div>

0 commit comments

Comments
 (0)