重构首页,优化组件结构

This commit is contained in:
2025-12-23 17:11:46 +08:00
parent 78d605749f
commit a3588fd1be
24 changed files with 305 additions and 268 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

View File

@@ -0,0 +1,10 @@
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="&#229;&#183;&#178;&#229;&#139;&#190;&#233;&#128;&#137;32 12" clip-path="url(#clip0_77_98)">
<path id="Vector" d="M3.46154 0H14.5385C15.4565 0 16.337 0.364697 16.9861 1.01386C17.6353 1.66303 18 2.54348 18 3.46154V14.5385C18 15.4565 17.6353 16.337 16.9861 16.9861C16.337 17.6353 15.4565 18 14.5385 18H3.46154C2.54348 18 1.66303 17.6353 1.01386 16.9861C0.364697 16.337 0 15.4565 0 14.5385L0 3.46154C0 2.54348 0.364697 1.66303 1.01386 1.01386C1.66303 0.364697 2.54348 0 3.46154 0ZM3.46154 1.38462C2.9107 1.38462 2.38243 1.60343 1.99293 1.99293C1.60343 2.38243 1.38462 2.9107 1.38462 3.46154V14.5385C1.38462 14.8112 1.43834 15.0813 1.54271 15.3333C1.64709 15.5852 1.80007 15.8142 1.99293 16.0071C2.18579 16.1999 2.41475 16.3529 2.66673 16.4573C2.91872 16.5617 3.18879 16.6154 3.46154 16.6154H14.5385C14.8112 16.6154 15.0813 16.5617 15.3333 16.4573C15.5852 16.3529 15.8142 16.1999 16.0071 16.0071C16.1999 15.8142 16.3529 15.5852 16.4573 15.3333C16.5617 15.0813 16.6154 14.8112 16.6154 14.5385V3.46154C16.6154 3.18879 16.5617 2.91872 16.4573 2.66673C16.3529 2.41475 16.1999 2.18579 16.0071 1.99293C15.8142 1.80007 15.5852 1.64709 15.3333 1.54271C15.0813 1.43834 14.8112 1.38462 14.5385 1.38462H3.46154ZM13.743 5.92338C13.8041 5.98151 13.8531 6.0511 13.8873 6.12818C13.9214 6.20526 13.9401 6.28831 13.9421 6.3726C13.9442 6.45689 13.9296 6.54076 13.8993 6.61941C13.8689 6.69806 13.8233 6.76996 13.7652 6.831L8.50085 12.3348C8.49877 12.3376 8.49392 12.339 8.48977 12.3432L8.48285 12.3528C8.44477 12.3902 8.39977 12.4096 8.35615 12.4359C8.32846 12.4512 8.307 12.474 8.27862 12.4858C8.20213 12.5178 8.12007 12.5345 8.03714 12.5347C7.95421 12.5349 7.87205 12.5188 7.79538 12.4872C7.77323 12.4782 7.75523 12.4588 7.73308 12.447C7.68462 12.4214 7.63477 12.3972 7.59185 12.357C7.58838 12.3542 7.587 12.3494 7.58285 12.3452C7.57938 12.3432 7.57592 12.3418 7.57315 12.339L4.92162 9.58638C4.86293 9.5258 4.81679 9.45421 4.78585 9.37574C4.75491 9.29727 4.73978 9.21346 4.74132 9.12912C4.74287 9.04479 4.76106 8.96159 4.79485 8.8843C4.82864 8.80702 4.87737 8.73717 4.93823 8.67877C4.99877 8.62 5.07035 8.57379 5.14882 8.5428C5.2273 8.5118 5.31113 8.49664 5.3955 8.49819C5.47986 8.49973 5.56308 8.51795 5.64037 8.5518C5.71766 8.58564 5.78749 8.63444 5.84585 8.69538L8.03354 10.9648L12.834 5.94415C12.8923 5.88305 12.9621 5.83404 13.0393 5.79992C13.1166 5.7658 13.1998 5.74724 13.2842 5.74532C13.3686 5.74339 13.4526 5.75812 13.5313 5.78868C13.6101 5.81923 13.682 5.86501 13.743 5.92338Z" fill="#FF6B00"/>
</g>
<defs>
<clipPath id="clip0_77_98">
<rect width="18" height="18" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

