Skip to content

Commit 74b859f

Browse files
Improve footer UI design and responsiveness
1 parent b3f511c commit 74b859f

3 files changed

Lines changed: 130 additions & 39 deletions

File tree

src/theme/Footer/Layout/enhanced-footer.css

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -871,15 +871,38 @@ html[data-theme="light"] .enhanced-footer.light-theme {
871871
text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
872872
}
873873

874+
.footer-icon {
875+
display: inline-flex;
876+
align-items: center;
877+
justify-content: center;
878+
flex-shrink: 0;
879+
line-height: 0;
880+
color: currentColor;
881+
}
882+
883+
.footer-icon svg {
884+
width: 100%;
885+
height: 100%;
886+
fill: none !important;
887+
stroke: currentColor;
888+
stroke-linecap: round;
889+
stroke-linejoin: round;
890+
}
891+
874892
.column-icon {
875893
width: 20px;
876894
height: 20px;
877895
border-radius: 6px;
878896
display: flex;
879897
align-items: center;
880898
justify-content: center;
881-
font-size: 12px;
882899
flex-shrink: 0;
900+
color: #ffffff;
901+
}
902+
903+
.column-icon .footer-icon {
904+
width: 12px;
905+
height: 12px;
883906
}
884907

885908
.resources-icon {
@@ -891,7 +914,6 @@ html[data-theme="light"] .enhanced-footer.light-theme {
891914
}
892915

893916
.support-icon {
894-
font-size: 12px !important;
895917
background: linear-gradient(135deg, #10b981 0%, #047857 100%);
896918
}
897919

@@ -1011,20 +1033,19 @@ html[data-theme="light"] .enhanced-footer.light-theme {
10111033
}
10121034

10131035
.link-icon {
1014-
font-size: 16px;
1036+
width: 16px;
1037+
height: 16px;
10151038
opacity: 0.7;
10161039
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
1017-
filter: grayscale(0.3) brightness(0.9);
10181040
z-index: 2;
10191041
position: relative;
1020-
display: inline-block;
1042+
color: rgba(226, 232, 240, 0.82);
10211043
}
10221044

10231045
.footer-link:hover .link-icon {
10241046
opacity: 1;
1025-
filter: grayscale(0) brightness(1.2) saturate(1.1);
1026-
transform: scale(1.15) rotate(8deg) translateZ(0);
1027-
text-shadow: 0 0 6px rgba(102, 126, 234, 0.3);
1047+
color: #ffffff;
1048+
transform: scale(1.12) translateZ(0);
10281049
text-decoration: none;
10291050
}
10301051

@@ -1240,11 +1261,20 @@ html[data-theme="light"] .enhanced-footer.light-theme {
12401261
}
12411262

12421263
.newsletter-stat {
1264+
display: inline-flex;
1265+
align-items: center;
1266+
gap: 8px;
12431267
font-size: 12px;
12441268
color: #94a3b8;
12451269
font-weight: 400;
12461270
}
12471271

1272+
.newsletter-stat-icon {
1273+
width: 14px;
1274+
height: 14px;
1275+
color: #93c5fd;
1276+
}
1277+
12481278
/* Quick Links Section */
12491279
.quick-links-section {
12501280
margin-top: 24px;
@@ -1304,7 +1334,9 @@ html[data-theme="light"] .enhanced-footer.light-theme {
13041334
}
13051335

13061336
.links-icon {
1307-
font-size: 12px;
1337+
width: 14px;
1338+
height: 14px;
1339+
color: #cbd5e1;
13081340
}
13091341

13101342
.quick-links-list {
@@ -1378,17 +1410,19 @@ html[data-theme="light"] .enhanced-footer.light-theme {
13781410
}
13791411

13801412
.quick-link-icon {
1381-
font-size: 14px;
1413+
width: 14px;
1414+
height: 14px;
13821415
opacity: 0.8;
13831416
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
13841417
z-index: 1;
13851418
position: relative;
1419+
color: #cbd5e1;
13861420
}
13871421

13881422
.quick-link:hover .quick-link-icon {
13891423
opacity: 1;
1390-
transform: scale(1.2) rotate(8deg);
1391-
filter: brightness(1.2);
1424+
color: #ffffff;
1425+
transform: scale(1.12);
13921426
}
13931427

13941428
/* Bottom Section */
@@ -2053,8 +2087,10 @@ html[data-theme="light"] .enhanced-footer.light-theme {
20532087
}
20542088

20552089
.toast-icon {
2056-
font-size: 24px;
2090+
width: 24px;
2091+
height: 24px;
20572092
margin-right: 12px;
2093+
color: #667eea;
20582094
}
20592095

20602096
.toast-message h4 {

src/theme/Footer/Layout/index.tsx

Lines changed: 80 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@ import React, { type ReactNode, useState, useEffect } from "react";
22
import Link from "@docusaurus/Link";
33
import { useSafeColorMode } from "@site/src/utils/useSafeColorMode";
44
import clsx from "clsx";
5+
import {
6+
Award,
7+
BarChart3,
8+
BookOpen,
9+
BookText,
10+
BriefcaseBusiness,
11+
Building2,
12+
CheckCircle2,
13+
Handshake,
14+
LayoutDashboard,
15+
LifeBuoy,
16+
Link2,
17+
Mail,
18+
type LucideIcon,
19+
MessageCircleQuestion,
20+
Mic2,
21+
MonitorPlay,
22+
Newspaper,
23+
Puzzle,
24+
Rocket,
25+
Sparkles,
26+
Users,
27+
Video,
28+
} from "lucide-react";
529
import "./enhanced-footer.css";
630
import Counter from "./Counter";
731
import { createPortal } from "react-dom";
@@ -16,6 +40,19 @@ interface FooterStats {
1640

1741
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
1842

43+
type FooterIconProps = {
44+
icon: LucideIcon;
45+
className?: string;
46+
};
47+
48+
function FooterIcon({ icon: Icon, className }: FooterIconProps) {
49+
return (
50+
<span className={clsx("footer-icon", className)} aria-hidden="true">
51+
<Icon strokeWidth={2} />
52+
</span>
53+
);
54+
}
55+
1956
export default function FooterLayout(): ReactNode {
2057
const { isDark } = useSafeColorMode();
2158

@@ -95,7 +132,7 @@ export default function FooterLayout(): ReactNode {
95132
createPortal(
96133
<div className="newsletter-toast">
97134
<div className="toast-content">
98-
<span className="toast-icon">🎉</span>
135+
<FooterIcon icon={CheckCircle2} className="toast-icon" />
99136
<div className="toast-message">
100137
<h4>Successfully Subscribed!</h4>
101138
<p>Thank you for joining our newsletter.</p>
@@ -105,11 +142,11 @@ export default function FooterLayout(): ReactNode {
105142
onClick={() => setShowToast(false)}
106143
aria-label="Close notification"
107144
>
108-
×
145+
x
109146
</button>
110147
</div>
111148
</div>,
112-
document.body, // 👈 mounts toast directly to <body>, outside footer
149+
document.body, // mounts toast directly to <body>, outside footer
113150
)}
114151

115152
{/* Hero Section */}
@@ -230,40 +267,42 @@ export default function FooterLayout(): ReactNode {
230267
{/* Learning Column */}
231268
<div className="footer-column">
232269
<h3 className="footer-column-title">
233-
<div className="column-icon resources-icon">📚</div>
270+
<div className="column-icon resources-icon">
271+
<FooterIcon icon={BookOpen} />
272+
</div>
234273
Learning
235274
</h3>
236275
<ul className="footer-links">
237276
<li>
238277
<Link to="/docs" className="footer-link">
239-
<span className="link-icon">📖</span>
278+
<FooterIcon icon={BookText} className="link-icon" />
240279
Documentation
241280
<span className="link-badge popular">Popular</span>
242281
</Link>
243282
</li>
244283
<li>
245284
<Link to="/courses" className="footer-link">
246-
<span className="link-icon">🎥</span>
285+
<FooterIcon icon={Video} className="link-icon" />
247286
Video Courses
248287
<span className="link-badge new">New</span>
249288
</Link>
250289
</li>
251290
<li>
252291
<Link to="/get-started" className="footer-link">
253-
<span className="link-icon">🚀</span>
292+
<FooterIcon icon={Rocket} className="link-icon" />
254293
Get Started
255294
</Link>
256295
</li>
257296
<li>
258297
<Link to="/interview-prep" className="footer-link">
259-
<span className="link-icon">🧩</span>
298+
<FooterIcon icon={Puzzle} className="link-icon" />
260299
Interview Prep
261300
<span className="link-badge hot">Hot</span>
262301
</Link>
263302
</li>
264303
<li>
265304
<Link to="/badges/github-badges" className="footer-link">
266-
<span className="link-icon">🏆</span>
305+
<FooterIcon icon={Award} className="link-icon" />
267306
GitHub Badges
268307
</Link>
269308
</li>
@@ -273,38 +312,43 @@ export default function FooterLayout(): ReactNode {
273312
{/* Company Column */}
274313
<div className="footer-column">
275314
<h3 className="footer-column-title">
276-
<div className="column-icon company-icon">🏢</div>
315+
<div className="column-icon company-icon">
316+
<FooterIcon icon={Building2} />
317+
</div>
277318
Company
278319
</h3>
279320
<ul className="footer-links">
280321
<li>
281322
<Link to="/community" className="footer-link">
282-
<span className="link-icon">👥</span>
323+
<FooterIcon icon={Users} className="link-icon" />
283324
Community
284325
</Link>
285326
</li>
286327
<li>
287328
<Link to="/blogs" className="footer-link">
288-
<span className="link-icon">📰</span>
329+
<FooterIcon icon={Newspaper} className="link-icon" />
289330
Our Blog
290331
</Link>
291332
</li>
292333
<li>
293334
<Link to="/careers" className="footer-link">
294-
<span className="link-icon">💼</span>
335+
<FooterIcon
336+
icon={BriefcaseBusiness}
337+
className="link-icon"
338+
/>
295339
Careers
296340
<span className="link-badge hiring">We're Hiring!</span>
297341
</Link>
298342
</li>
299343
<li>
300344
<Link to="/our-sponsors" className="footer-link">
301-
<span className="link-icon">🤝</span>
345+
<FooterIcon icon={Handshake} className="link-icon" />
302346
Our Sponsors
303347
</Link>
304348
</li>
305349
<li>
306350
<Link to="/showcase" className="footer-link">
307-
<span className="link-icon">🌟</span>
351+
<FooterIcon icon={Sparkles} className="link-icon" />
308352
Showcase
309353
</Link>
310354
</li>
@@ -314,25 +358,30 @@ export default function FooterLayout(): ReactNode {
314358
{/* Support Column */}
315359
<div className="footer-column">
316360
<h3 className="footer-column-title">
317-
<div className="column-icon support-icon">🛠️</div>
361+
<div className="column-icon support-icon">
362+
<FooterIcon icon={LifeBuoy} />
363+
</div>
318364
Support
319365
</h3>
320366
<ul className="footer-links">
321367
<li>
322368
<Link to="/contact-us" className="footer-link">
323-
<span className="link-icon"></span>
369+
<FooterIcon
370+
icon={MessageCircleQuestion}
371+
className="link-icon"
372+
/>
324373
Contact Us
325374
</Link>
326375
</li>
327376
<li>
328377
<Link to="/broadcasts" className="footer-link">
329-
<span className="link-icon">📺</span>
378+
<FooterIcon icon={MonitorPlay} className="link-icon" />
330379
Broadcasts
331380
</Link>
332381
</li>
333382
<li>
334383
<Link to="/podcasts" className="footer-link">
335-
<span className="link-icon">🎙️</span>
384+
<FooterIcon icon={Mic2} className="link-icon" />
336385
Podcasts
337386
</Link>
338387
</li>
@@ -342,7 +391,9 @@ export default function FooterLayout(): ReactNode {
342391
{/* Newsletter Column with Quick Links below */}
343392
<div className="footer-column newsletter-column">
344393
<h3 className="footer-column-title">
345-
<div className="column-icon newsletter-icon">📧</div>
394+
<div className="column-icon newsletter-icon">
395+
<FooterIcon icon={Mail} />
396+
</div>
346397
Stay in the Loop
347398
</h3>
348399
<p className="newsletter-description">
@@ -368,28 +419,32 @@ export default function FooterLayout(): ReactNode {
368419
}`}
369420
disabled={isSubscribed}
370421
>
371-
{isSubscribed ? "Subscribed!" : "Subscribe Now"}
422+
{isSubscribed ? "Subscribed!" : "Subscribe Now"}
372423
</button>
373424
{error && <p className="error-text">{error}</p>}
374425
</form>
375426
<div className="newsletter-stats">
376427
<span className="newsletter-stat">
377-
📊 1.2K+ developers joined this week
428+
<FooterIcon icon={BarChart3} className="newsletter-stat-icon" />
429+
1.2K+ developers joined this week
378430
</span>
379431
</div>
380432
{/* Quick Links Section moved below subscription */}
381433
<div className="quick-links-section newsletter-quick-links">
382434
<h4 className="quick-links-title">
383-
<span className="links-icon">🔗</span>
435+
<FooterIcon icon={Link2} className="links-icon" />
384436
QUICK LINKS
385437
</h4>
386438
<div className="quick-links-list">
387439
<Link to="/get-started" className="quick-link">
388-
<span className="quick-link-icon">🚀</span>
440+
<FooterIcon icon={Rocket} className="quick-link-icon" />
389441
Get Started
390442
</Link>
391443
<Link to="/dashboard" className="quick-link">
392-
<span className="quick-link-icon">📊</span>
444+
<FooterIcon
445+
icon={LayoutDashboard}
446+
className="quick-link-icon"
447+
/>
393448
Dashboard
394449
</Link>
395450
</div>

tsconfig.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)