Skip to content

Commit ba78e9f

Browse files
Compare pages in nav menu & nav icon color update
1 parent 729a8e0 commit ba78e9f

16 files changed

+130
-44
lines changed

src/components/nav/DrawerNav.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,20 @@ const DrawerNav = ({ isDrawerOpen }: Props) => {
113113
</div>
114114
</div>
115115

116+
<div className="menu-item-wrapper menu-item-wrapper--expandable" onClick={(e) => toggleMenu(e)}>
117+
<span className="menu-item menu-item--with-icon">
118+
<span className="title">Compare</span>
119+
<span className="icon">
120+
<Chevron />
121+
</span>
122+
</span>
123+
<div className="sub-menu">
124+
<SubLink href="https://traefik.io/compare/traefik-vs-kong-konnect/">vs Kong Konnect</SubLink>
125+
<SubLink href="https://traefik.io/compare/traefik-vs-aws-api-gateway/">vs AWS API Gateway</SubLink>
126+
<SubLink href="https://traefik.io/compare/traefik-vs-azure-api-management/">vs AWS API Gateway</SubLink>
127+
</div>
128+
</div>
129+
116130
<div className="menu-item-wrapper">
117131
<SubLink href="https://traefik.io/pricing/" className="menu-item">
118132
Pricing

src/components/nav/MainNav.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,28 @@ const MainNav = () => {
297297
</Grid>
298298
</NavItem>
299299

300+
<NavItem name="Compare" hasSubmenu>
301+
<Grid sx={{ gridTemplateColumns: '1fr', width: '304px', p: '24px' }}>
302+
<MenuColumn.Column title="Compare Traefik Hub">
303+
<MenuColumn.Item
304+
title="vs Kong Konnect"
305+
href="https://traefik.io/compare/traefik-vs-kong-konnect/"
306+
external
307+
/>
308+
<MenuColumn.Item
309+
title="vs AWS API Gateway"
310+
href="https://traefik.io/compare/traefik-vs-aws-api-gateway/"
311+
external
312+
/>
313+
<MenuColumn.Item
314+
title="vs Azure APIM"
315+
href="https://traefik.io/compare/traefik-vs-azure-api-management/"
316+
external
317+
/>
318+
</MenuColumn.Column>
319+
</Grid>
320+
</NavItem>
321+
300322
{/* Pricing */}
301323
<NavItem name="Pricing" url="https://traefik.io/pricing/" />
302324

src/components/nav/MenuColumn.tsx

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react'
22
import styled from 'styled-components'
33
import Link from 'components/Link'
44
import { Box, Text, theme } from '@containous/faency'
5+
import { ReactComponent as ArrowRight } from '../../images/arrow-right.svg'
56

67
const Links = styled.ul`
78
list-style: none;
@@ -21,16 +22,28 @@ const Links = styled.ul`
2122
font-size: 16px;
2223
line-height: 1.38;
2324
font-weight: 500;
24-
color: ${theme.colors.dark};
25+
color: #354757;
2526
text-decoration: none;
2627
28+
svg {
29+
color: #677581;
30+
}
31+
32+
i svg {
33+
opacity: 0;
34+
transition: opacity 0.2s ease-in-out;
35+
}
36+
2737
&:hover {
28-
color: #1f56d6;
38+
color: #000;
2939
text-decoration: none;
3040
31-
p:first-of-type {
32-
color: #1f56d6;
33-
text-decoration: none;
41+
svg {
42+
color: #000;
43+
}
44+
45+
i svg {
46+
opacity: 1;
3447
}
3548
3649
span: {
@@ -60,11 +73,11 @@ export const Column: React.FC<MenuColumnProps> = ({ title, children }) => (
6073
<Text
6174
as="p"
6275
sx={{
63-
mb: '14px',
76+
mb: '24px',
6477
fontSize: '11px',
6578
fontWeight: 500,
6679
lineHeight: 1.33,
67-
color: '#7e89a7',
80+
color: '#03192d',
6881
letterSpacing: '2.75px',
6982
}}
7083
>
@@ -87,7 +100,7 @@ export const Item: React.FC<MenuColumnLinkProps> = ({ href, external, title, log
87100
{external ? (
88101
<Link href={href} target="_self" {...props}>
89102
{logo ? (
90-
<Box sx={{ display: 'flex', paddingTop: '5px' }}>
103+
<Box sx={{ display: 'inline-flex', paddingTop: '5px' }}>
91104
{logo}
92105
<Box sx={{ ml: '15px', maxWidth: '290px' }}>
93106
<Text as="p">{title}</Text>
@@ -97,6 +110,9 @@ export const Item: React.FC<MenuColumnLinkProps> = ({ href, external, title, log
97110
) : (
98111
title
99112
)}
113+
<i>
114+
<ArrowRight style={{ marginLeft: 4, display: 'inline-block', width: 16 }} />
115+
</i>
100116
</Link>
101117
) : (
102118
<Link href={href} {...props}>

src/images/arrow-right.svg

Lines changed: 6 additions & 0 deletions
Loading

src/images/menu_icons_academy.svg

Lines changed: 4 additions & 2 deletions
Loading

src/images/menu_icons_blog.svg

Lines changed: 4 additions & 2 deletions
Loading
Lines changed: 8 additions & 5 deletions
Loading

src/images/menu_icons_events.svg

Lines changed: 4 additions & 2 deletions
Loading

src/images/menu_icons_forum.svg

Lines changed: 4 additions & 2 deletions
Loading

src/images/menu_icons_list.svg

Lines changed: 4 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)