Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit 87167d1

Browse files
VickyAbishekvinaypuppal
authored andcommitted
HomePage Nav Donate Button
Added Donate button to the homepage nagvigation bar pointing to the donate url
1 parent e311b12 commit 87167d1

File tree

2 files changed

+34
-14
lines changed

2 files changed

+34
-14
lines changed

components/common/header/index.js

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ class NavBar extends React.Component {
6161
path: 'https://coderplex.org/jobs',
6262
external: true,
6363
},
64+
{
65+
title: 'Donate',
66+
path: 'https://donate.coderplex.org',
67+
external: true,
68+
},
6469
],
6570
};
6671

@@ -101,22 +106,32 @@ class NavBar extends React.Component {
101106
</Link>
102107
</NavLogo>
103108
<NavLinks className={this.state.menuOpen ? 'open' : ''}>
104-
{this.state.navItems.filter(item => !item.external).map(item => (
105-
<NavLink key={item.path}>
106-
<Link href={item.path}>
107-
<a className={pathName === item.path ? 'active' : ''}>
109+
{this.state.navItems
110+
.filter(item => !item.external)
111+
.map(item => (
112+
<NavLink key={item.path}>
113+
<Link href={item.path}>
114+
<a className={pathName === item.path ? 'active' : ''}>
115+
<span>{item.title}</span>
116+
</a>
117+
</Link>
118+
</NavLink>
119+
))}
120+
{this.state.navItems
121+
.filter(item => item.external)
122+
.map(item => (
123+
<NavLink key={item.path}>
124+
<a
125+
href={item.path}
126+
rel="noopener noreferrer"
127+
className={[
128+
pathName === item.path ? 'active' : '',
129+
item.title === 'Donate' ? 'donate_btn' : '',
130+
].join(' ')}>
108131
<span>{item.title}</span>
109132
</a>
110-
</Link>
111-
</NavLink>
112-
))}
113-
{this.state.navItems.filter(item => item.external).map(item => (
114-
<NavLink key={item.path}>
115-
<a href={item.path} rel="noopener noreferrer" className={pathName === item.path ? 'active' : ''}>
116-
<span>{item.title}</span>
117-
</a>
118-
</NavLink>
119-
))}
133+
</NavLink>
134+
))}
120135
</NavLinks>
121136
</Nav>
122137
</Container>

components/common/header/index.styles.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ export const NavLink = styled.li`
107107
}
108108
}
109109
}
110+
&.donate_btn {
111+
background: #e91e63;
112+
color: white;
113+
border-radius: 10px;
114+
}
110115
@media(max-width: 885px) {
111116
width: 100%;
112117
font-size: 14px;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy