|
1 | 1 | /* eslint-disable react/no-unescaped-entities */
|
2 | 2 | import CTAButton from '@/components/home/CTAButton';
|
| 3 | +import { siteConfig } from "@/config/site"; |
| 4 | +import Image from "next/image"; |
| 5 | +import Link from "next/link"; |
| 6 | +import React from 'react'; |
3 | 7 |
|
4 | 8 | const CTA = ({ locale, CTALocale, stars }: { locale: any; CTALocale: any; stars: number }) => {
|
| 9 | + const d = new Date(); |
| 10 | + const currentYear = d.getFullYear(); |
| 11 | + const { authors, footerService, footerProducts, footerLinks } = siteConfig; |
| 12 | + |
| 13 | + |
| 14 | + const LogoFC = () => (<div className="flex items-center md:gap-x-12"> |
| 15 | + <Link |
| 16 | + href="/" |
| 17 | + aria-label="FastGPT" |
| 18 | + title="FastGPT" |
| 19 | + className="flex items-center space-x-2 font-bold " |
| 20 | + > |
| 21 | + <Image |
| 22 | + alt={siteConfig.name} |
| 23 | + src="/logo.svg" |
| 24 | + className="w-14 h-14 bg-[#E9E9E9] p-2 rounded-xl dark:bg-opacity-20" |
| 25 | + width={32} |
| 26 | + height={32} |
| 27 | + /> |
| 28 | + </Link> |
| 29 | + </div>) |
| 30 | + |
5 | 31 | return (
|
6 |
| - <section className="flex justify-between items-start py-16 gap-12 w-[88%] border-t-2 border-white/10"> |
7 |
| - <div className="flex flex-col"> |
8 |
| - <h4 className="text-start text-gradient"> |
9 |
| - {locale.title.slice(0, 20)} |
10 |
| - <br /> |
11 |
| - {locale.title.slice(20)} |
12 |
| - </h4> |
13 |
| - <p className="text-large text-white/50"> |
14 |
| - <span style={{ color: 'var(--text-primary)' }}>{locale.description1} </span> |
15 |
| - {locale.description2} |
16 |
| - <span style={{ color: 'var(--text-primary)' }}> {locale.description3} </span> |
17 |
| - {locale.description4} |
18 |
| - <br /> |
19 |
| - <span style={{ color: 'var(--text-primary)' }}>{locale.description5} </span> |
20 |
| - {locale.description6} |
21 |
| - |
22 |
| - |
23 |
| - |
24 |
| - {/* <RoughNotation type="box" color="#b71c1c" show={true}> |
25 |
| - {locale.description1} |
26 |
| - </RoughNotation> |
27 |
| - {locale.description2} |
28 |
| - <RoughNotation type="box" color="#b71c1c" show={true}> |
29 |
| - {locale.description3} |
30 |
| - </RoughNotation> |
31 |
| - {locale.description4} |
32 |
| - <RoughNotation type="box" color="#b71c1c" show={true}> |
33 |
| - {locale.description5} |
34 |
| - </RoughNotation> |
35 |
| - {locale.description6} */} |
36 |
| - </p> |
37 |
| - </div> |
38 |
| - <CTAButton locale={CTALocale} stars={stars} showGithub={false} /> |
39 |
| - </section> |
| 32 | + <footer className='lg:max-w-6xl w-[80%] mx-auto border-t-2 border-white/10 py-12 text-center'> |
| 33 | + <div className='md:hidden flex justify-center mb-5'><LogoFC /></div> |
| 34 | + |
| 35 | + <section className="relative flex flex-wrap w-full justify-center"> |
| 36 | + <div className="flex flex-col gap-2 mb-6 items-center md:items-start md:flex-1"> |
| 37 | + <h4 className="md:text-start text-gradient md:text-2xl text-base text-center"> |
| 38 | + {locale.title.slice(0, 20)} |
| 39 | + <br /> |
| 40 | + {locale.title.slice(20)} |
| 41 | + </h4> |
| 42 | + <p className="md:text-large text-white/50 text-wrap md:text-start text-xs text-center md:max-w-[70%]" > |
| 43 | + <span style={{ color: 'var(--text-primary)' }}>{locale.description1} </span> |
| 44 | + {locale.description2} |
| 45 | + <span style={{ color: 'var(--text-primary)' }}> {locale.description3} </span> |
| 46 | + {locale.description4} |
| 47 | + <span style={{ color: 'var(--text-primary)' }}>{locale.description5} </span> |
| 48 | + {locale.description6} |
| 49 | + </p> |
| 50 | + </div> |
| 51 | + <div className='md:absolute md:top-0 right-0'> |
| 52 | + <CTAButton locale={CTALocale} stars={stars} showGithub={false} /> |
| 53 | + </div> |
| 54 | + </section> |
| 55 | + |
| 56 | + <section className='relative mt-12 text-xs'> |
| 57 | + <div className='flex flex-col gap-4 justify-center items-center md:absolute md:top-3 md:right-0 md:gap-8'> |
| 58 | + {/* <FooterProducts /> */} |
| 59 | + <div className='flex gap-8 text-white'> |
| 60 | + {footerProducts.map((product) => { |
| 61 | + return ( |
| 62 | + <Link href={product.url} target="_blank" key={product.url}> |
| 63 | + {product.name} |
| 64 | + </Link> |
| 65 | + ); |
| 66 | + })} |
| 67 | + </div> |
| 68 | + {/* <FooterLinks /> */} |
| 69 | + <div className="w-full flex justify-center items-center text-white/75 md:justify-end gap-6"> |
| 70 | + {footerLinks.map((link) => ( |
| 71 | + <Link |
| 72 | + key={link.name} |
| 73 | + href={link.href} |
| 74 | + target="_blank" |
| 75 | + rel="noopener noreferrer nofollow" |
| 76 | + className="flex max-w-[24px] flex-col items-center justify-center" |
| 77 | + > |
| 78 | + {link.icon && React.createElement(link.icon, { className: 'text-2xl' })} |
| 79 | + </Link> |
| 80 | + ))} |
| 81 | + </div> |
| 82 | + </div> |
| 83 | + |
| 84 | + <div className='hidden md:block mb-8'><LogoFC /></div> |
| 85 | + <div className='flex flex-wrap justify-center text-white/65 md:justify-start mt-8 md:mt-0 '> |
| 86 | + <div className="flex space-x-2 text-nowrap gap-3"> |
| 87 | + {footerService.map((product) => { |
| 88 | + return ( |
| 89 | + <Link href={product.url} target="_blank" key={product.url}> |
| 90 | + {product.name} |
| 91 | + </Link> |
| 92 | + ); |
| 93 | + })} |
| 94 | + </div> |
| 95 | + <div className='hidden xs:block'>|</div> |
| 96 | + <div> |
| 97 | + <span>{`©${currentYear}`} </span> |
| 98 | + <Link href={authors[0].twitter || authors[0].url} target="_blank"> |
| 99 | + {authors[0].name} |
| 100 | + </Link> |
| 101 | + <span> All rights reserved.</span> |
| 102 | + {process.env.NEXT_PUBLIC_FILING_ADDRESS && ( |
| 103 | + <Link href={'https://beian.miit.gov.cn/'}> |
| 104 | + {process.env.NEXT_PUBLIC_FILING_ADDRESS} |
| 105 | + </Link> |
| 106 | + )} |
| 107 | + </div> |
| 108 | + </div> |
| 109 | + |
| 110 | + </section> |
| 111 | + </footer> |
40 | 112 | );
|
41 | 113 | };
|
42 | 114 |
|
|
0 commit comments