add donate links and mousetrap

This commit is contained in:
Dylan
2017-06-05 10:46:04 -05:00
committed by Stuart Taylor
parent a33ebd3c43
commit e1a2fecd13
6 changed files with 15 additions and 9 deletions

View File

@ -1,3 +1,5 @@
import { donateUrl } from '../common/utils/constantStrings.json';
var main = window.main || {};
main.ga = window.ga || function() {};
@ -106,9 +108,9 @@ $(document).ready(function() {
// About
window.location = '/about';
});
window.Mousetrap.bind('g n s', () => {
// Shop
window.location = '/shop';
window.Mousetrap.bind('g n d', () => {
// Donate
window.location = donateUrl;
});
window.Mousetrap.bind('g n o', () => {
// Settings

View File

@ -18,7 +18,6 @@ const softRedirects = {
'g n n': '/challenges/next-challenge',
'g n a': '/about',
'g n m': '/map',
'g n s': '/shop',
'g n o': '/settings'
};
@ -30,6 +29,10 @@ export default function mouseTrapSaga(actions$) {
'g n r',
() => hardGoTo('https://github.com/freecodecamp/freecodecamp')
),
bindKey(
'g n d',
() => hardGoTo('https://www.freecodecamp.com/donate')
),
bindKey(
'g n w',
() => hardGoTo('http://forum.freecodecamp.com')

View File

@ -40,7 +40,7 @@
"isReact": true
},
{
"content": "Shop",
"link": "/shop"
"content": "Donate",
"link": "https://www.freecodecamp.com/donate"
}
]

View File

@ -1,3 +1,4 @@
{
"defaultProfileImage": "https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png"
"defaultProfileImage": "https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png",
"donateUrl": "https://www.freecodecamp.com/donate"
}

View File

@ -25,7 +25,7 @@ nav.navbar.navbar-default.navbar-static-top.nav-height
li
a(href='/map') Map
li
a(href='/shop') Shop
a(href='https://www.freecodecamp.com/donate') Donate
if !user
li
a(href='/signup') Sign Up

View File

@ -32,7 +32,7 @@ urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")
priority= 0.9
url
loc http://www.freecodecamp.com/shop
loc http://www.freecodecamp.com/donate
changefreq weekly
lastmod= now
priority= 0.9