Skip to content

Commit 03d51cb

Browse files
feat: nav update for nutanix-x-traefik page (#50)
* feat: nav update for nutanix-x-traefik page * fix: order of nutanix page in nav
1 parent 43b05ed commit 03d51cb

File tree

6 files changed

+84
-22
lines changed

6 files changed

+84
-22
lines changed

src/components/nav/DrawerNav.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ const DrawerNav = ({ isDrawerOpen }: Props) => {
8686
</SubLink>
8787
<SubLink href="https://traefik.io/solutions/kubernetes-ingress/">Kubernetes Ingress</SubLink>
8888
<SubLink href="https://traefik.io/solutions/docker-swarm-ingress/">Docker Swarm Ingress</SubLink>
89-
<SubLink href="https://traefik.io/solutions/hashicorp-and-traefik/">
90-
Traefik & HashiCrop <Badge>New!</Badge>
89+
<SubLink href="https://traefik.io/solutions/hashicorp-and-traefik/">Traefik & HashiCorp</SubLink>
90+
<SubLink href="https://traefik.io/solutions/nutanix-and-traefik/">
91+
Traefik & Nutanix <Badge>New!</Badge>
9192
</SubLink>
9293
</div>
9394
</div>

src/components/nav/Header.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ const Header = ({ product }: { product?: string }) => {
152152
alignItems: 'center',
153153
justifyContent: 'space-between',
154154
height: '100%',
155-
position: 'relative',
156155
width: '100%',
157156
maxWidth: '1274px',
158157
padding: ['0 20px', '0 25px'],

src/components/nav/MainNav.tsx

+41-16
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { ReactComponent as EnterpriseIcon } from '../../images/menu_icons_traefi
3434
import { ReactComponent as HubIcon } from '../../images/menu_icons_traefik_hub.svg'
3535
import { ReactComponent as WafIcon } from '../../images/menu_icons_waf.svg'
3636
import { ReactComponent as HashicorpIcon } from '../../images/menu_icons_hashicorp.svg'
37+
import { ReactComponent as NutanixIcon } from '../../images/menu_icons_nutanix.svg'
3738
import { ReactComponent as AiGatewayIcon } from '../../images/menu_icons_ai_gateway.svg'
3839
import PostCard from './PostCard'
3940
import NavHeader from './NavHeader'
@@ -53,8 +54,12 @@ const MainNav = () => {
5354
<Wrapper as="nav" style={{ height: '100%', alignItems: 'center', marginLeft: '65px' }} aria-label="Main menu">
5455
<Flex as="ul" sx={{ height: '100%', alignItems: 'center', p: 0, m: 0, listStyle: 'none' }}>
5556
{/* Products */}
56-
<NavItem name="Products" hasSubmenu position={{ marginLeft: '-15%' }}>
57-
<Grid sx={{ gridTemplateColumns: '1fr', maxWidth: '1160px' }}>
57+
<NavItem
58+
name="Products"
59+
hasSubmenu
60+
position={{ left: '50%', transform: 'translateX(-50%)', width: '100%', maxWidth: '1050px' }}
61+
>
62+
<Grid>
5863
<NavHeader title="Traefik Runtime Platform" />
5964
<Grid sx={{ gridTemplateColumns: '1fr 1fr 1fr' }}>
6065
<Product
@@ -140,12 +145,15 @@ const MainNav = () => {
140145
<NavItem name="Solutions" hasSubmenu position={{ marginLeft: '-25%' }} heighlight={true}>
141146
<Grid
142147
sx={{
143-
display: 'grid',
144-
gridTemplateColumns: 'repeat(3, 360px)',
148+
maxWidth: '1353px',
149+
gap: '24px',
150+
padding: '0 16px',
151+
gridTemplateColumns: 'repeat(4, 1fr)',
145152
}}
146153
>
147154
<Product
148155
title="Application Proxy"
156+
padding="24px 0"
149157
links={[
150158
{
151159
title: 'Kubernetes Ingress',
@@ -162,10 +170,10 @@ const MainNav = () => {
162170
icon: <DockerSwarmIcon />,
163171
},
164172
]}
165-
bgImage={'https://traefik.io/images/site-nav/[email protected]'}
166173
/>
167174
<Product
168175
title="API Gateway"
176+
padding="24px 0"
169177
links={[
170178
{
171179
title: 'Modern API Gateway',
@@ -182,14 +190,7 @@ const MainNav = () => {
182190
icon: <WafIcon />,
183191
badge: 'New!',
184192
},
185-
{
186-
title: 'Traefik & HashiCorp',
187-
url: 'https://traefik.io/solutions/hashicorp-and-traefik/',
188-
external: true,
189-
description: 'A comprehensive and powerful API Gateway for HashiCorp stack.',
190-
icon: <HashicorpIcon />,
191-
badge: 'New!',
192-
},
193+
193194
{
194195
title: 'AI Gateway',
195196
url: 'https://traefik.io/solutions/ai-gateway/',
@@ -199,10 +200,10 @@ const MainNav = () => {
199200
badge: 'New!',
200201
},
201202
]}
202-
bgImage={'https://traefik.io/images/site-nav/[email protected]'}
203203
/>
204204
<Product
205205
title="API Management"
206+
padding="24px 0"
206207
links={[
207208
{
208209
title: 'GitOps-Driven API Management',
@@ -229,13 +230,37 @@ const MainNav = () => {
229230
badge: 'New!',
230231
},
231232
]}
232-
bgImage={'https://traefik.io/images/site-nav/[email protected]'}
233+
/>
234+
<Product
235+
title="BETTER TOGETHER"
236+
padding="24px 0"
237+
links={[
238+
{
239+
title: 'Traefik & HashiCorp',
240+
url: 'https://traefik.io/solutions/hashicorp-and-traefik/',
241+
external: true,
242+
description: 'A comprehensive and powerful API Gateway for HashiCorp stack.',
243+
icon: <HashicorpIcon />,
244+
},
245+
{
246+
title: 'Traefik & Nutanix',
247+
url: 'https://traefik.io/solutions/nutanix-and-traefik/',
248+
external: true,
249+
description: 'A comprehensive and powerful API Gateway for HashiCorp stack.',
250+
icon: <NutanixIcon />,
251+
badge: 'New!',
252+
},
253+
]}
233254
/>
234255
</Grid>
235256
</NavItem>
236257

237258
{/* Learn */}
238-
<NavItem name="Learn" hasSubmenu position={{ right: '25px' }}>
259+
<NavItem
260+
name="Learn"
261+
hasSubmenu
262+
position={{ width: '100%', maxWidth: '1192px', left: '50%', transform: 'translateX(-50%)' }}
263+
>
239264
<Grid sx={{ gridTemplateColumns: 'auto auto auto 288px', p: '24px', gap: '93px', lineHeight: 1.6 }}>
240265
<MenuColumn.Column title="Learn">
241266
<MenuColumn.Item title="Blog" logo={<BlogIcon />} href="https://traefik.io/blog/" external />

src/components/nav/NavItem.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const Menu = styled(Box)`
9797
margin: 0;
9898
display: none;
9999
background: transparent;
100-
padding-top: 16px;
100+
padding-top: 8px;
101101
`
102102

103103
const MenuInner = styled(Box)`

src/components/nav/Product.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Link from 'components/Link'
66
type NavProductProps = {
77
title?: string
88
description?: string
9+
padding?: string
910
links?: {
1011
title: string
1112
url: string
@@ -31,8 +32,8 @@ type NavbarLinkProps = {
3132
styles?: any
3233
}
3334

34-
const Product = ({ bgImage, title, description, links, subLinks = [] }: NavProductProps) => (
35-
<Box sx={{ p: title ? '24px' : '16px 16px 48px', backgroundColor: '#fff', position: 'relative' }}>
35+
const Product = ({ bgImage, title, description, padding, links, subLinks = [] }: NavProductProps) => (
36+
<Box sx={{ p: padding ? padding : title ? '24px' : '16px 16px 48px', backgroundColor: '#fff', position: 'relative' }}>
3637
{bgImage && (
3738
<img
3839
src={bgImage}

src/images/menu_icons_nutanix.svg

+36
Loading

0 commit comments

Comments
 (0)