Skip to content

Commit ac963c9

Browse files
committed
feat(header): add responsive visibility classes to navigation items
1 parent d545a30 commit ac963c9

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

components/business/app-header.tsx

Lines changed: 27 additions & 10 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,43 +14,52 @@ export default function AppHeader() {
1414
{
1515
label: 'Features',
1616
url: docs_url('features/distributed/'),
17+
classes: '',
1718
},
1819
{
1920
label: 'Architecture',
2021
url: docs_url('/concepts/architecture.html'),
22+
classes: 'hidden xl:inline-block',
2123
},
2224
{
2325
label: 'Solutions',
2426
url: docs_url('features/data-lake/'),
27+
classes: 'hidden xl:inline-block',
2528
},
2629
// {
2730
// label: 'Integrations',
28-
// url: `https://docs.rustfs.com/intergrations`
31+
// url: `https://docs.rustfs.com/intergrations`,
32+
// classes: '',
2933
// },
3034
{
3135
label: 'AI',
32-
url: docs_url('features/ai')
36+
url: docs_url('features/ai'),
37+
classes: '',
3338
},
3439
{
3540
label: 'Download',
36-
url: `/download`
41+
url: `/download`,
42+
classes: '',
3743
},
3844
{
39-
label: 'Documentation',
40-
url: docs_url('')
45+
label: 'Docs',
46+
url: docs_url(''),
47+
classes: '',
4148
},
4249
{
4350
label: 'Blog',
44-
url: 'https://rustfs.dev/'
51+
url: 'https://rustfs.dev/',
52+
classes: '',
4553
},
4654
{
4755
label: 'Community',
48-
url: 'https://github.com/rustfs/rustfs/discussions'
56+
url: 'https://github.com/rustfs/rustfs/discussions',
57+
classes: '',
4958
}
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">
@@ -59,7 +68,15 @@ export default function AppHeader() {
5968
</Link>
6069
<div className="hidden md:flex md:gap-x-6">
6170
{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>
71+
return (
72+
<a
73+
key={index}
74+
className={cn(`inline-block rounded-lg px-2 py-1 text-sm text-primary`, item.classes)}
75+
href={item.url}
76+
>
77+
{item.label}
78+
</a>
79+
)
6380
})}
6481
</div>
6582
</div>

0 commit comments

Comments
 (0)