1+ "use client" ;
2+
3+ import Link from "next/link" ;
4+ import { findByUniqueId } from "@/components/utils/findByUniqueId" ;
5+ import Image from "next/image" ;
6+ interface FooterProps {
7+ params : { lang : string } ;
8+ mainData : any ;
9+ }
10+
11+ interface FooterLink {
12+ label : string ;
13+ href : string ;
14+ targetBlank ?: boolean ;
15+ disabled ?: boolean ;
16+ }
17+
18+ export default function Footer2 ( { params, mainData } : FooterProps ) {
19+ const isRTL = params . lang === "fa" ;
20+ const footerLinks : { title : string ; links : FooterLink [ ] } [ ] = [
21+ {
22+ title : findByUniqueId ( mainData , 1737 ) ,
23+ links : [
24+ { label : findByUniqueId ( mainData , 303 ) , href : `/${ params . lang } /` } ,
25+ { label : findByUniqueId ( mainData , 259 ) , href : `/${ params . lang } /about/` } ,
26+ {
27+ label : findByUniqueId ( mainData , 1738 ) ,
28+ href : "https://github.com/iranpsc" ,
29+ targetBlank : true ,
30+ } ,
31+ { label : findByUniqueId ( mainData , 1739 ) , href : `/${ params . lang } /citizens` } ,
32+ {
33+ label : findByUniqueId ( mainData , 1740 ) ,
34+ href : `/${ params . lang } /version`
35+ } ,
36+ ] ,
37+ } ,
38+ {
39+ title : findByUniqueId ( mainData , 1741 ) ,
40+ links : [
41+ { label : findByUniqueId ( mainData , 1742 ) , href : "/build" , disabled : true , } ,
42+ { label : findByUniqueId ( mainData , 1743 ) , href : `/${ params . lang } /whitepaper` } ,
43+ {
44+ label : findByUniqueId ( mainData , 1744 ) ,
45+ href : "/sdk" ,
46+ disabled : true ,
47+ } ,
48+ { label : findByUniqueId ( mainData , 1490 ) , href : `/${ params . lang } /rand-id/hm` } ,
49+ ] ,
50+ } ,
51+ {
52+ title : findByUniqueId ( mainData , 1745 ) ,
53+ links : [
54+ { label : findByUniqueId ( mainData , 1746 ) , href : `/${ params . lang } /articles` } ,
55+ { label : findByUniqueId ( mainData , 1462 ) , href : `/${ params . lang } /education` } ,
56+ {
57+ label : findByUniqueId ( mainData , 1747 ) ,
58+ href : "http://faqhub.ir/" ,
59+ targetBlank : true ,
60+ } ,
61+ { label : findByUniqueId ( mainData , 1748 ) , href : `/${ params . lang } /calendar` } ,
62+ ] ,
63+ } ,
64+ {
65+ title : findByUniqueId ( mainData , 1749 ) ,
66+ links : [
67+ { label : findByUniqueId ( mainData , 279 ) , href : "https://www.instagram.com/metaverse_rang" } ,
68+ { label : findByUniqueId ( mainData , 280 ) , href : "https://www.linkedin.com/company/metaverse-rang/" } ,
69+ { label : findByUniqueId ( mainData , 281 ) , href : "https://youtube.com/@metargb?si=gdM0aFPk5SCsC7z4" } ,
70+ { label : findByUniqueId ( mainData , 1753 ) , href : "https://substack.com/@metarang" } ,
71+ { label : findByUniqueId ( mainData , 1754 ) , href : "https://medium.com/@metarang.iran" } ,
72+ ] ,
73+ } ,
74+ ] ;
75+
76+ return (
77+ < footer className = "bg-white dark:bg-[#1A1A18] rounded-[40px] rounded-se-[120px] 2xl:rounded-se-[260px] mt-10" >
78+ < div className = "overflow-hidden " >
79+ < div className = "p-5 xl:p-5 2xl:p-9 3xl:p-14 3xl:px-[76px] 3xl:px mt-5" >
80+ < div className = "grid gap-10 gap-y-12 md:grid-cols-[80px_repeat(4,1fr)]" >
81+
82+ { /* Logo */ }
83+ < div className = "flex items-center lg:items-start justify-center lg:justify-start px-5 lg:px-0 lg:flex-col gap-5" >
84+ < Image
85+ src = "/logo.png"
86+ alt = "logo"
87+ width = { 71 }
88+ height = { 70 }
89+ className = "w-[60px] h-[60px] inline "
90+ />
91+ < div className = "flex items-center justify-center " >
92+ < div
93+ dangerouslySetInnerHTML = { {
94+ __html : `<a referrerpolicy='origin' target='_blank' href='https://trustseal.enamad.ir/?id=721065&Code=fLkLFNhooBCR33C1ntVXIBxJFAj9gf3q'><img referrerpolicy='origin' src='https://trustseal.enamad.ir/logo.aspx?id=721065&Code=fLkLFNhooBCR33C1ntVXIBxJFAj9gf3q' alt='' style='cursor:pointer' code='fLkLFNhooBCR33C1ntVXIBxJFAj9gf3q'></a>` ,
95+ } }
96+ />
97+ </ div >
98+ </ div >
99+
100+ { /* Links */ }
101+ { footerLinks . map ( ( section ) => (
102+ < div key = { section . title } >
103+ < p className = "mb-5 2xl:mb-12 lg:mt-3 text-3xl 3xl:text-4xl font-medium text-[#1B1B1B] dark:text-[#FFFFFF]" >
104+ { section . title }
105+ </ p >
106+
107+ < ul className = "space-y-2 2xl:space-y-5 list-none" >
108+ { section . links . map ( ( item ) => {
109+ const isExternal =
110+ item . targetBlank || item . href . startsWith ( "http" ) ;
111+
112+ const baseClass =
113+ "peer flex items-center dark:text-[#9A9A9A] gap-2 3xl:text-3xl transition" ;
114+
115+ const isDisabled = item . disabled ;
116+
117+ const linkClass = isDisabled
118+ ? "text-[#aaa] pointer-events-none opacity-50"
119+ : "text-[#222]" ;
120+
121+ return (
122+ < li key = { item . href } >
123+ { isDisabled ? (
124+ < span className = { `${ baseClass } ${ linkClass } ` } >
125+ { item . label }
126+ < span className = "text-[#ccc] !text-4xl ms-1" > ›</ span >
127+ </ span >
128+ ) : (
129+ < Link
130+ href = { item . href }
131+ className = { `${ baseClass } ${ linkClass } ` }
132+ { ...( isExternal
133+ ? {
134+ target : "_blank" ,
135+ rel : "noopener noreferrer" ,
136+ }
137+ : { } ) }
138+ >
139+ { item . label }
140+
141+ { /* arrow فقط برای فعالها */ }
142+ < span className = "text-[#8A2BE2] ms-1 !text-4xl transition-transform peer-hover:translate-x-1 rtl:peer-hover:translate-x-[-4px]" >
143+ ›
144+ </ span >
145+ </ Link >
146+ ) }
147+ </ li >
148+ ) ;
149+ } ) }
150+ </ ul >
151+ </ div >
152+ ) ) }
153+ </ div >
154+ </ div >
155+
156+ { /* MARQUEE */ }
157+ < div className = "relative mt-10 mb-7 h-[450px] flex items-center overflow-hidden " >
158+ < div className = { `marquee ${ isRTL ? "rtl" : "ltr" } ` } >
159+ < div className = "track" >
160+ < div className = "group" >
161+ < span className = "text-neutral-900 dark:text-white" > { findByUniqueId ( mainData , 148 ) } </ span >
162+ </ div >
163+ < div className = "group" >
164+ < span className = "text-neutral-900 dark:text-white" > { findByUniqueId ( mainData , 148 ) } </ span >
165+ </ div >
166+ < div className = "group" >
167+ < span className = "text-neutral-900 dark:text-white" > { findByUniqueId ( mainData , 148 ) } </ span >
168+ </ div >
169+ < div className = "group" >
170+ < span className = "text-neutral-900 dark:text-white" > { findByUniqueId ( mainData , 148 ) } </ span >
171+ </ div >
172+ </ div >
173+ </ div >
174+ </ div >
175+ </ div >
176+
177+ { /* Styles */ }
178+ < style jsx > { `
179+ .marquee {
180+ overflow: hidden;
181+ width: 100%;
182+ }
183+
184+ /* base track */
185+ .track {
186+ display: flex;
187+ width: max-content;
188+ }
189+
190+ /* LTR animation (default) */
191+ .ltr .track {
192+ animation: scroll-ltr 18s linear infinite;
193+ }
194+
195+ /* RTL animation */
196+ .rtl .track {
197+ animation: scroll-rtl 10s linear infinite;
198+ }
199+
200+ .group {
201+ display: flex;
202+ flex-shrink: 0;
203+ }
204+
205+ .group span {
206+ font-size: 400px;
207+ font-weight: 700;
208+ white-space: nowrap;
209+ padding-right: 80px;
210+ }
211+
212+ /* LTR → چپ به راست */
213+ @keyframes scroll-ltr {
214+ 0% {
215+ transform: translateX(0);
216+ }
217+ 100% {
218+ transform: translateX(-50%);
219+ }
220+ }
221+
222+ /* RTL → راست به چپ (برعکس) */
223+ @keyframes scroll-rtl {
224+ 0% {
225+ transform: translateX(0);
226+ }
227+ 100% {
228+ transform: translateX(50%);
229+ }
230+ }
231+ ` } </ style >
232+ </ footer >
233+ ) ;
234+ }
0 commit comments