Skip to content

Commit

Permalink
feat: finish
Browse files Browse the repository at this point in the history
  • Loading branch information
heavenmei committed Sep 11, 2024
1 parent 649ad7f commit 139a9b4
Show file tree
Hide file tree
Showing 15 changed files with 141 additions and 58 deletions.
3 changes: 1 addition & 2 deletions projects/fastgpt/app/[[...lang]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import CTA from '@/components/home/CTA';
import FAQ from '@/components/home/FAQ';
import Feature from '@/components/home/Feature';
import Hero from '@/components/home/Hero';
import Pricing from '@/components/home/Pricing';
// import SocialProof from '@/components/home/SocialProof';
import VideoPlayer from '@/components/home/Video';
import { defaultLocale, getDictionary, localeNames } from '@/lib/i18n';
Expand Down Expand Up @@ -45,7 +44,7 @@ export default async function LangHome({ params: { lang } }: { params: { lang?:
{/* FAQ (Frequently Asked Questions) */}
<FAQ id="FAQ" locale={dict.FAQ} langName={langName} />

{/* CTA (Call to Action) */}
{/* CTA (Call to Action) Footer */}
<CTA locale={dict.CTA} CTALocale={dict.CTAButton} stars={stars} />
</main>
</>
Expand Down
3 changes: 1 addition & 2 deletions projects/fastgpt/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import BaiDuAnalytics from '@/app/BaiDuAnalytics';
import GoogleAnalytics from '@/app/GoogleAnalytics';
import { TailwindIndicator } from '@/components/TailwindIndicator';
import { ThemeProvider } from '@/components/ThemeProvider';
import Footer from '@/components/footer/Footer';
import { siteConfig } from '@/config/site';
import { defaultLocale } from '@/lib/i18n';
import { cn } from '@/lib/utils';
Expand Down Expand Up @@ -51,7 +50,7 @@ export default async function RootLayout({
<body className={cn('min-h-screen bg-background font-sans antialiased', fontSans.variable)}>
<ThemeProvider attribute="class" defaultTheme={siteConfig.nextThemeColor} enableSystem>
{children}
<Footer />
{/* <Footer /> */}
<Analytics />
<TailwindIndicator />
</ThemeProvider>
Expand Down
4 changes: 2 additions & 2 deletions projects/fastgpt/components/home/Ability.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Ability = ({
return (
<section
id={id}
className="flex flex-col justify-center lg:max-w-7xl md:max-w-5xl w-[90%] mx-auto gap-6 md:gap-12 py-6"
className="flex flex-col justify-center lg:max-w-7xl md:max-w-5xl w-[88%] mx-auto gap-6 md:gap-12 py-6"
>
<h4 className="text-center text-gradient">
{/* <RoughNotation type="highlight" show={true} color="#2563EB"> */}
Expand Down Expand Up @@ -48,7 +48,7 @@ const Ability = ({
}}
>
<div className="flex flex-col w-full lg:w-1/3 h-full text-[12px] md:text-[16px] whitespace-pre-wrap">
<div className="p-4 w-16 h-16 mb-5 dark:text-white rounded-2xl flex items-center justify-center" style={{
<div className="p-3 lg:p-4 w-12 h-12 md:w-14 md:h-14 lg:w-16 lg:h-16 mb-5 dark:text-white rounded-2xl flex items-center justify-center" style={{
...(index === 0 && { background: "var(--ability-icon-0)" }),
...(index === 1 && { background: "var(--ability-icon-1)" }),
...(index === 2 && { background: "var(--ability-icon-2)" }),
Expand Down
140 changes: 106 additions & 34 deletions projects/fastgpt/components/home/CTA.tsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,114 @@
/* eslint-disable react/no-unescaped-entities */
import CTAButton from '@/components/home/CTAButton';
import { siteConfig } from "@/config/site";
import Image from "next/image";
import Link from "next/link";
import React from 'react';

const CTA = ({ locale, CTALocale, stars }: { locale: any; CTALocale: any; stars: number }) => {
const d = new Date();
const currentYear = d.getFullYear();
const { authors, footerService, footerProducts, footerLinks } = siteConfig;


const LogoFC = () => (<div className="flex items-center md:gap-x-12">
<Link
href="/"
aria-label="FastGPT"
title="FastGPT"
className="flex items-center space-x-2 font-bold "
>
<Image
alt={siteConfig.name}
src="/logo.svg"
className="w-14 h-14 bg-[#E9E9E9] p-2 rounded-xl dark:bg-opacity-20"
width={32}
height={32}
/>
</Link>
</div>)

return (
<section className="flex justify-between items-start py-16 gap-12 w-[88%] border-t-2 border-white/10">
<div className="flex flex-col">
<h4 className="text-start text-gradient">
{locale.title.slice(0, 20)}
<br />
{locale.title.slice(20)}
</h4>
<p className="text-large text-white/50">
<span style={{ color: 'var(--text-primary)' }}>{locale.description1}&nbsp;</span>
{locale.description2}
<span style={{ color: 'var(--text-primary)' }}>&nbsp;{locale.description3}&nbsp;</span>
{locale.description4}
<br />
<span style={{ color: 'var(--text-primary)' }}>{locale.description5}&nbsp;</span>
{locale.description6}



{/* <RoughNotation type="box" color="#b71c1c" show={true}>
{locale.description1}
</RoughNotation>
{locale.description2}
<RoughNotation type="box" color="#b71c1c" show={true}>
{locale.description3}
</RoughNotation>
{locale.description4}
<RoughNotation type="box" color="#b71c1c" show={true}>
{locale.description5}
</RoughNotation>
{locale.description6} */}
</p>
</div>
<CTAButton locale={CTALocale} stars={stars} showGithub={false} />
</section>
<footer className='lg:max-w-6xl w-[80%] mx-auto border-t-2 border-white/10 py-12 text-center'>
<div className='md:hidden flex justify-center mb-5'><LogoFC /></div>

<section className="relative flex flex-wrap w-full justify-center">
<div className="flex flex-col gap-2 mb-6 items-center md:items-start md:flex-1">
<h4 className="md:text-start text-gradient md:text-2xl text-base text-center">
{locale.title.slice(0, 20)}
<br />
{locale.title.slice(20)}
</h4>
<p className="md:text-large text-white/50 text-wrap md:text-start text-xs text-center md:max-w-[70%]" >
<span style={{ color: 'var(--text-primary)' }}>{locale.description1}&nbsp;</span>
{locale.description2}
<span style={{ color: 'var(--text-primary)' }}>&nbsp;{locale.description3}&nbsp;</span>
{locale.description4}
<span style={{ color: 'var(--text-primary)' }}>{locale.description5}&nbsp;</span>
{locale.description6}
</p>
</div>
<div className='md:absolute md:top-0 right-0'>
<CTAButton locale={CTALocale} stars={stars} showGithub={false} />
</div>
</section>

<section className='relative mt-12 text-xs'>
<div className='flex flex-col gap-4 justify-center items-center md:absolute md:top-3 md:right-0 md:gap-8'>
{/* <FooterProducts /> */}
<div className='flex gap-8 text-white'>
{footerProducts.map((product) => {
return (
<Link href={product.url} target="_blank" key={product.url}>
{product.name}
</Link>
);
})}
</div>
{/* <FooterLinks /> */}
<div className="w-full flex justify-center items-center text-white/75 md:justify-end gap-6">
{footerLinks.map((link) => (
<Link
key={link.name}
href={link.href}
target="_blank"
rel="noopener noreferrer nofollow"
className="flex max-w-[24px] flex-col items-center justify-center"
>
{link.icon && React.createElement(link.icon, { className: 'text-2xl' })}
</Link>
))}
</div>
</div>

<div className='hidden md:block mb-8'><LogoFC /></div>
<div className='flex flex-wrap justify-center text-white/65 md:justify-start mt-8 md:mt-0 '>
<div className="flex space-x-2 text-nowrap gap-3">
{footerService.map((product) => {
return (
<Link href={product.url} target="_blank" key={product.url}>
{product.name}
</Link>
);
})}
</div>
<div className='hidden xs:block'>|</div>
<div>
<span>{${currentYear}`}&nbsp;</span>
<Link href={authors[0].twitter || authors[0].url} target="_blank">
{authors[0].name}
</Link>
<span>&nbsp;All rights reserved.</span>
{process.env.NEXT_PUBLIC_FILING_ADDRESS && (
<Link href={'https://beian.miit.gov.cn/'}>
{process.env.NEXT_PUBLIC_FILING_ADDRESS}
</Link>
)}
</div>
</div>

</section>
</footer>
);
};

Expand Down
2 changes: 1 addition & 1 deletion projects/fastgpt/components/home/FAQ.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const FAQ = ({
return (
<section
id={id}
className="flex flex-col justify-center max-w-[88%] items-center py-16 gap-12"
className="flex flex-col justify-center lg:max-w-6xl w-[80%] mx-auto items-center py-16 gap-12"
>
<div className="flex flex-col text-center">
<h4 className="text-center text-gradient">
Expand Down
6 changes: 3 additions & 3 deletions projects/fastgpt/components/home/Feature.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Feature = ({
return (
<section
id={id}
className="flex flex-col justify-center lg:max-w-7xl md:max-w-5xl w-[90%] mx-auto py-6"
className="flex flex-col justify-center lg:max-w-7xl md:max-w-5xl w-[88%] mx-auto py-6"
>
<h4 className="text-center text-gradient">
{/* <RoughNotation type="highlight" show={true} color="#2563EB"> */}
Expand All @@ -39,7 +39,7 @@ const Feature = ({
background: "var(--theme-gradient)"
}}
>
<div className="p-3 w-14 h-14 mb-5 text-white rounded-xl flex items-center justify-center"
<div className="p-3 lg:p-4 w-12 h-12 md:w-14 md:h-14 lg:w-16 lg:h-16 mb-5 text-white rounded-xl flex items-center justify-center"
style={{ background: "var(--feature-icon)" }}>
{feature.icon &&
React.createElement(feature.icon, { className: "text-2xl" })}
Expand All @@ -52,7 +52,7 @@ const Feature = ({
))}
</div>

<div className="inline-block mx-auto border font-bold rounded-full px-6 py-3 text-xs lg:text-sm mt-10"
<div className="inline-block mx-auto border font-bold rounded-full px-6 py-3 text-xs lg:text-sm mt-10 md:text-nowrap"
style={{
color: '#B5E8FD',
background: 'linear-gradient(90deg, rgba(212, 212, 249, 0.15) 0%, rgba(55, 55, 214, 0.00) 100%)',
Expand Down
3 changes: 1 addition & 2 deletions projects/fastgpt/components/home/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ const VideoPlayer = ({
return (
<div
id="player-container"
className="mx-auto max-w-4xl lg:max-w-6xl mb-12 mt-6 px-4 sm:px-6 lg:px-8 md:mt-20 text-center h-[200px] sm:h-[500px] lg:h-[700px]"

className="mx-auto mb-12 max-w-[88%] 2xl:max-w-7xl mt-6 md:mt-20 text-center h-[200px] md:h-[450px] lg:h-[600px] xl:h-[750px] 2xl:h-[850px]"
>
<div className="rounded-lg overflow-hidden">
<video
Expand Down
4 changes: 3 additions & 1 deletion projects/fastgpt/config/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ const baseSiteConfig = {
{ url: 'https://doc.fastgpt.in', name: 'Docs' },
{ url: 'https://doc.fastgpt.in/docs/community/', name: 'Forum' },
{ url: 'https://uuhyahynnudq.hzh.sealos.run/status/in', name: 'Status' },
{ url: 'https://doc.fastgpt.in/docs/agreement/terms', name: 'Terms of Service' },
],
footerService:[
{ url: 'https://doc.fastgpt.in/docs/agreement/terms', name: 'Terms of Service' },
{ url: 'https://doc.fastgpt.in/docs/agreement/privacy', name: 'Privacy Policy' }
]
};
Expand Down
6 changes: 4 additions & 2 deletions projects/fastgpt/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
{
"label": "الأسعار",
"href": "#Pricing"
"href": "https://cloud.tryfastgpt.ai/price"
},
{
"label": "الأسئلة الشائعة",
Expand All @@ -33,7 +33,9 @@
},
"Feature": {
"title": "المزايا الرئيسية لـ FastGPT",
"description": "لماذا تختار FastGPT لتلبية احتياجات قاعدة معرفة الذكاء الاصطناعي الخاصة بك؟"
"description": "لماذا تختار FastGPT لتلبية احتياجات قاعدة معرفة الذكاء الاصطناعي الخاصة بك؟",
"doYouLike": "هل تستمتع باستخدام حل قاعدة معرفة الذكاء الاصطناعي مفتوح المصدر هذا؟",
"follow": "أظهر تقديرك بمنحنا نجمة 🌟"
},
"Ability": {
"title": "جاهز للنشر"
Expand Down
2 changes: 1 addition & 1 deletion projects/fastgpt/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
{
"label": "Pricing",
"href": "#Pricing"
"href": "https://cloud.tryfastgpt.ai/price"
},
{
"label": "FAQ",
Expand Down
7 changes: 5 additions & 2 deletions projects/fastgpt/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
},
{
"label": "Precios",
"href": "#Pricing"
"href": "https://cloud.tryfastgpt.ai/price"

},
{
"label": "Preguntas frecuentes",
Expand All @@ -33,7 +34,9 @@
},
"Feature": {
"title": "Ventajas Clave de FastGPT",
"description": "¿Por qué elegir FastGPT para tus necesidades de base de conocimiento de IA?"
"description": "¿Por qué elegir FastGPT para tus necesidades de base de conocimiento de IA?",
"doYouLike": "¿Disfrutas de esta solución de base de conocimiento de IA de código abierto?",
"follow": "Muestra tu aprecio con una estrella 🌟"
},
"Ability": {
"title": "Listo para Implementar"
Expand Down
6 changes: 4 additions & 2 deletions projects/fastgpt/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
{
"label": "価格",
"href": "#Pricing"
"href": "https://cloud.tryfastgpt.ai/price"
},
{
"label": "よくある質問",
Expand All @@ -33,7 +33,9 @@
},
"Feature": {
"title": "FastGPTの主な利点",
"description": "AIナレッジベースのニーズに FastGPTを選ぶ理由は何でしょうか?"
"description": "AIナレッジベースのニーズに FastGPTを選ぶ理由は何でしょうか?",
"doYouLike": "このオープンソースのAIナレッジベースソリューションを気に入っていただけましたか?",
"follow": "スター🌟で感謝の気持ちを示しましょう"
},
"Ability": {
"title": "すぐにデプロイ可能"
Expand Down
6 changes: 4 additions & 2 deletions projects/fastgpt/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
{
"label": "Цены",
"href": "#Pricing"
"href": "https://cloud.tryfastgpt.ai/price"
},
{
"label": "Часто задаваемые вопросы",
Expand All @@ -31,7 +31,9 @@
"maker": "разработчики создают быстро"
},
"Feature": {
"title": "Особенности"
"title": "Особенности",
"doYouLike": "Вам нравится этот шаблон лендинга?",
"follow": "Подписывайтесь на мой Твиттер."
},
"Ability": {
"title": "Ability"
Expand Down
6 changes: 4 additions & 2 deletions projects/fastgpt/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
{
"label": "价格",
"href": "#Pricing"
"href": "https://cloud.tryfastgpt.ai/price"
},
{
"label": "FAQ",
Expand All @@ -37,7 +37,9 @@
},
"Feature": {
"title": "优势",
"description": "为什么选择 FastGPT?"
"description": "为什么选择 FastGPT?",
"doYouLike": "你喜欢这个开源 AI 知识库平台吗?",
"follow": "点个 Star 吧🌟"
},
"Ability": {
"title": "开箱即用"
Expand Down
1 change: 1 addition & 0 deletions projects/fastgpt/types/siteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export type SiteConfig = {
headerLinks: Link[];
footerLinks: Link[];
footerProducts: ProductLink[];
footerService: ProductLink[];
metadataBase: URL | string;
themeColors?: string | ThemeColor[];
nextThemeColor?: string;
Expand Down

0 comments on commit 139a9b4

Please sign in to comment.