Skip to content

Commit e7d292d

Browse files
committed
style(header,hero): adjust nav visibility and hero title layout
1 parent b34379d commit e7d292d

File tree

2 files changed

+28
-13
lines changed

2 files changed

+28
-13
lines changed

components/business/app-header.tsx

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { docs_url } from "@/lib/utils"
3+
import { cn, docs_url } from "@/lib/utils"
44
import { Popover, Transition } from '@headlessui/react'
55
import Link from "next/link"
66
import { Fragment } from 'react'
@@ -14,53 +14,68 @@ export default function AppHeader() {
1414
{
1515
label: '产品功能',
1616
url: docs_url('features/distributed/'),
17+
classes: '',
1718
},
1819
{
1920
label: '架构',
2021
url: docs_url('/concepts/architecture.html'),
22+
classes: 'hidden xl:inline-block',
2123
},
2224
{
2325
label: '解决方案',
2426
url: docs_url('features/data-lake/'),
27+
classes: 'hidden xl:inline-block',
2528
},
2629
{
2730
label: 'AI 支持',
28-
url: docs_url('features/ai')
31+
url: docs_url('features/ai'),
32+
classes: 'hidden xl:inline-block',
2933
},
3034
{
3135
label: '下载',
32-
url: `/download`
36+
url: `/download`,
37+
classes: '',
3338
},
3439
{
3540
label: '文档',
36-
url: docs_url('')
41+
url: docs_url(''),
42+
classes: '',
3743
},
3844
{
3945
label: '博客',
40-
url: `https://rustfs.dev/`
46+
url: `https://rustfs.dev/`,
47+
classes: '',
4148
},
4249
{
4350
label: '社区',
44-
url: 'https://github.com/rustfs/rustfs/discussions'
51+
url: 'https://github.com/rustfs/rustfs/discussions',
52+
classes: 'hidden xl:inline-block',
4553
},
4654
{
4755
label: '关于我们',
48-
url: docs_url('about')
49-
}
56+
url: docs_url('about'),
57+
classes: 'hidden xl:inline-block',
58+
},
5059
]
5160

5261
return (
53-
<header className="py-10">
62+
<header className="py-6 xl:py-8">
5463
<div className="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8">
5564
<nav className="relative z-50 flex justify-between">
5665
<div className="flex items-center md:gap-x-12">
5766
<Link href="/">
5867
<Logo className="h-5 w-auto" />
5968
</Link>
6069
<div className="hidden md:flex md:gap-x-6">
61-
{navs.map((item, index) => {
62-
return <a key={index} className="inline-block rounded-lg px-2 py-1 text-sm text-primary" href={item.url}>{item.label}</a>
63-
})}
70+
{navs.map((item, index) => (
71+
<a
72+
key={index}
73+
className={cn("inline-block rounded-lg px-2 py-1 text-sm text-primary", item.classes)}
74+
href={item.url}
75+
>
76+
{item.label}
77+
</a>
78+
))}
6479
</div>
6580
</div>
6681
<div className="flex items-center gap-x-2 md:gap-x-5">

components/business/home-hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export default function HomeHero({ dockerPulls, metrics }: HomeHeroProps) {
7676
<div className="relative flex items-center gap-12">
7777
<div className="space-y-6 text-center lg:text-left relative z-20 lg:w-3/5">
7878
<h1 className="font-display text-3xl font-extrabold tracking-tight text-primary sm:text-4xl md:text-5xl xl:text-6xl leading-tight">
79-
世界上增长最快的分布式对象存储
79+
世界上增长最快的<br />分布式对象存储
8080
</h1>
8181
<p className="mx-auto lg:mx-0 max-w-2xl text-lg tracking-tight text-secondary-foreground">
8282
RustFS 用热门安全的 Rust 语言开发,兼容 S3 协议。适用于 AI/ML 及海量数据存储、大数据、互联网、工业和保密存储等全部场景。近乎免费使用。遵循 Apache 2 协议,支持国产保密设备和系统。

0 commit comments

Comments
 (0)