Skip to content

Commit 21b74fc

Browse files
authored
Merge pull request #90 from CrackCode-dev/nadeesha-backup3
feat(home): update game icons and improve invite card layout
2 parents fbde312 + d61970b commit 21b74fc

8 files changed

Lines changed: 165 additions & 144 deletions

File tree

LandingPage/client/src/components/contact-section.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ export default function ContactSection() {
360360

361361
<nav aria-label="CrackCode Social Media Links" className="space-y-3">
362362
<a
363-
href="https://www.linkedin.com/in/crack-code-619461396"
363+
href="https://www.linkedin.com/company/crackcode"
364364
target="_blank"
365365
rel="noopener noreferrer"
366366
aria-label="CrackCode on LinkedIn (opens in new tab)"

crackcode/client/src/components/common/Footer.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ const Footer = ({ variant = "default" }) => {
1919
const navigate = useNavigate();
2020
const location = useLocation();
2121

22-
const footerAtBottom = ['/', '/login', '/email-verify', '/reset-password', '/gamer-profile', '/privacy', '/terms', '/contact']
22+
const footerAtBottom = ['/', '/login', '/email-verify', '/reset-password', '/gamer-profile']
2323
const footerAtEase = !footerAtBottom.includes(location.pathname);
2424

2525
const handleLogoClick = () => {
2626
if (!footerAtEase) {
2727
navigate('/');
2828
} else {
29-
navigate('/home');
29+
window.scrollTo({ top: 0, behavior: 'smooth' });
3030
}
3131
}
3232

crackcode/client/src/components/home/BrainBreaker.jsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
import { useState } from 'react';
2-
import { Zap, X, ExternalLink } from 'lucide-react';
2+
import { Zap, X, ExternalLink, Gamepad2 ,FileDigit, SquarePen, BrickWallShield } from 'lucide-react';
33

44
const GAMES = [
55
{
66
id: 'binary-bitz',
77
name: 'Binary-Bitz',
88
description: 'Master number systems! Learn decimal, hexadecimal, binary and more. Challenge yourself with fun interactive puzzles.',
9-
icon: '🔢',
10-
color: '#FF6B6B',
9+
icon: <FileDigit />,
10+
color: '#FF3E9B',
1111
url: 'https://crackcodegames.vercel.app'
1212
},
1313
{
1414
id: 'wordhunt',
1515
name: 'WordHunt',
1616
description: 'A word puzzle game like Wordle! Fill in related terms and words. Test your vocabulary and deduction skills.',
17-
icon: '📝',
18-
color: '#4ECDC4',
17+
icon: <SquarePen />,
18+
color: '#9D4EDD',
1919
url: 'https://wordhunt-beta.vercel.app'
2020
},
2121
{
2222
id: 'codedefense',
2323
name: 'CodeDefense',
2424
description: 'Protect your server from bugs! Answer programming questions correctly to defend against cyber threats.',
25-
icon: '🛡️',
26-
color: '#95E1D3',
25+
icon: <BrickWallShield />,
26+
color: '#48A111',
2727
url: 'https://codedefense.vercel.app'
2828
}
2929
];
@@ -42,10 +42,10 @@ export default function BrainBreaker() {
4242
color: 'var(--text)'
4343
}}
4444
>
45-
<div className='flex items-center gap-3 mb-6'>
46-
<Zap className='w-6 h-6' style={{ color: 'var(--brand)' }} />
45+
<div className='flex items-start gap-3 mb-6'>
46+
<Gamepad2 className='w-6 h-6 mt-1' style={{ color: 'var(--brand)' }} />
4747
<div>
48-
<h3 className='text-2xl font-bold'>🎮 Brain Breaker</h3>
48+
<h3 className='text-2xl font-bold'> Brain Breaker</h3>
4949
<p style={{ color: 'var(--textSec)' }} className='text-sm'>
5050
Take a quick break with mini-games to refresh your mind!
5151
</p>
@@ -76,7 +76,9 @@ export default function BrainBreaker() {
7676
}}
7777
>
7878
<div className='flex justify-between items-start w-full'>
79-
<span className='text-4xl'>{game.icon}</span>
79+
<span className='text-4xl' style={{ color: game.color }}>
80+
{game.icon}
81+
</span>
8082
<ExternalLink size={16} style={{ color: game.color }} />
8183
</div>
8284
<div>

