Skip to content

Commit d40528f

Browse files
Merge pull request #20 from stellar-nexus-experience/development
Development
2 parents b7461bc + fd206e0 commit d40528f

File tree

16 files changed

+725
-83
lines changed

16 files changed

+725
-83
lines changed

app/home/page.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import {
3434
LeaderboardSection,
3535
} from '@/components/home';
3636
import { DEMO_CARDS } from '@/utils/constants/demos';
37+
import { BackgroundSnow } from '@/components/ui/christmas/BackgroundSnow';
3738

3839
export default function HomePageContent() {
3940
const { isConnected } = useGlobalWallet();
@@ -230,6 +231,9 @@ export default function HomePageContent() {
230231

231232
return (
232233
<div className='min-h-screen bg-gradient-to-br from-neutral-900 via-brand-900 to-neutral-900 relative overflow-hidden'>
234+
{/* Christmas Background Snow */}
235+
<BackgroundSnow />
236+
233237
{/* Structured Data for SEO */}
234238
<script
235239
type='application/ld+json'

app/layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22
import type { Metadata } from 'next';
33
import { Inter } from 'next/font/google';
44
import './globals.css';
5+
import '../styles/christmas-animations.css';
56
import { config } from '@/lib/config';
67
import { RootProviders } from './root';
78
import { GoogleAnalytics } from '@/components/analytics/GoogleAnalytics';

components/home/HeroSection.tsx

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import Image from 'next/image';
44
import { Tooltip } from '@/components/ui/Tooltip';
5+
import { ChristmasHat } from '@/components/ui/christmas/ChristmasHat';
56

67
interface HeroSectionProps {
78
isVideoPlaying: boolean;
@@ -30,7 +31,7 @@ export const HeroSection = ({
3031
<div className='text-center'>
3132
{/* Page Header */}
3233
<div className='text-center mb-16'>
33-
<div className='flex justify-center mb-6'>
34+
<div className='flex justify-center mb-6 relative'>
3435
<Image
3536
src='/images/logo/logoicon.png'
3637
alt='STELLAR NEXUS'
@@ -39,6 +40,15 @@ export const HeroSection = ({
3940
priority
4041
style={{ zIndex: -1, position: 'relative', width: 'auto', height: 'auto' }}
4142
/>
43+
<ChristmasHat
44+
size={200}
45+
style={{
46+
position: 'absolute',
47+
top: '25px',
48+
right: 'calc(50% - 130px)',
49+
zIndex: 10
50+
}}
51+
/>
4252
</div>
4353

4454
{/* Epic Legendary Background for Title */}
@@ -135,10 +145,9 @@ export const HeroSection = ({
135145
text-white shadow-lg border-2 border-white/20
136146
137147
// ✅ 2. ESTILOS CONDICIONALES BASADOS EN EL ESTADO ✅
138-
${
139-
isTechTreeDisabled
140-
? 'opacity-50 cursor-not-allowed transform scale-100' // Estado Deshabilitado
141-
: 'bg-gradient-to-r from-brand-500/20 to-accent-500/20 hover:from-brand-800/50 hover:to-accent-800/50 transform hover:scale-105 hover:shadow-xl hover:border-white/40' // Estado Habilitado
148+
${isTechTreeDisabled
149+
? 'opacity-50 cursor-not-allowed transform scale-100' // Estado Deshabilitado
150+
: 'bg-gradient-to-r from-brand-500/20 to-accent-500/20 hover:from-brand-800/50 hover:to-accent-800/50 transform hover:scale-105 hover:shadow-xl hover:border-white/40' // Estado Habilitado
142151
}
143152
`}
144153
>
@@ -190,11 +199,10 @@ export const HeroSection = ({
190199
e.preventDefault();
191200
}
192201
}}
193-
className={`relative w-full md:w-auto px-6 md:px-8 py-4 font-bold rounded-xl transition-all duration-300 flex items-center justify-center space-x-3 transform shadow-lg border-2 ${
194-
miniGamesUnlocked
195-
? '!animate-none bg-gradient-to-r from-brand-500 to-accent-500 hover:from-brand-600 hover:to-accent-600 text-white hover:scale-105 hover:shadow-xl border-white/20 hover:border-white/40 cursor-pointer '
196-
: 'bg-gray-600 text-gray-400 border-gray-600 cursor-not-allowed'
197-
}`}
202+
className={`relative w-full md:w-auto px-6 md:px-8 py-4 font-bold rounded-xl transition-all duration-300 flex items-center justify-center space-x-3 transform shadow-lg border-2 ${miniGamesUnlocked
203+
? '!animate-none bg-gradient-to-r from-brand-500 to-accent-500 hover:from-brand-600 hover:to-accent-600 text-white hover:scale-105 hover:shadow-xl border-white/20 hover:border-white/40 cursor-pointer '
204+
: 'bg-gray-600 text-gray-400 border-gray-600 cursor-not-allowed'
205+
}`}
198206
title={
199207
isLoadingAccount && isConnected
200208
? 'Loading your account...'

components/layout/Footer.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use client';
22

33
import { appConfig, stellarConfig } from '@/lib/stellar/wallet-config';
4+
import { ChristmasHat } from '@/components/ui/christmas/ChristmasHat';
45
import Image from 'next/image';
56

67
export const Footer = () => {
@@ -13,13 +14,22 @@ export const Footer = () => {
1314
{/* App Information */}
1415
<div className='max-w-2xl mx-auto'>
1516
<div className='flex items-center justify-center space-x-3 mb-4'>
16-
<div className='-mt-4'>
17+
<div className='-mt-4 relative inline-block'>
1718
<Image
1819
src='/images/logo/logoicon.png'
1920
alt='STELLAR NEXUS'
2021
width={150}
2122
height={150}
2223
/>
24+
<ChristmasHat
25+
size={105}
26+
style={{
27+
position: 'absolute',
28+
top: '-5px',
29+
right: '15px',
30+
zIndex: 10
31+
}}
32+
/>
2333
</div>
2434
<div>
2535
<Image

components/layout/Header.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { Tooltip } from '@/components/ui/Tooltip';
88
import { UserDropdown } from '@/components/ui/navigation/UserDropdown';
99
import { RewardsSidebar } from '@/components/ui/RewardsSidebar';
1010
import { NotificationBell } from '@/components/ui/NotificationBell';
11+
import { ChristmasHat } from '@/components/ui/christmas/ChristmasHat';
1112
import Image from 'next/image';
1213

1314
export const Header = () => {
@@ -95,14 +96,23 @@ export const Header = () => {
9596
{/* Logo and App Name */}
9697
<div className='flex items-center space-x-1'>
9798
<div className='flex items-center space-x-2'>
98-
<a href='/' className='hover:opacity-80 transition-opacity duration-300'>
99+
<a href='/' className='hover:opacity-80 transition-opacity duration-300 relative inline-block'>
99100
<Image
100101
src='/images/logo/iconletter.png'
101102
alt='STELLAR NEXUS'
102103
width={80}
103104
height={24}
104105
style={{ width: 'auto', height: 'auto' }}
105106
/>
107+
<ChristmasHat
108+
size={35}
109+
style={{
110+
position: 'absolute',
111+
top: '-18px',
112+
right: '-5px',
113+
zIndex: 10
114+
}}
115+
/>
106116
</a>
107117
<span className='font-bold'>Web3 Experience</span>
108118
<p className='text-xs text-white/60'>v{appConfig.version}</p>
@@ -281,8 +291,8 @@ export const Header = () => {
281291
}
282292
}}
283293
className={`block px-3 py-2 rounded-md transition-colors ${miniGamesUnlocked
284-
? 'text-white/80 hover:text-white hover:bg-white/10'
285-
: 'text-white/40 cursor-not-allowed'
294+
? 'text-white/80 hover:text-white hover:bg-white/10'
295+
: 'text-white/40 cursor-not-allowed'
286296
}`}
287297
>
288298
<div className='flex items-center space-x-2'>

components/layout/NexusPrime.tsx

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import React, { useState, useEffect, useRef, useCallback, useMemo } from 'react';
44
import Image from 'next/image';
5+
import { ChristmasHat } from '@/components/ui/christmas/ChristmasHat';
56

67
interface NexusPrimeProps {
78
currentPage?: string;
@@ -159,12 +160,12 @@ export const NexusPrime: React.FC<NexusPrimeProps> = ({
159160
if (
160161
gameId &&
161162
characterMessages['mini-games'].games[
162-
gameId as keyof (typeof characterMessages)['mini-games']['games']
163+
gameId as keyof (typeof characterMessages)['mini-games']['games']
163164
]
164165
) {
165166
const gameMessages =
166167
characterMessages['mini-games'].games[
167-
gameId as keyof (typeof characterMessages)['mini-games']['games']
168+
gameId as keyof (typeof characterMessages)['mini-games']['games']
168169
];
169170
// Rotate through different message types for variety
170171
const messageTypes = [gameMessages.welcome, gameMessages.tips, gameMessages.encouragement];
@@ -435,6 +436,17 @@ export const NexusPrime: React.FC<NexusPrimeProps> = ({
435436
</div>
436437
)}
437438
</div>
439+
440+
{/* Christmas Hat on NexusPrime */}
441+
<ChristmasHat
442+
size={85}
443+
style={{
444+
position: 'absolute',
445+
top: '-26px',
446+
right: '22px',
447+
zIndex: 20
448+
}}
449+
/>
438450
</div>
439451

440452
{/* Speech Bubble - Don't show during loading */}
@@ -537,11 +549,10 @@ export const NexusPrime: React.FC<NexusPrimeProps> = ({
537549
<button
538550
onClick={previousTutorialStep}
539551
disabled={tutorialStep === 0}
540-
className={`flex-1 px-2 py-1.5 text-xs rounded-lg transition-colors border ${
541-
tutorialStep === 0
542-
? 'bg-white/5 text-white/30 border-white/10 cursor-not-allowed'
543-
: 'bg-white/10 hover:bg-white/20 text-white border-white/20 hover:border-white/30'
544-
}`}
552+
className={`flex-1 px-2 py-1.5 text-xs rounded-lg transition-colors border ${tutorialStep === 0
553+
? 'bg-white/5 text-white/30 border-white/10 cursor-not-allowed'
554+
: 'bg-white/10 hover:bg-white/20 text-white border-white/20 hover:border-white/30'
555+
}`}
545556
>
546557
← Previous
547558
</button>

components/ui/NotificationBell.tsx

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useState, useEffect, useRef } from 'react';
44
import { useAccount } from '@/contexts/auth/AccountContext';
55
import { notificationService, Notification } from '@/lib/services/notification-service';
66
import { useRouter } from 'next/navigation';
7+
import { getBadgeIcon } from '@/utils/constants/badges/assets';
78

89
export const NotificationBell: React.FC = () => {
910
const { account } = useAccount();
@@ -138,6 +139,21 @@ export const NotificationBell: React.FC = () => {
138139
}
139140
};
140141

142+
const getBadgeNotificationColor = (badgeId?: string) => {
143+
switch (badgeId) {
144+
case 'escrow_expert':
145+
return 'bg-blue-500/20'; // Blue for Escrow Expert
146+
case 'trust_guardian':
147+
return 'bg-orange-500/20'; // Orange for Trust Guardian
148+
case 'stellar_champion':
149+
return 'bg-pink-500/20'; // Pink for Stellar Champion
150+
case 'nexus_master':
151+
return 'bg-green-500/20'; // Green for Nexus Master
152+
default:
153+
return 'bg-gray-500/20'; // Default gray
154+
}
155+
};
156+
141157
const formatTimeAgo = (timestamp: any) => {
142158
const now = new Date();
143159
const notificationDate = timestamp.toDate();
@@ -207,17 +223,12 @@ export const NotificationBell: React.FC = () => {
207223
<button
208224
key={notification.id}
209225
onClick={() => handleNotificationClick(notification)}
210-
className={`w-full text-left p-3 rounded-lg border transition-all duration-200 hover:scale-[1.02] ${
211-
notification.read
212-
? 'bg-white/5 border-white/10 opacity-60'
213-
: `bg-gradient-to-br ${getNotificationColor(notification.type)}`
214-
}`}
226+
className={`w-full text-left p-3 rounded-lg border transition-all duration-200 hover:scale-[1.02] ${notification.read
227+
? 'bg-white/5 border-white/10 opacity-60'
228+
: `bg-gradient-to-br ${getNotificationColor(notification.type)}`
229+
}`}
215230
>
216231
<div className='flex items-start gap-3'>
217-
{/* Icon */}
218-
<div className='text-2xl flex-shrink-0'>
219-
{getNotificationIcon(notification.type)}
220-
</div>
221232

222233
{/* Content */}
223234
<div className='flex-1 min-w-0'>
@@ -245,8 +256,15 @@ export const NotificationBell: React.FC = () => {
245256
)}
246257
{/* Mostrar Insignia Ganada (NUEVO) */}
247258
{notification.data?.badgeName && (
248-
<div className='inline-flex items-center gap-1 text-xs font-semibold text-purple-400 bg-purple-500/20 px-2 py-1 rounded'>
249-
🏅 {notification.data.badgeName}
259+
<div className={`inline-flex items-center gap-1 text-xs font-semibold text-white ${getBadgeNotificationColor(notification.data.badgeId)} px-2 py-1 rounded`}>
260+
{notification.data.badgeId ? (
261+
<span className="w-4 h-4 flex items-center justify-center">
262+
{getBadgeIcon(notification.data.badgeId, 'w-4 h-4')}
263+
</span>
264+
) : (
265+
'🏅'
266+
)}
267+
{notification.data.badgeName}
250268
</div>
251269
)}
252270
</div>

0 commit comments

Comments
 (0)