@@ -0,0 +1,50 @@
import Image, {StaticImageData} from 'next/image'
import {PageSection} from './page-section'
import s4_1_main from './_assets/s4-1-main.webp'
import s4_2_main from './_assets/s4-2-main.webp'
import s4_1_1 from './_assets/s4-1-1.webp'
import s4_1_2 from './_assets/s4-1-2.webp'
import s4_1_3 from './_assets/s4-1-3.webp'
import s4_2_1 from './_assets/s4-2-1.webp'
import s4_2_2 from './_assets/s4-2-2.webp'
import s4_2_3 from './_assets/s4-2-3.webp'
export function AdvantagesSection() {
return (
<PageSection title="HTTP 产品优势">
<div className="flex gap-36">
<ul className="flex-1 flex flex-col gap-6">
<AdvantageItem icon={s4_1_1} title="安全合规" description="国内三大运营商支持"/>
<AdvantageItem icon={s4_1_2} title="稳定链接" description="IP纯净度高达99.9%"/>
<AdvantageItem icon={s4_1_3} title="超匿名性" description="稳定传输,保护隐私安全"/>
</ul>
<Image src={s4_1_main} alt="产品优势展示" className="w-0 flex-1 object-contain max-lg:hidden"/>
</div>
<div className="flex gap-36">
<Image src={s4_2_main} alt="技术优势展示" className="w-0 flex-1 object-contain max-lg:hidden"/>
<ul className="flex-1 flex flex-col gap-6">
<AdvantageItem icon={s4_2_1} title="API接口文档" description="与第三方软件轻松集成"/>
<AdvantageItem icon={s4_2_2} title="多种编程语言代码" description="C语言、GO语言、Python..."/>
<AdvantageItem icon={s4_2_3} title="双重认证方式" description="API提取+账密认证"/>
</ul>
</div>
</PageSection>
)
}
function AdvantageItem(props: {
icon: StaticImageData
title: string
description: string
}) {
return (
<li className="flex gap-8 items-center p-4 lg:p-8 shadow-[4px_4px_20px_4px] shadow-blue-50 rounded-lg">
<Image src={props.icon} alt={props.title} aria-hidden className="w-24 h-24 object-contain"/>
<div className="flex flex-col gap-3">
<h3 className="text-xl">{props.title}</h3>
<p>{props.description}</p>
</div>
</li>
)
}

View File

@@ -0,0 +1,70 @@
import {ReactNode} from 'react'
import Link from 'next/link'
import {PageSection} from './page-section'
import {BookOpen, Smartphone, HelpCircle} from 'lucide-react'
export function ArticlesSection() {
return (
<PageSection title="推荐文章">
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
<ArticleCard
icon={<BookOpen className="w-12 h-12"/>}
title="浏览器设置代理教程"
description="快速上手5分钟学会在浏览器中配置代理服务器"
href="/docs/browser-proxy"
/>
<ArticleCard
icon={<Smartphone className="w-12 h-12"/>}
title="Windows10 代理配置"
description="详细图文教程,帮助你在 Windows 系统中设置代理"
href="/docs/windows10-proxy"
/>
<ArticleCard
icon={<HelpCircle className="w-12 h-12"/>}
title="常见问题总览"
description="解决使用过程中遇到的各类问题,快速找到答案"
href="/docs/faq-general"
/>
</div>
</PageSection>
)
}
function ArticleCard(props: {
icon: ReactNode
title: string
description: string
href: string
}) {
return (
<Link
href={props.href}
className={[
`group block p-8 shadow-[4px_4px_20px_4px] shadow-blue-50 rounded-lg bg-white`,
`transition-all duration-200`,
].join(' ')}
>
<div className="flex flex-col items-center text-center gap-6">
<div className="p-4 rounded-xl bg-linear-to-br from-blue-500 to-cyan-400 text-white group-hover:scale-110 transition-transform">
{props.icon}
</div>
<div>
<h3 className="text-xl font-semibold mb-3 group-hover:text-blue-600 transition-colors">
{props.title}
</h3>
<p className="text-gray-500 text-sm leading-relaxed">
{props.description}
</p>
</div>
<div className="mt-2 text-blue-500 text-sm flex items-center gap-2 group-hover:gap-3 transition-all">
<span></span>
<span className="text-lg"></span>
</div>
</div>
</Link>
)
}

