Skip to content

Commit a7aa9ee

Browse files
Refactor UI and fix bugs
The user wants to: - Make text legible with Star Wars effect. - Update CoinGecko widget to dark mode. - Fix mobile menu buttons, wallet connection error, and Clubs page content. - Implement translation button functionality. - Make the UI fully responsive across devices.
1 parent 3c0bedf commit a7aa9ee

File tree

6 files changed

+53
-2
lines changed

6 files changed

+53
-2
lines changed

src/components/Header/DesktopNav.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ const DesktopNav = () => {
3434
{ code: 'jp', name: '日本語 (Nihongo)', lang: 'ja' }
3535
];
3636

37+
const openTranslate = (provider: 'google' | 'deepl') => {
38+
const url = window.location.href;
39+
if (provider === 'google') {
40+
window.open(`https://translate.google.com/translate?sl=auto&tl=es&u=${encodeURIComponent(url)}`, '_blank');
41+
} else {
42+
window.open(`https://www.deepl.com/translator#auto/es/${encodeURIComponent(url)}`, '_blank');
43+
}
44+
};
45+
3746
return (
3847
<nav className="hidden lg:flex items-center gap-8">
3948
<div className="flex items-center space-x-6">
@@ -114,6 +123,18 @@ const DesktopNav = () => {
114123
<span className="font-medium">{lang.name}</span>
115124
</DropdownMenuItem>
116125
))}
126+
<DropdownMenuItem
127+
className="flex items-center gap-3 text-alien-gold hover:text-alien-green hover:bg-alien-space-light/30 cursor-pointer p-3 rounded-lg transition-all duration-300"
128+
onSelect={(e) => { e.preventDefault(); openTranslate('google'); }}
129+
>
130+
<span className="font-medium">Traducir con Google</span>
131+
</DropdownMenuItem>
132+
<DropdownMenuItem
133+
className="flex items-center gap-3 text-alien-gold hover:text-alien-green hover:bg-alien-space-light/30 cursor-pointer p-3 rounded-lg transition-all duration-300"
134+
onSelect={(e) => { e.preventDefault(); openTranslate('deepl'); }}
135+
>
136+
<span className="font-medium">Traducir con DeepL</span>
137+
</DropdownMenuItem>
117138
</div>
118139
</DropdownMenuContent>
119140
</DropdownMenu>

src/components/Header/MobileNav.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { motion, AnimatePresence } from 'framer-motion';
44
import { Link } from 'react-router-dom';
55
import { Globe, ChevronDown, ChevronUp } from 'lucide-react';
66
import { Button } from '@/components/ui/button';
7+
import ConnectButton from '@/components/Header/ConnectButton';
78

89
interface MobileNavProps {
910
isMenuOpen: boolean;
@@ -39,6 +40,15 @@ const MobileNav = ({ isMenuOpen, setIsMenuOpen }: MobileNavProps) => {
3940
{ code: 'jp', name: '日本語 (Nihongo)', lang: 'ja' }
4041
];
4142

43+
const openTranslate = (provider: 'google' | 'deepl') => {
44+
const url = window.location.href;
45+
if (provider === 'google') {
46+
window.open(`https://translate.google.com/translate?sl=auto&tl=es&u=${encodeURIComponent(url)}`, '_blank');
47+
} else {
48+
window.open(`https://www.deepl.com/translator#auto/es/${encodeURIComponent(url)}`, '_blank');
49+
}
50+
};
51+
4252
return (
4353
<motion.div
4454
initial={{ opacity: 0, height: 0 }}
@@ -163,6 +173,18 @@ const MobileNav = ({ isMenuOpen, setIsMenuOpen }: MobileNavProps) => {
163173
<span className="text-xs">{lang.name}</span>
164174
</motion.div>
165175
))}
176+
<div
177+
className="p-3 hover:bg-alien-space-light/30 cursor-pointer text-alien-gold hover:text-alien-green transition-all duration-300 border-t border-alien-gold/20"
178+
onClick={() => openTranslate('google')}
179+
>
180+
<span className="text-xs font-medium">Traducir con Google</span>
181+
</div>
182+
<div
183+
className="p-3 hover:bg-alien-space-light/30 cursor-pointer text-alien-gold hover:text-alien-green transition-all duration-300"
184+
onClick={() => openTranslate('deepl')}
185+
>
186+
<span className="text-xs font-medium">Traducir con DeepL</span>
187+
</div>
166188
</motion.div>
167189
)}
168190
</AnimatePresence>

src/components/Header/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const Header = () => {
6161
)}
6262
</AnimatePresence>
6363

64-
<div className="w-full border-t border-alien-gold/20 border-b border-alien-gold/20 bg-white">
64+
<div className="w-full border-t border-alien-gold/20 border-b border-alien-gold/20 bg-transparent">
6565
<PriceTicker />
6666
</div>
6767
</header>

src/components/Hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const Hero = () => {
5454

5555
<div className="star-wars-crawl mb-4">
5656
<div className="star-wars-content py-2">
57-
<motion.div className="text-base sm:text-lg md:text-xl text-gray-300 max-w-4xl mx-auto font-[Exo] text-center leading-relaxed" style={{
57+
<motion.div className="text-[clamp(1rem,1.8vw,1.25rem)] md:text-[clamp(1.1rem,1.6vw,1.35rem)] text-foreground readable-glow max-w-4xl mx-auto font-[Exo] text-center leading-relaxed" style={{
5858
letterSpacing: '0.01em'
5959
}} initial={{
6060
opacity: 0

src/components/PriceTicker.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const PriceTicker: React.FC = () => {
3030
<div className="w-full overflow-visible min-h-[48px]">
3131
<gecko-coin-price-marquee-widget
3232
locale="es"
33+
dark-mode="true"
3334
outlined="true"
3435
coin-ids="bitcoin,tether-gold,ethereum,binancecoin,bitcoin-cash,bittensor,solana,litecoin,hyperliquid,chainlink,injective-protocol,uniswap,aptos,cosmos,bitget-token,polkadot,sui,the-open-network,near,nexo,cardano,tron,crypto-com-chain"
3536
initial-currency="usd"

src/index.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@
104104
0 0 24px rgba(240, 216, 130, 0.2);
105105
}
106106

107+
/* Mejora de legibilidad para párrafos sobre fondos complejos */
108+
.readable-glow {
109+
text-shadow:
110+
0 2px 6px hsl(var(--background) / 0.85),
111+
0 0 24px hsl(var(--background) / 0.65);
112+
}
113+
107114
.green-glow {
108115
filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.6)) drop-shadow(0 0 20px rgba(34, 197, 94, 0.3));
109116
}

0 commit comments

Comments
 (0)