Remove learn button.
This commit is contained in:
@ -7,8 +7,6 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height
|
|||||||
img.img-responsive.nav-logo(src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg', alt='learn to code javascript at Free Code Camp logo')
|
img.img-responsive.nav-logo(src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg', alt='learn to code javascript at Free Code Camp logo')
|
||||||
.collapse.navbar-collapse
|
.collapse.navbar-collapse
|
||||||
ul.nav.navbar-nav.navbar-right.hamburger-dropdown
|
ul.nav.navbar-nav.navbar-right.hamburger-dropdown
|
||||||
li
|
|
||||||
a.learn-btn(href='#') Learn
|
|
||||||
li.hidden-xs
|
li.hidden-xs
|
||||||
a#nav-map-btn(href='#' onclick='return false') Map
|
a#nav-map-btn(href='#' onclick='return false') Map
|
||||||
li.visible-xs
|
li.visible-xs
|
||||||
@ -34,19 +32,3 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height
|
|||||||
.hidden-xs.hidden-sm
|
.hidden-xs.hidden-sm
|
||||||
a(href='/' + user.username)
|
a(href='/' + user.username)
|
||||||
img.profile-picture.float-right(src='#{user.picture}')
|
img.profile-picture.float-right(src='#{user.picture}')
|
||||||
script.
|
|
||||||
$(document).ready(function() {
|
|
||||||
$('.learn-btn').click(function(e) {
|
|
||||||
var challengeDashedName = null;
|
|
||||||
e.preventDefault();
|
|
||||||
if (typeof dashedName === "string") {
|
|
||||||
return location.reload();
|
|
||||||
}
|
|
||||||
if (typeof localStorage !== 'undefined') {
|
|
||||||
challengeDashedName = localStorage.getItem('currentDashedName');
|
|
||||||
}
|
|
||||||
window.location = challengeDashedName ?
|
|
||||||
'/challenges/' + challengeDashedName :
|
|
||||||
'/map';
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
Reference in New Issue
Block a user