View File

@@ -0,0 +1,37 @@
import Image from 'next/image'
import Wrap from '@/components/wrap'
import FreeTrial from '@/components/free-trial'
import banner from '../_assets/banner.webp'
import check_main from '@/assets/check-main.svg'
export function HeroSection() {
return (
<section className="w-full relative">
<Image src={banner} alt="banner" className="absolute inset-0 h-full object-cover"/>
<Wrap className="relative pt-64 pb-48 max-md:pt-32 max-md:pb-24">
<h1 className="text-4xl"></h1>
<p className="mt-10 text-gray-500">IP代理服务</p>
<div className="mt-24 max-md:mt-14 flex gap-8 max-md:flex-col">
<p className="flex gap-4 items-center">
<Image src={check_main} alt="checkbox" width={24} height={24}/>
<span className="lg:text-lg">200+</span>
</p>
<p className="flex gap-4 items-center">
<Image src={check_main} alt="checkbox" width={24} height={24}/>
<span className="lg:text-lg">300+</span>
</p>
<p className="flex gap-4 items-center">
<Image src={check_main} alt="checkbox" width={24} height={24}/>
<span className="lg:text-lg">&</span>
</p>
</div>
<FreeTrial className={[
`mt-32 max-md:mt-20 w-96 max-md:w-full h-16 md:h-24 rounded-lg shadow-lg`,
`bg-linear-to-r from-blue-500 to-cyan-400 text-white text-xl lg:text-4xl`,
].join(' ')}/>
</Wrap>
</section>
)
}

View File

@@ -0,0 +1,15 @@
import {ReactNode} from 'react'
export function PageSection(props: {
title: string
children: ReactNode
}) {
return (
<section>
<div className="max-w-[1232px] mx-auto px-4 flex flex-col items-stretch">
<h2 className="text-center text-3xl mb-8 lg:mb-24">{props.title}</h2>
{props.children}
</div>
</section>
)
}

View File

@@ -0,0 +1,17 @@
import {HeroSection} from './hero-section'
import {StatsSection} from './stats-section'
import {ProductTypesSection} from './product-types-section'
import {AdvantagesSection} from './advantages-section'
import {ArticlesSection} from './articles-section'
export default function Home() {
return (
<main className="flex flex-col gap-16 lg:gap-32 pb-16 lg:pb-32 bg-white">
<HeroSection/>
<StatsSection/>
<ProductTypesSection/>
<AdvantagesSection/>
<ArticlesSection/>
</main>
)
}

View File

