1+ import React , { useState } from "react" ;
2+ import { Github , Linkedin , Instagram } from "lucide-react" ;
3+ import { LegalModal } from "./LegalModal" ;
4+ import PrivacyPolicyContent from "./legal/PrivacyPolicyContent" ;
5+ import TermsOfUseContent from "./legal/TermsOfUseContent" ;
6+
7+ export default function Footer ( ) {
8+ const [ activeModal , setActiveModal ] = useState < "privacy" | "terms" | null > ( null ) ;
9+
10+ const openModal = ( type : "privacy" | "terms" ) => {
11+ setActiveModal ( type ) ;
12+ } ;
13+
14+ const closeModal = ( ) => {
15+ setActiveModal ( null ) ;
16+ } ;
17+
18+ return (
19+ < >
20+ < footer className = "relative pointer-events-auto" style = { { zIndex : 2 } } >
21+ < div className = "w-full h-px bg-gradient-to-r from-transparent via-border/60 to-transparent" />
22+
23+ < div className = "bg-background/30 backdrop-blur-2xl" >
24+ < div className = "max-w-6xl mx-auto px-6 pt-16 pb-10" >
25+
26+ < div className = "flex flex-col lg:flex-row justify-between gap-12 pb-12 border-b border-border/20" >
27+
28+ < div className = "flex flex-col gap-4 max-w-xs" >
29+ < span className = "text-xl font-bold tracking-tight text-foreground" >
30+ Project< span className = "text-primary" > Stack</ span >
31+ </ span >
32+ < p className = "text-sm text-muted-foreground/60 leading-relaxed" >
33+ Where students and creators come together to build the next big thing.
34+ </ p >
35+ < div className = "flex items-center gap-3" >
36+ < a
37+ href = "https://github.com/Ajiet-DevNation/project_stack"
38+ target = "_blank"
39+ rel = "noopener noreferrer"
40+ className = "group inline-flex items-center justify-center w-10 h-10 rounded-full border border-border/40 hover:border-primary/40 bg-card/40 hover:bg-card/70 backdrop-blur transition-all duration-300 text-muted-foreground/70 hover:text-foreground"
41+ aria-label = "GitHub"
42+ >
43+ < Github className = "w-4 h-4 group-hover:text-primary transition-colors duration-300" />
44+ </ a >
45+ < a
46+ href = "https://www.linkedin.com/company/project-stack"
47+ target = "_blank"
48+ rel = "noopener noreferrer"
49+ className = "group inline-flex items-center justify-center w-10 h-10 rounded-full border border-border/40 hover:border-primary/40 bg-card/40 hover:bg-card/70 backdrop-blur transition-all duration-300 text-muted-foreground/70 hover:text-foreground"
50+ aria-label = "LinkedIn"
51+ >
52+ < Linkedin className = "w-4 h-4 group-hover:text-primary transition-colors duration-300" />
53+ </ a >
54+ < a
55+ href = "https://instagram.com/projectstack"
56+ target = "_blank"
57+ rel = "noopener noreferrer"
58+ className = "group inline-flex items-center justify-center w-10 h-10 rounded-full border border-border/40 hover:border-primary/40 bg-card/40 hover:bg-card/70 backdrop-blur transition-all duration-300 text-muted-foreground/70 hover:text-foreground"
59+ aria-label = "Instagram"
60+ >
61+ < Instagram className = "w-4 h-4 group-hover:text-primary transition-colors duration-300" />
62+ </ a >
63+ </ div >
64+ </ div >
65+
66+ < div className = "grid grid-cols-1 sm:grid-cols-2 gap-10 text-sm" >
67+ { [
68+ {
69+ heading : "Community" ,
70+ links : [ "DevNation" , "Discord" ] ,
71+ } ,
72+ {
73+ heading : "Legal" ,
74+ links : [ "Privacy Policy" , "Terms of Use" ] ,
75+ } ,
76+ ] . map ( ( { heading, links } ) => (
77+ < div key = { heading } className = "flex flex-col gap-4" >
78+ < span className = "text-xs font-semibold uppercase tracking-widest text-muted-foreground/40" >
79+ { heading }
80+ </ span >
81+ < ul className = "flex flex-col gap-3" >
82+ { links . map ( ( item ) => {
83+ const handleClick = ( e : React . MouseEvent ) => {
84+ e . preventDefault ( ) ;
85+ if ( item === "Privacy Policy" ) {
86+ openModal ( "privacy" ) ;
87+ } else if ( item === "Terms of Use" ) {
88+ openModal ( "terms" ) ;
89+ } else if ( item === "Discord" ) {
90+ window . open ( "https://discord.gg/nzC2kaRf" , "_blank" ) ;
91+ } else if ( item === "DevNation" ) {
92+ window . open ( "https://github.com/Ajiet-DevNation" , "_blank" ) ;
93+ } else {
94+ console . log ( `Navigate to: ${ item } ` ) ;
95+ }
96+ } ;
97+
98+ return (
99+ < li key = { item } >
100+ < button
101+ onClick = { handleClick }
102+ className = "text-muted-foreground/60 hover:text-foreground transition-colors duration-200 hover:translate-x-0.5 inline-block text-left w-full cursor-pointer"
103+ >
104+ { item }
105+ </ button >
106+ </ li >
107+ ) ;
108+ } ) }
109+ </ ul >
110+ </ div >
111+ ) ) }
112+ </ div >
113+ </ div >
114+
115+ < div className = "flex flex-col sm:flex-row items-center justify-between gap-2 pt-8" >
116+ < p className = "text-xs text-muted-foreground/35 tracking-wide" >
117+ © { new Date ( ) . getFullYear ( ) } ProjectStack. All rights reserved.
118+ </ p >
119+ < p className = "text-xs text-muted-foreground/35 tracking-wide" >
120+ A proud initiative under{ " " }
121+ < span className = "text-primary/60 font-medium" > DevNation</ span >
122+ </ p >
123+ </ div >
124+
125+ </ div >
126+ </ div >
127+ </ footer >
128+
129+ < LegalModal
130+ isOpen = { activeModal === "privacy" }
131+ onClose = { closeModal }
132+ title = "Privacy Policy"
133+ >
134+ < PrivacyPolicyContent />
135+ </ LegalModal >
136+
137+ < LegalModal
138+ isOpen = { activeModal === "terms" }
139+ onClose = { closeModal }
140+ title = "Terms of Use"
141+ >
142+ < TermsOfUseContent />
143+ </ LegalModal >
144+ </ >
145+ ) ;
146+ }
0 commit comments