fix: mobile-first UI redesign - bump all text to 12px+, 44px+ touch targets, reduced content density

This commit is contained in:
root
2026-06-15 11:07:41 +02:00
parent e479df82e2
commit 8f0ff9d47a
16 changed files with 192 additions and 143 deletions
+28 -28
View File
@@ -110,15 +110,15 @@ export default function HomePage() {
<span className={`text-sm font-bold ${currentStreak > 0 ? "text-orange-300" : "text-gray-500"}`}>
{currentStreak}
</span>
<span className="text-[10px] text-gray-500">day</span>
<span className="text-xs text-gray-500">day</span>
</div>
</div>
{/* XP Progress Bar */}
<div className="mt-2">
<div className="flex items-center justify-between mb-1">
<span className="text-[10px] text-gray-500">XP Progress</span>
<span className="text-[10px] text-gray-500">{currentXp} / {xpToNext} XP</span>
<span className="text-xs text-gray-500">XP Progress</span>
<span className="text-xs text-gray-500">{currentXp} / {xpToNext} XP</span>
</div>
<div className="h-1.5 bg-gray-800 rounded-full overflow-hidden">
<div
@@ -131,14 +131,14 @@ export default function HomePage() {
{/* Premium banner */}
{!isPremium && (
<Link href="/upgrade"
className="mt-3 flex items-center justify-between glass-gold rounded-2xl px-4 py-3 active:opacity-80 transition">
className="mt-3 flex items-center justify-between glass-gold rounded-2xl px-4 py-3.5 active:opacity-80 transition min-h-[44px]">
<div className="flex items-center gap-3">
<div className="w-8 h-8 rounded-full bg-[#D4AF37]/20 flex items-center justify-center">
<Sparkles size={16} className="text-[#D4AF37]" />
</div>
<div>
<p className="text-sm font-semibold text-[#D4AF37]">Go Premium</p>
<p className="text-[11px] text-gray-500">Unlock unlimited AI & more</p>
<p className="text-xs text-gray-500">Unlock unlimited AI & more</p>
</div>
</div>
<ChevronRight size={16} className="text-[#D4AF37]" />
@@ -147,7 +147,7 @@ export default function HomePage() {
{/* Pro badge */}
{isPro && (
<div className="mt-3 flex items-center gap-2 bg-purple-900/20 border border-purple-500/30 rounded-2xl px-4 py-2.5">
<div className="mt-3 flex items-center gap-2 bg-purple-900/20 border border-purple-500/30 rounded-2xl px-4 py-3 min-h-[44px]">
<Crown size={16} className="text-purple-400" />
<span className="text-sm font-medium text-purple-300">Pro Member Unlimited Everything</span>
</div>
@@ -155,27 +155,27 @@ export default function HomePage() {
{/* FLH Earning Rate - shown for premium/pro */}
{(isPremium || isPro) && (
<div className="mt-2 flex items-center gap-2 bg-gradient-to-r from-[#D4AF37]/10 to-purple-900/10 border border-[#D4AF37]/20 rounded-2xl px-4 py-2">
<div className="mt-2 flex items-center gap-2 bg-gradient-to-r from-[#D4AF37]/10 to-purple-900/10 border border-[#D4AF37]/20 rounded-2xl px-4 py-3 min-h-[44px]">
<TrendingUp size={14} className="text-[#D4AF37]" />
<span className="text-xs font-semibold text-[#D4AF37]">2x Earning Active</span>
<span className="text-[10px] text-gray-500"> Earn double FLH on marketplace sales</span>
<span className="text-xs text-gray-500"> Earn double FLH on marketplace sales</span>
</div>
)}
</div>
{/* Daily Verse */}
<div className="mx-4 mb-5 bg-gradient-to-br from-emerald-900/20 to-[#111118] border border-emerald-800/30 rounded-2xl p-4">
<div className="flex items-center gap-2 mb-2">
<div className="mx-4 mb-5 bg-gradient-to-br from-emerald-900/20 to-[#111118] border border-emerald-800/30 rounded-2xl p-5">
<div className="flex items-center gap-2 mb-3">
<BookOpen size={14} className="text-emerald-400" />
<span className="text-xs font-medium text-emerald-400">Daily Verse</span>
</div>
<p className="text-lg text-center font-arabic text-emerald-100 mb-2" dir="rtl">
<p className="text-lg text-center font-arabic text-emerald-100 mb-3" dir="rtl">
{verse.arabic}
</p>
<p className="text-sm text-gray-400 text-center italic">
&ldquo;{verse.translation}&rdquo;
</p>
<p className="text-[10px] text-gray-600 text-center mt-1"> {verse.reference}</p>
<p className="text-xs text-gray-600 text-center mt-2"> {verse.reference}</p>
</div>
{/* Streak Reward Card */}
@@ -184,7 +184,7 @@ export default function HomePage() {
canClaim
? "from-orange-900/20 to-amber-900/10 border-orange-700/30"
: "from-gray-900/30 to-gray-800/10 border-gray-800/30"
} border rounded-2xl p-4`}>
} border rounded-2xl p-5`}>
<div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-2">
<div className={`w-9 h-9 rounded-xl ${canClaim ? "bg-orange-900/40" : "bg-gray-800/40"} flex items-center justify-center`}>
@@ -192,7 +192,7 @@ export default function HomePage() {
</div>
<div>
<h3 className="text-sm font-semibold text-white">Daily Reward</h3>
<p className="text-[10px] text-gray-500">
<p className="text-xs text-gray-500">
{canClaim
? `Claim your streak reward — +${todayReward} FLH`
: "Reward claimed — come back tomorrow!"}
@@ -201,7 +201,7 @@ export default function HomePage() {
</div>
<div className="text-right">
<p className="text-lg font-bold text-orange-400">{todayReward.toLocaleString()}</p>
<p className="text-[9px] text-gray-600">FLH reward</p>
<p className="text-[10px] text-gray-600">FLH reward</p>
</div>
</div>
@@ -210,12 +210,12 @@ export default function HomePage() {
<button
onClick={handleClaimReward}
disabled={claiming}
className="w-full py-2.5 bg-gradient-to-r from-orange-600 to-amber-600 hover:from-orange-500 hover:to-amber-500 disabled:opacity-50 text-white text-sm font-semibold rounded-xl active:scale-[0.98] transition-all"
className="w-full py-3.5 bg-gradient-to-r from-orange-600 to-amber-600 hover:from-orange-500 hover:to-amber-500 disabled:opacity-50 text-white text-sm font-semibold rounded-xl active:scale-[0.98] transition-all min-h-[44px]"
>
{claiming ? "Claiming..." : "🔥 Claim Streak Reward"}
</button>
) : (
<div className="w-full py-2.5 bg-gray-800/50 text-gray-500 text-sm font-medium rounded-xl text-center">
<div className="w-full py-3.5 bg-gray-800/50 text-gray-500 text-sm font-medium rounded-xl text-center min-h-[44px] flex items-center justify-center">
Claimed
</div>
)}
@@ -228,7 +228,7 @@ export default function HomePage() {
)}
{/* XP hint */}
<p className="text-[10px] text-gray-700 text-center mt-2">
<p className="text-xs text-gray-700 text-center mt-3">
+{Math.min(10 + currentStreak * 2, 100)} XP also awarded on claim
</p>
</div>
@@ -237,17 +237,17 @@ export default function HomePage() {
{/* Quick Actions */}
<div className="px-4 mb-5">
<h2 className="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3">Quick Actions</h2>
<div className="grid grid-cols-4 gap-3">
<div className="grid grid-cols-2 gap-4">
<QuickAction href="/nur" icon={Bot} label="Nur AI" color="bg-amber-900/30 text-amber-300" />
<QuickAction href="/souq" icon={ShoppingBag} label="Souq" color="bg-[#D4AF37]/15 text-[#D4AF37]" />
<QuickAction href="/halal-monitor" icon={MapPin} label="Halal" color="bg-emerald-900/30 text-emerald-300" />
<QuickAction href="/halal-monitor" icon={MapPin} label="Halal Monitor" color="bg-emerald-900/30 text-emerald-300" />
<QuickAction href="/wallet" icon={Wallet} label="Wallet" color="bg-blue-900/30 text-blue-300" />
</div>
</div>
{/* Stats Row */}
<div className="mx-4 mb-5">
<div className="grid grid-cols-3 gap-3">
<div className="flex gap-3">
<StatCard label="FLH Balance" value={user.flhBalance.toLocaleString()} icon={Zap} color="text-[#D4AF37]" />
<StatCard label="AI Today" value={`${user.dailyMsgCount}/10`} icon={Bot} color="text-amber-400" />
<StatCard label="Tier" value={isPro ? "Pro" : isPremium ? "Premium" : "Free"} icon={Crown}
@@ -259,7 +259,7 @@ export default function HomePage() {
<div className="px-4">
<div className="flex items-center justify-between mb-3">
<h2 className="text-xs font-semibold text-gray-500 uppercase tracking-wider">Activity</h2>
<Link href="/forum" className="text-[11px] text-[#D4AF37]">View all</Link>
<Link href="/forum" className="text-xs text-[#D4AF37] min-h-[44px] inline-flex items-center">View all</Link>
</div>
<div className="bg-[#111118] border border-gray-800/60 rounded-2xl p-5 text-center">
<MessageCircle size={24} className="mx-auto text-gray-700 mb-2" />
@@ -270,7 +270,7 @@ export default function HomePage() {
{/* Premium upsell at bottom for free users */}
{!isPremium && (
<div className="mx-4 mt-5 bg-gradient-to-r from-[#D4AF37]/10 to-purple-900/10 border border-[#D4AF37]/20 rounded-2xl p-4 relative overflow-hidden">
<div className="mx-4 mt-5 bg-gradient-to-r from-[#D4AF37]/10 to-purple-900/10 border border-[#D4AF37]/20 rounded-2xl p-5 relative overflow-hidden">
<div className="absolute top-0 right-0 w-24 h-24 bg-[#D4AF37]/5 rounded-full -translate-y-1/2 translate-x-1/2 blur-2xl" />
<div className="flex items-start gap-3 relative">
<div className="w-10 h-10 rounded-2xl bg-[#D4AF37]/15 flex items-center justify-center shrink-0">
@@ -283,7 +283,7 @@ export default function HomePage() {
</h3>
<p className="text-xs text-gray-500 mt-1">Premium gives you unlimited AI, halal monitor, <strong className="text-gray-400">2x FLH earning</strong>, and marketplace access.</p>
<Link href="/upgrade"
className="inline-block mt-3 text-xs font-semibold text-[#D4AF37] border border-[#D4AF37]/40 rounded-full px-4 py-1.5 active:bg-[#D4AF37]/10 transition hover:shadow-[0_0_12px_rgba(212,175,55,0.3)]">
className="inline-block mt-3 text-xs font-semibold text-[#D4AF37] border border-[#D4AF37]/40 rounded-full px-6 py-3 active:bg-[#D4AF37]/10 transition hover:shadow-[0_0_12px_rgba(212,175,55,0.3)] min-h-[44px] leading-tight">
See Plans
</Link>
</div>
@@ -300,17 +300,17 @@ function QuickAction({ href, icon: Icon, label, color }: { href: string; icon: a
<div className={`w-14 h-14 rounded-2xl flex items-center justify-center ${color} bg-opacity-20`}>
<Icon size={22} />
</div>
<span className="text-[10px] text-gray-500 font-medium">{label}</span>
<span className="text-xs text-gray-500 font-medium">{label}</span>
</Link>
);
}
function StatCard({ label, value, icon: Icon, color }: { label: string; value: string; icon: any; color: string }) {
return (
<div className="bg-[#111118] border border-gray-800/60 rounded-2xl p-3 text-center">
<Icon size={14} className={`mx-auto mb-1 ${color}`} />
<div className="flex-1 bg-[#111118] border border-gray-800/60 rounded-2xl p-3 text-center">
<Icon size={16} className={`mx-auto mb-1 ${color}`} />
<p className="text-sm font-bold text-white">{value}</p>
<p className="text-[9px] text-gray-600 mt-0.5">{label}</p>
<p className="text-[10px] text-gray-600 mt-0.5">{label}</p>
</div>
);
}