@@ -0,0 +1,78 @@
import Image, {StaticImageData} from 'next/image'
import {PageSection} from './page-section'
import s1_1 from './_assets/s1-1.webp'
import s1_2 from './_assets/s1-2.webp'
import s1_3 from './_assets/s1-3.webp'
import s1_4 from './_assets/s1-4.webp'
import s1_check from './_assets/s1-check.svg'
export function ProductTypesSection() {
return (
<PageSection title="HTTP安全合规的代理IP资源池">
<ul className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8">
<ProductTypeCard
icon={s1_1}
title="短期动态IP池"
features={[
{icon: s1_check, text: 'IP时效3-30分钟(可定制)'},
{icon: s1_check, text: '支持高并发提取'},
]}
/>
<ProductTypeCard
icon={s1_2}
title="长期静态IP池"
features={[
{icon: s1_check, text: 'IP覆盖全国各地'},
{icon: s1_check, text: '平均响应时长0.03s'},
]}
/>
<ProductTypeCard
icon={s1_3}
title="固定IP池"
features={[
{icon: s1_check, text: '稳定长输不掉线'},
{icon: s1_check, text: '全国热门静态IP线路'},
]}
/>
<ProductTypeCard
icon={s1_4}
title="企业级定制池"
features={[
{icon: s1_check, text: '可视化监控设计'},
{icon: s1_check, text: '技术团队现场支持'},
]}
/>
</ul>
</PageSection>
)
}
function ProductTypeCard(props: {
icon: StaticImageData
title: string
features: {
icon: StaticImageData
text: string
}[]
}) {
return (
<li
className={[
`p-8 flex flex-col gap-5 shadow-[4px_4px_20px_4px] shadow-blue-50 bg-white rounded-lg`,
`max-md:items-center`,
].join(' ')}>
<Image src={props.icon} alt={props.title} aria-hidden className="self-center w-44 h-44 object-cover"/>
<h3 className="text-xl">{props.title}</h3>
<div className="flex flex-col gap-3">
{props.features.map((item, index) => {
return (
<p key={index} className="text-sm text-gray-500 flex gap-3 items-center">
<Image src={item.icon} alt="check" aria-hidden className="w-5 h-5"/>
<span>{item.text}</span>
</p>
)
})}
</div>
</li>
)
}

View File

@@ -0,0 +1,32 @@
import Image from 'next/image'
import {PageSection} from './page-section'
import map from '../_assets/map.webp'
export function StatsSection() {
return (
<PageSection title="覆盖全国的IP资源及超大的带宽线路">
<ul className="shadow-[0_0_20px_4px] shadow-blue-50 p-8 flex max-lg:flex-col">
<li className="flex-1 flex flex-col items-center justify-center lg:border-r max-lg:mb-4 border-gray-200">
<p className="text-xl">线</p>
<p className="mt-9 max-lg:mt-2 text-5xl bg-linear-to-t from-blue-500 to-cyan-400 bg-clip-text text-transparent font-bold pb-2 -mb-2">350+</p>
<div className="lg:hidden w-24 border-b mt-4 border-gray-200"></div>
</li>
<li className="flex-1 flex flex-col items-center justify-center lg:border-r max-lg:mb-4 border-gray-200">
<p className="text-xl">IP数量</p>
<p className="mt-9 max-lg:mt-2 text-5xl bg-linear-to-t from-blue-500 to-cyan-400 bg-clip-text text-transparent font-bold pb-2 -mb-2">1,350,129</p>
<div className="lg:hidden w-24 border-b mt-4 border-gray-200"></div>
</li>
<li className="flex-1 flex flex-col items-center justify-center lg:border-r max-lg:mb-4 border-gray-200">
<p className="text-xl"></p>
<p className="mt-9 max-lg:mt-2 text-5xl bg-linear-to-t from-blue-500 to-cyan-400 bg-clip-text text-transparent font-bold pb-2 -mb-2">26,578</p>
<div className="lg:hidden w-24 border-b mt-4 border-gray-200"></div>
</li>
<li className="flex-1 flex flex-col items-center justify-center">
<p className="text-xl">IP可用率</p>
<p className="mt-9 max-lg:mt-2 text-5xl bg-linear-to-t from-blue-500 to-cyan-400 bg-clip-text text-transparent font-bold pb-2 -mb-2">99%</p>
</li>
</ul>
<Image src={map} alt="map" className="w-[1200px]"/>
</PageSection>
)
}