2015-04-24 01:31:59 -07:00
|
|
|
nav.navbar.navbar-default.navbar-fixed-top.nav-height
|
|
|
|
.navbar-header
|
|
|
|
button.hamburger.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse')
|
2015-06-05 22:11:30 -07:00
|
|
|
.col-xs-12
|
2015-04-24 01:31:59 -07:00
|
|
|
span.hamburger-text Menu
|
|
|
|
a.navbar-brand(href='/')
|
2015-08-10 15:10:38 -07:00
|
|
|
img.img-responsive.nav-logo(src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg', alt='learn to code javascript at Free Code Camp logo')
|
2015-04-24 01:31:59 -07:00
|
|
|
.collapse.navbar-collapse
|
|
|
|
ul.nav.navbar-nav.navbar-right.hamburger-dropdown
|
2015-09-08 21:15:18 -07:00
|
|
|
li
|
2015-09-08 22:31:20 -07:00
|
|
|
a.learn-btn(href='#') Learn
|
2015-04-09 12:58:30 -07:00
|
|
|
li
|
2015-04-24 01:31:59 -07:00
|
|
|
a(href='/map') Map
|
2015-06-20 23:11:33 -07:00
|
|
|
li
|
|
|
|
a(href='//gitter.im/FreeCodeCamp/FreeCodeCamp', target='_blank') Chat
|
2015-01-26 11:02:22 -08:00
|
|
|
li
|
2015-06-25 23:43:02 -07:00
|
|
|
a(href='/news') News
|
2015-01-26 11:02:22 -08:00
|
|
|
li
|
2015-08-04 14:58:24 -07:00
|
|
|
a(href='//github.com/FreeCodeCamp/freecodecamp/wiki/Home', target='_blank') Wiki
|
2015-04-24 01:31:59 -07:00
|
|
|
if !user
|
|
|
|
li      
|
|
|
|
li
|
|
|
|
a.btn.signup-btn.signup-btn-nav(href='/login') Sign in
|
|
|
|
else
|
2015-08-07 18:26:18 -07:00
|
|
|
if user.isGithubCool
|
|
|
|
li
|
|
|
|
a(href='/' + user.username) [ #{user.progressTimestamps.length} ]
|
|
|
|
.hidden-xs.hidden-sm
|
|
|
|
a(href='/' + user.username)
|
|
|
|
img.profile-picture.float-right(src='#{user.picture}')
|
|
|
|
else
|
2015-04-24 01:31:59 -07:00
|
|
|
li
|
2015-08-05 19:12:54 -07:00
|
|
|
a(href='/account') [ #{user.progressTimestamps.length} ]
|
2015-04-24 01:31:59 -07:00
|
|
|
.hidden-xs.hidden-sm
|
2015-08-05 19:12:54 -07:00
|
|
|
a(href='/account')
|
|
|
|
img.profile-picture.float-right(src='#{user.picture}')
|
2015-09-08 22:31:20 -07:00
|
|
|
script.
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('.learn-btn').click(function(e) {
|
2015-09-08 23:47:00 -07:00
|
|
|
var challengeDashedName = null;
|
2015-09-08 22:31:20 -07:00
|
|
|
e.preventDefault();
|
2015-09-08 23:47:00 -07:00
|
|
|
if (typeof dashedName === "string") {
|
|
|
|
return location.reload();
|
|
|
|
}
|
2015-09-08 22:31:20 -07:00
|
|
|
if (typeof localStorage !== 'undefined') {
|
2015-09-08 23:47:00 -07:00
|
|
|
challengeDashedName = localStorage.getItem('currentDashedName');
|
2015-09-08 22:31:20 -07:00
|
|
|
}
|
2015-09-08 23:47:00 -07:00
|
|
|
window.location = challengeDashedName ?
|
|
|
|
'/challenges/' + challengeDashedName :
|
2015-09-08 22:31:20 -07:00
|
|
|
'/map';
|
|
|
|
});
|
|
|
|
});
|