diff --git a/controllers/home.js b/controllers/home.js index 836ad9e62b..686cd2a80c 100644 --- a/controllers/home.js +++ b/controllers/home.js @@ -5,7 +5,7 @@ exports.index = function(req, res) { if (req.user) { - res.redirect('/challenges/') + res.redirect('/map') } else { res.render('home', { title: 'Learn to Code JavaScript and get a Coding Job by Helping Nonprofits' diff --git a/public/css/main.less b/public/css/main.less index d6e905c8ea..cf93cebef7 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -273,11 +273,6 @@ ul { height: 30px; margin-top: -5px; } - @media (min-width: 767px) and (max-width: 890px) { - height: 30px; - margin-top: -5px; - } - } .navbar-right { @@ -790,10 +785,52 @@ iframe.iphone { transition: background .2s ease-in-out, border .2s ease-in-out; } +@media (max-width: 991px) { + .navbar-header { + float: none; + } + + .navbar-toggle { + display: block; + } + + .navbar-collapse.collapse { + display: none !important; + } + + .navbar-nav { + float: none !important; + margin: 7.5px -15px; + } + + .navbar-nav > li { + float: none; + } + + .navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; + } + + .navbar-text { + float: none; + margin: 15px 0; + } + + /* since 3.1.0 */ + .navbar-collapse.collapse.in { + display: block !important; + } + + .collapsing { + overflow: hidden !important; + } +} + .hamburger { width: 80px; padding-left: 0px; - padding-right: 0px; + padding-right: 8px; margin-left: 0px; margin-right: 2px; text-align:left; @@ -804,7 +841,7 @@ iframe.iphone { line-height: 0.75em; margin-top: 10px; font-size: 16px; - margin-left: -5px; + margin-left: -8px; } .tight-h3 { diff --git a/views/account/show.jade b/views/account/show.jade index 8dd1314227..deb8168b4f 100644 --- a/views/account/show.jade +++ b/views/account/show.jade @@ -8,10 +8,13 @@ block content h1 #{username}'s portfolio .panel-body if (user && user.profile.username === username) - .col-xs-12 - .text-center - a.btn.btn-big.btn-primary(href="/account") Update my portfolio page or manage my account - br + .row.text-center + .col-xs-12.col-sm-10.col-sm-offset-1 + a.btn.btn-big.btn-primary.btn-block(href="/account") Update my portfolio page or manage my account + .spacer + .col-xs-12.col-sm-10.col-sm-offset-1 + a.btn.btn-big.btn-success.btn-block(href="/signout") Sign out of Free Code Camp + .spacer .row .col-xs-12 .col-xs-12.col-sm-12.col-md-5 diff --git a/views/layout-wide.jade b/views/layout-wide.jade index a320f210a5..fe05524cb0 100644 --- a/views/layout-wide.jade +++ b/views/layout-wide.jade @@ -6,8 +6,8 @@ html(ng-app='profileValidation', lang='en') body.no-top-and-bottom-margins.full-screen-body-background include partials/css-cdns - include partials/navbar-wide + include partials/navbar include partials/flash block content include partials/footer - != js('application') \ No newline at end of file + != js('application') diff --git a/views/layout.jade b/views/layout.jade index e50689c0a7..48e11a3143 100644 --- a/views/layout.jade +++ b/views/layout.jade @@ -5,7 +5,7 @@ html(ng-app='profileValidation', lang='en') != css('main') body.top-and-bottom-margins include partials/css-cdns - include partials/navbar-narrow + include partials/navbar .container include partials/flash block content diff --git a/views/partials/navbar-narrow.jade b/views/partials/navbar-narrow.jade deleted file mode 100644 index 8b13789179..0000000000 --- a/views/partials/navbar-narrow.jade +++ /dev/null @@ -1 +0,0 @@ - diff --git a/views/partials/navbar-wide.jade b/views/partials/navbar-wide.jade deleted file mode 100644 index 96165a030d..0000000000 --- a/views/partials/navbar-wide.jade +++ /dev/null @@ -1,2 +0,0 @@ -nav.navbar.navbar-default.navbar-fixed-top.nav-height - include ./navbar \ No newline at end of file diff --git a/views/partials/navbar.jade b/views/partials/navbar.jade index f563f92c81..e409e3860a 100644 --- a/views/partials/navbar.jade +++ b/views/partials/navbar.jade @@ -1,54 +1,56 @@ -.navbar-header - button.hamburger.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse') - .col-xs-6 - span.hamburger-text Menu - .col-xs-6 - span.sr-only Toggle navigation - span.icon-bar - span.icon-bar - span.icon-bar - a.navbar-brand(href='/') - img.img-responsive.nav-logo(src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg.gz', alt='learn to code javascript at Free Code Camp logo') -.collapse.navbar-collapse - ul.nav.navbar-nav.navbar-right.hamburger-dropdown +nav.navbar.navbar-default.navbar-fixed-top.nav-height + .navbar-header + button.hamburger.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse') + .col-xs-6 + span.hamburger-text Menu + .col-xs-6 + span.sr-only Toggle navigation + span.icon-bar + span.icon-bar + span.icon-bar + a.navbar-brand(href='/') + img.img-responsive.nav-logo(src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg.gz', alt='learn to code javascript at Free Code Camp logo') + .collapse.navbar-collapse + ul.nav.navbar-nav.navbar-right.hamburger-dropdown - li - a(href='/map') Map - - if (user && user.sentSlackInvite) li - a(href='/chat', target='_blank') Chat - else + a(href='/challenges') Next Challenge li - a(href='/challenges/join-our-chat-room') Chat - li - a(href='/stories/hot') News - li - a(href='/field-guide') Field Guide - if !user - li       + a(href='/map') Map + if (user && user.sentSlackInvite) + li + a(href='/chat', target='_blank') Chat + else + li + a(href='/challenges/join-our-chat-room') Chat li - a.btn.signup-btn.signup-btn-nav(href='/login') Sign in - else + a(href='/stories/hot') News li - if (user.profile.username) - - a(href='/' + user.profile.username) [ #{user.progressTimestamps.length} ] - - else - a(href='/account') [ #{user.progressTimestamps.length} ] - .hidden-xs - if user.profile.picture + a(href='/field-guide') Field Guide + if !user + li       + li + a.btn.signup-btn.signup-btn-nav(href='/login') Sign in + else + li if (user.profile.username) - a(href='/' + user.profile.username) - img.profile-picture.float-right(src='#{user.profile.picture}') + + a(href='/' + user.profile.username) [ #{user.progressTimestamps.length} ] + else - a(href='/account') - img.profile-picture.float-right(src='#{user.profile.picture}') - else - if (user.profile.username) - a(href='/' + user.profile.username) - img.profile-picture.float-right(src='#{user.gravatar(60)}') + a(href='/account') [ #{user.progressTimestamps.length} ] + .hidden-xs.hidden-sm + if user.profile.picture + if (user.profile.username) + a(href='/' + user.profile.username) + img.profile-picture.float-right(src='#{user.profile.picture}') + else + a(href='/account') + img.profile-picture.float-right(src='#{user.profile.picture}') else - a(href='/account') - img.profile-picture.float-right(src='#{user.gravatar(60)}') + if (user.profile.username) + a(href='/' + user.profile.username) + img.profile-picture.float-right(src='#{user.gravatar(60)}') + else + a(href='/account') + img.profile-picture.float-right(src='#{user.gravatar(60)}')