引入 husky,并全局重新格式化
This commit is contained in:
@@ -1,44 +1,41 @@
|
||||
import Link from "next/link"
|
||||
import Link from 'next/link'
|
||||
import Image, {StaticImageData} from 'next/image'
|
||||
import Wrap from "@/components/wrap"
|
||||
import Wrap from '@/components/wrap'
|
||||
import h01 from '@/assets/header/help/01.svg'
|
||||
import h02 from '@/assets/header/help/02.svg'
|
||||
import h03 from '@/assets/header/help/03.svg'
|
||||
import banner from '@/assets/header/help/banner.webp'
|
||||
|
||||
export default function HelpMenu() {
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<Wrap className="w-full grid grid-cols-4 gap-4 justify-items-center">
|
||||
<Column
|
||||
icon={h01}
|
||||
title="提取IP"
|
||||
items={[
|
||||
{ lead: '短效动态IP提取', href: '#' },
|
||||
{ lead: '长效静态IP提取', href: '#' },
|
||||
{lead: '短效动态IP提取', href: '#'},
|
||||
{lead: '长效静态IP提取', href: '#'},
|
||||
]}
|
||||
/>
|
||||
<Column
|
||||
icon={h02}
|
||||
title="使用教程"
|
||||
items={[
|
||||
{ lead: '快速入手', href: '#' },
|
||||
{ lead: '代码下载', href: '#' },
|
||||
{ lead: 'API文档', href: '#' },
|
||||
{lead: '快速入手', href: '#'},
|
||||
{lead: '代码下载', href: '#'},
|
||||
{lead: 'API文档', href: '#'},
|
||||
]}
|
||||
/>
|
||||
<Column
|
||||
icon={h03}
|
||||
title="产品功能"
|
||||
items={[
|
||||
{ lead: '常见问题', href: '#' },
|
||||
{ lead: '产品介绍', href: '#' },
|
||||
{ lead: '行业资讯', href: '#' },
|
||||
{lead: '常见问题', href: '#'},
|
||||
{lead: '产品介绍', href: '#'},
|
||||
{lead: '行业资讯', href: '#'},
|
||||
]}
|
||||
/>
|
||||
<Image src={banner} alt={`banner`} className={``} />
|
||||
<Image src={banner} alt="banner" className=""/>
|
||||
</Wrap>
|
||||
)
|
||||
}
|
||||
@@ -54,7 +51,7 @@ function Column(props: {
|
||||
return (
|
||||
<div className="flex flex-col gap-4">
|
||||
<h3 className="font-bold flex gap-3 items-center">
|
||||
<Image src={props.icon} alt={props.title} className="w-10 h-10" />
|
||||
<Image src={props.icon} alt={props.title} className="w-10 h-10"/>
|
||||
<span>{props.title}</span>
|
||||
</h3>
|
||||
<ul className=" text-gray-500 text-sm flex flex-col items-end gap-2">
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import Image from "next/image"
|
||||
import Link from "next/link"
|
||||
import down from "@/assets/header/down.svg"
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import down from '@/assets/header/down.svg'
|
||||
|
||||
export function LinkItem(props: {
|
||||
text: string
|
||||
href: string
|
||||
}) {
|
||||
return (
|
||||
<li className={`group relative`}>
|
||||
<li className="group relative">
|
||||
<Link
|
||||
href={props.href}
|
||||
className={[
|
||||
@@ -35,7 +35,7 @@ export function MenuItem(props: {
|
||||
onLeave: () => void
|
||||
}) {
|
||||
return (
|
||||
<li className={`group relative`}>
|
||||
<li className="group relative">
|
||||
<button
|
||||
onPointerEnter={props.onEnter}
|
||||
onPointerLeave={props.onLeave}
|
||||
@@ -50,7 +50,7 @@ export function MenuItem(props: {
|
||||
<span>{props.text}</span>
|
||||
<Image
|
||||
src={down}
|
||||
alt={`drop_menu`}
|
||||
alt="drop_menu"
|
||||
className={[
|
||||
`transition-transform duration-200 ease-in-out`,
|
||||
props.active
|
||||
@@ -66,7 +66,7 @@ export function MenuItem(props: {
|
||||
props.active
|
||||
? `bg-blue-500`
|
||||
: 'bg-transparent',
|
||||
].join(' ')} />
|
||||
].join(' ')}/>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,26 +35,26 @@ export function Domestic(props: {}) {
|
||||
<section role="tabpanel" className="flex gap-16 mr-16">
|
||||
<div className="w-64 flex flex-col">
|
||||
<h3 className="mb-6 font-bold flex items-center gap-3">
|
||||
<Image src={prod} alt={`产品`} className={`w-10 h-=10`}/>
|
||||
<Image src={prod} alt="产品" className="w-10 h-=10"/>
|
||||
<span>代理产品</span>
|
||||
</h3>
|
||||
|
||||
<DomesticLink
|
||||
label={`动态IP`}
|
||||
desc={`全国300+城市级定位节点`}
|
||||
href={`/product?type=dynamic`}
|
||||
label="动态IP"
|
||||
desc="全国300+城市级定位节点"
|
||||
href="/product?type=dynamic"
|
||||
discount={45}
|
||||
/>
|
||||
<DomesticLink
|
||||
label={`长效静态IP`}
|
||||
desc={`IP 资源覆盖全国`}
|
||||
href={`/product?type=dynamic`}
|
||||
label="长效静态IP"
|
||||
desc="IP 资源覆盖全国"
|
||||
href="/product?type=dynamic"
|
||||
discount={45}
|
||||
/>
|
||||
<DomesticLink
|
||||
label={`固定IP`}
|
||||
desc={`全国300+城市级定位节点`}
|
||||
href={`/product?type=static`}
|
||||
label="固定IP"
|
||||
desc="全国300+城市级定位节点"
|
||||
href="/product?type=static"
|
||||
discount={45}
|
||||
/>
|
||||
</div>
|
||||
@@ -85,7 +85,6 @@ export function Oversea(props: {}) {
|
||||
}
|
||||
|
||||
export default function ProductMenu() {
|
||||
|
||||
const [type, setType] = useState<TabType>('domestic')
|
||||
|
||||
return (
|
||||
@@ -105,7 +104,7 @@ export default function ProductMenu() {
|
||||
</div>
|
||||
<aside className="w-64">
|
||||
<h3 className="flex gap-3 items-center mb-4">
|
||||
<Image src={anno} alt={`公告`} className={`w-10 h-10`}/>
|
||||
<Image src={anno} alt="公告" className="w-10 h-10"/>
|
||||
<span>网站公告</span>
|
||||
</h3>
|
||||
<div className="flex flex-col gap-2">
|
||||
@@ -140,14 +139,19 @@ export function DomesticLink(props: {
|
||||
}
|
||||
|
||||
return (
|
||||
<Link href={props.href} className={merge(
|
||||
`transition-colors duration-150 ease-in-out`,
|
||||
`p-4 rounded-lg flex flex-col gap-2 hover:bg-blue-50`,
|
||||
)} onClick={onClick}>
|
||||
<Link
|
||||
href={props.href}
|
||||
className={merge(
|
||||
`transition-colors duration-150 ease-in-out`,
|
||||
`p-4 rounded-lg flex flex-col gap-2 hover:bg-blue-50`,
|
||||
)}
|
||||
onClick={onClick}>
|
||||
<p className="flex gap-2">
|
||||
<span>{props.label}</span>
|
||||
<span className="text-orange-500 text-xs text-light px-2 py-1 bg-orange-50 rounded-full">
|
||||
折扣{props.discount}%
|
||||
折扣
|
||||
{props.discount}
|
||||
%
|
||||
</span>
|
||||
</p>
|
||||
<p className="text-gray-400 text-sm">
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
import Image from "next/image"
|
||||
import Wrap from "@/components/wrap"
|
||||
import s01 from "@/assets/header/solution/01.svg"
|
||||
import s02 from "@/assets/header/solution/02.svg"
|
||||
import s03 from "@/assets/header/solution/03.svg"
|
||||
import s04 from "@/assets/header/solution/04.svg"
|
||||
import s05 from "@/assets/header/solution/05.svg"
|
||||
import s06 from "@/assets/header/solution/06.svg"
|
||||
import s07 from "@/assets/header/solution/07.svg"
|
||||
import s08 from "@/assets/header/solution/08.svg"
|
||||
import Image from 'next/image'
|
||||
import Wrap from '@/components/wrap'
|
||||
import s01 from '@/assets/header/solution/01.svg'
|
||||
import s02 from '@/assets/header/solution/02.svg'
|
||||
import s03 from '@/assets/header/solution/03.svg'
|
||||
import s04 from '@/assets/header/solution/04.svg'
|
||||
import s05 from '@/assets/header/solution/05.svg'
|
||||
import s06 from '@/assets/header/solution/06.svg'
|
||||
import s07 from '@/assets/header/solution/07.svg'
|
||||
import s08 from '@/assets/header/solution/08.svg'
|
||||
import {StaticImageData} from 'next/image'
|
||||
|
||||
export default function SolutionMenu() {
|
||||
|
||||
return (
|
||||
<Wrap className="grid grid-cols-4 auto-rows-fr gap-4">
|
||||
<SolutionItem
|
||||
@@ -70,7 +69,7 @@ function SolutionItem(props: {
|
||||
`transition-colors duration-200 hover:bg-blue-50`,
|
||||
].join(' ')}
|
||||
>
|
||||
<Image src={props.icon} alt={props.title} className="w-10 h-10" />
|
||||
<Image src={props.icon} alt={props.title} className="w-10 h-10"/>
|
||||
<div className="flex flex-col gap-1">
|
||||
<h3 className="font-bold">{props.title}</h3>
|
||||
<p className="text-gray-400 text-sm">{props.desc}</p>
|
||||
|
||||
Reference in New Issue
Block a user