feat: adjust homepage contact panel and layout (#564)
This commit is contained in:
parent
7a441ff0f8
commit
aca40cb595
10
dashboard/cms/content/homepage/contact/items/github-star.md
Normal file
10
dashboard/cms/content/homepage/contact/items/github-star.md
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
title: 欢迎支持
|
||||
type: info
|
||||
order: 4
|
||||
icon: star
|
||||
description: 欢迎支持关注 Star
|
||||
ctaLabel: 访问 GitHub
|
||||
ctaHref: https://github.com/CloudNativeSuite
|
||||
---
|
||||
点击链接访问 CloudNativeSuite GitHub,欢迎支持关注 Star,获取更多项目动态。
|
||||
@ -7,6 +7,7 @@ import {
|
||||
LifeBuoy,
|
||||
Mail,
|
||||
MessageCircle,
|
||||
Star,
|
||||
X,
|
||||
type LucideIcon,
|
||||
} from 'lucide-react'
|
||||
@ -18,6 +19,7 @@ import type { ContactPanelContent, ContactItemContent } from '@cms/content'
|
||||
const iconMap: Record<string, LucideIcon> = {
|
||||
mail: Mail,
|
||||
'life-buoy': LifeBuoy,
|
||||
star: Star,
|
||||
}
|
||||
|
||||
function getIcon(name?: string): LucideIcon {
|
||||
|
||||
@ -168,38 +168,6 @@ export default function ProductMatrixClient({ solutions }: ProductMatrixClientPr
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{solutions.map((solution, index) => {
|
||||
const isActive = index === activeIndex
|
||||
return (
|
||||
<button
|
||||
key={solution.slug}
|
||||
type="button"
|
||||
onClick={() => setActiveIndex(index)}
|
||||
className={clsx(
|
||||
'relative overflow-hidden rounded-3xl border bg-white p-6 text-left transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-300',
|
||||
isActive
|
||||
? 'border-blue-400 bg-blue-100 text-slate-900 shadow-lg shadow-blue-200/60'
|
||||
: 'border-blue-100 text-slate-700 hover:border-blue-200 hover:bg-blue-50/70',
|
||||
)}
|
||||
>
|
||||
<p className="text-sm font-semibold uppercase tracking-[0.25em] text-blue-700/80">{solution.tagline}</p>
|
||||
<h3 className="mt-3 text-xl font-semibold text-slate-900">{solution.title}</h3>
|
||||
{solution.description ? (
|
||||
<p className="mt-2 text-sm text-slate-700">{solution.description}</p>
|
||||
) : null}
|
||||
<span
|
||||
className={clsx(
|
||||
'mt-4 inline-flex items-center text-sm font-semibold',
|
||||
isActive ? 'text-blue-700' : 'text-blue-600',
|
||||
)}
|
||||
>
|
||||
{isActive ? '正在专题展示' : '点击专题展示'}
|
||||
</span>
|
||||
</button>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user