crackcode/client/src/components/home/ChallengesThisWeek.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useState, useEffect } from 'react';
22
import { useTheme } from '../../context/theme/ThemeContext';
3-
import { Calendar, CheckCircle2, Clock, Flame, ArrowRight, ChartColumnBig, Scissors, Pyramid, Cog } from 'lucide-react';
3+
import { Calendar, CheckCircle2, Clock, Flame, ArrowRight, ListTodo } from 'lucide-react';
44
import Badge from '../ui/Badge';
55
import Button from '../ui/Button';
66
import { useNavigate } from 'react-router-dom'
@@ -62,7 +62,7 @@ export default function ChallengesThisWeek() {
6262
points: t.variant?.points || t.points || 300,
6363
completed: it.completed || 0,
6464
total: it.total || 1,
65-
icon: '📊',
65+
icon: <ListTodo />,
6666
color: '#FF6B6B',
6767
raw: it,
6868
transformed: t,
@@ -139,7 +139,7 @@ export default function ChallengesThisWeek() {
139139
{/* Header */}
140140
<div className='flex items-start justify-between mb-4'>
141141
<div className='flex items-start gap-3 flex-1'>
142-
<span className='text-3xl'>{challenge.icon || '📊'}</span>
142+
<span className='text-3xl mt-1'>{challenge.icon}</span>
143143
<div className='flex-1 min-w-0'>
144144
<h3 className='text-lg font-bold mb-1'>{challenge.title}</h3>
145145
{/* Only show minimal meta on card. Full problem visible in editor. */}

crackcode/client/src/components/home/InviteCard.jsx

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { useState } from 'react';
22
import { useTheme } from '../../context/theme/ThemeContext'
3-
import { Mail, Link, Copy, CheckCircle2 } from 'lucide-react';
3+
import { Mail, Link, Link2, Copy, CheckCircle2 } from 'lucide-react';
44
import Button from '../ui/Button';
55

66
function InviteCard() {
77
const { theme } = useTheme()
88
const [copied, setCopied] = useState(false);
9-
const inviteLink = 'https://codedetectives.com/invite/abc123xyz';
9+
const inviteLink = 'https://app.crackcodehq.com';
1010
const friendsInvited = 3;
1111
const bonusPoints = 450;
1212

@@ -26,13 +26,21 @@ function InviteCard() {
2626
borderWidth: '1px'
2727
}}
2828
>
29-
<div className='grid grid-cols-1 md:grid-cols-3 gap-6 items-center'>
29+
<div className='grid grid-cols-1 md:grid-cols-2 gap-6 items-center'>
3030
{/* Left: Info */}
31-
<div className='md:col-span-1'>
32-
<h3 className="text-lg font-bold mb-1">🎉 Invite Friends</h3>
33-
<p style={{ color: 'var(--textSec)' }} className="text-xs">
34-
Earn bonus points together
35-
</p>
31+
<div className='flex flex-row md:col-span-1 gap-6'>
32+
<div>
33+
<h3 className="flex items-center justify-baseline gap-2 text-lg font-bold mb-1">
34+
<span><Link2 /></span>
35+
Invite Friends
36+
</h3>
37+
</div>
38+
<div>
39+
<p style={{ color: 'var(--textSec)' }} className="text-xs">
40+
Know someone who’d enjoy learning to code through challenges and stories? <br />
41+
Send them this link and let them jump in!
42+
</p>
43+
</div>
3644
</div>
3745

3846
{/* Center: Copy Link */}
@@ -45,7 +53,7 @@ function InviteCard() {
4553
className="flex-1 rounded-lg px-3 py-2 text-xs focus:outline-none transition-all duration-300"
4654
style={{
4755
background: 'rgba(255, 165, 0, 0.05)',
48-
color: 'var(--text)',
56+
color: 'var(--muted)',
4957
border: '1px solid var(--border)'
5058
}}
5159
/>
@@ -72,7 +80,7 @@ function InviteCard() {
7280
</div>
7381

7482
{/* Right: Stats */}
75-
<div className='md:col-span-1 flex gap-4'>
83+
{/* <div className='md:col-span-1 flex gap-4'>
7684
<div className='flex-1'>
7785
<p className="text-xs font-semibold mb-1" style={{ color: 'var(--textSec)' }}>
7886
Invited
@@ -89,7 +97,7 @@ function InviteCard() {
8997
+{bonusPoints}
9098
</p>
9199
</div>
92-
</div>
100+
</div> */}
93101
</div>
94102
</div>
95103
);

0 commit comments

Comments
 (0)