From 049e2d0a8e071899ab52104b4227d4a5f0943ace Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Mon, 29 Dec 2014 22:40:27 -0800 Subject: [PATCH 1/9] start working on redoing navbar and mobile footer --- public/css/main.less | 31 +++++-------- views/account/profile.jade | 7 ++- views/layout.jade | 5 ++- views/partials/footer.jade | 21 +++++++++ views/partials/navbar.jade | 91 ++++++++++++++------------------------ 5 files changed, 75 insertions(+), 80 deletions(-) diff --git a/public/css/main.less b/public/css/main.less index a24bef9717..514c851394 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -54,15 +54,6 @@ h1, h2, h3, h4, h5, h6, p, li { padding-bottom: 5px; } -// Navbar -// ------------------------- - -.navbar-nav img { - width: 30px; - height: 30px; - margin: -15px 15px -15px; -} - // Alerts // ------------------------- @@ -95,11 +86,6 @@ h1, h2, h3, h4, h5, h6, p, li { height: 100px; } -.navbar-icon { - height: 40px; - margin-top: -10px; -} - /**/ .btn-cta { @@ -354,12 +340,6 @@ thead { font-size: 150%; } -.hamburger { - background-color: #ddd; - text-align: left; - font-size: 20px; -} - .nowrap { white-space: nowrap; } @@ -367,4 +347,15 @@ thead { .big-break { margin-top: 30px; margin-bottom: 30px; +} + +.profile-picture { + height: 50px; + width: 50px; +} + +.navbar-nav a { + color: #ddd; + font-size: 20px; + margin-top: -5px; } \ No newline at end of file diff --git a/views/account/profile.jade b/views/account/profile.jade index d3f92678d2..8feb21e437 100644 --- a/views/account/profile.jade +++ b/views/account/profile.jade @@ -33,8 +33,13 @@ block content span.ion-edit | Update my profile .panel + .big-break .container.text-center - a.btn.btn-cta.signup-btn.big-break(href='/') Take me to my current challenge + a.btn.btn-cta.signup-btn(href='/') Take me to my current challenge + .big-break + .container.text-center + a.btn.btn-default.btn-big(href='/logout') Sign out + .big-break - if (!user.google || !user.facebook || !user.github || !user.linkedin || !user.twitter) .panel diff --git a/views/layout.jade b/views/layout.jade index eeb151f5eb..19aa6b5d82 100644 --- a/views/layout.jade +++ b/views/layout.jade @@ -18,7 +18,8 @@ html include partials/flash block content - != js('application') + include partials/footer + != js('application') script. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), @@ -27,4 +28,4 @@ script. ga('create', 'UA-55446531-1', 'auto'); ga('require', 'displayfeatures'); ga('send', 'pageview'); -script(src="//cdn.optimizely.com/js/999692993.js") +script(src="//cdn.optimizely.com/js/999692993.js") \ No newline at end of file diff --git a/views/partials/footer.jade b/views/partials/footer.jade index e69de29bb2..5d69bec195 100644 --- a/views/partials/footer.jade +++ b/views/partials/footer.jade @@ -0,0 +1,21 @@ +.visible-xs.visible-sm + nav.navbar.navbar-bottom.nav.navbar-nav + ul.text-center + li + a(href='/') Challenges + - if (cc && cc[1] < 1) + li + a(href='/challenges/1') Chat + - else + li + a(href='http://chat.freecodecamp.com') Chat + - if (cc && cc[2] < 1) + li + a(href='/challenges/2') Forum + - else + li + a(href='http://forum.freecodecamp.com') Forum + li + a(href='/learn-to-code') Buzz + li + a(href='/account') Account \ No newline at end of file diff --git a/views/partials/navbar.jade b/views/partials/navbar.jade index 699744b4b5..8f0f6cd30f 100644 --- a/views/partials/navbar.jade +++ b/views/partials/navbar.jade @@ -1,57 +1,34 @@ -.navbar.navbar-default.navbar-fixed-top.nav-height - .container - .navbar-header - if user - button.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse') - 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') - .collapse.navbar-collapse - ul.nav.navbar-nav.navbar-right - if !user - a.btn.signup-btn.btn-nav.btn-sm(href='/login') Sign in - else - li.dropdown(class=title=='Account Management'?'active':undefined) - a.dropdown-toggle.text-center(href='#', data-toggle='dropdown') - if user.profile.picture - img(src='#{user.profile.picture}') - else - img(src='#{user.gravatar(60)}') - | #{user.profile.name || user.email || user.id} [ #{user.points} ] - i.caret - ul.dropdown-menu.text-right - li.hamburger - a(href='/') - span.ion-map - | My Challenges - - if (cc && cc[1] < 1) - li.hamburger.disabled - a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp', target='_blank') - span.ion-coffee - | Chat Room (do Challenge 1 first) - - else - li.hamburger - a(href='https://gitter.im/FreeCodeCamp/FreeCodeCamp', target='_blank') - span.ion-coffee - | Chat Room - - if (cc && cc[2] < 1) - li.hamburger.disabled - a(href='http://forum.freecodecamp.com/', target='_blank') - span.ion-planet - | Forum (do Challenge 2 first) - - else - li.hamburger - a(href='http://forum.freecodecamp.com/', target='_blank') - span.ion-planet - | Forum - li.hamburger - a(href='/account') - span.ion-person - | My Account - li.hamburger - a(href='/logout') - span.ion-log-out - | Logout \ No newline at end of file +nav.navbar.navbar-fixed-top + .container + .navbar-header + a.navbar-brand(href='/') + img.img-responsive.nav-logo(src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg') + #navbar + ul.nav.navbar-nav.navbar-right.visible-md.visible-lg + li + a(href='/') Challenges + - if (cc && cc[1] < 1) + li + a(href='/challenges/1') Chat + - else + li + a(href='http://chat.freecodecamp.com') Chat + - if (cc && cc[2] < 1) + li + a(href='/challenges/2') Forum + - else + li + a(href='http://forum.freecodecamp.com') Forum + li + a(href='/learn-to-code') Buzz + li + a(href='/account') Account + if !user + a.btn.signup-btn.btn-nav.btn-sm(href='/login') Sign in + else + if user.profile.picture + img.profile-picture.float-right(src='#{user.profile.picture}') + | [ #{user.points} ] + else + img.profile-picture.float-right(src='#{user.gravatar(60)}') + | [ #{user.points} ] From cb7ff19564c8cab6411965bfcfc16454742d6b1d Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Tue, 30 Dec 2014 10:45:19 -0800 Subject: [PATCH 2/9] navbar looks right at full width --- public/css/main.less | 19 ++++++++++--------- views/layout.jade | 2 -- views/partials/footer.jade | 38 ++++++++++++++++++++------------------ views/partials/navbar.jade | 15 ++++++++------- 4 files changed, 38 insertions(+), 36 deletions(-) diff --git a/public/css/main.less b/public/css/main.less index 514c851394..ef2cd8de74 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -33,12 +33,13 @@ body { margin-bottom: 75px; } -footer { - position: absolute; - bottom: 0; +.footer { width: 100%; - height: 45px; - line-height: 45px; + margin-bottom: 0px; + text-align: center; + padding:0px; + height: 200px; + background-color: #4a2b0f; } h1, h2 { @@ -255,10 +256,10 @@ ul { background-color: #4a2b0f; } -.navbar-default .navbar-nav > li > a { - color: #fff; +.navbar-nav > li > a { + color: #eee; &:hover { - color: #ddd; + color: #4a2b0f; } } @@ -355,7 +356,7 @@ thead { } .navbar-nav a { - color: #ddd; + color: #eee; font-size: 20px; margin-top: -5px; } \ No newline at end of file diff --git a/views/layout.jade b/views/layout.jade index 19aa6b5d82..38d29b19fd 100644 --- a/views/layout.jade +++ b/views/layout.jade @@ -17,8 +17,6 @@ html .container include partials/flash block content - - include partials/footer != js('application') script. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ diff --git a/views/partials/footer.jade b/views/partials/footer.jade index 5d69bec195..99193726ad 100644 --- a/views/partials/footer.jade +++ b/views/partials/footer.jade @@ -1,21 +1,23 @@ -.visible-xs.visible-sm - nav.navbar.navbar-bottom.nav.navbar-nav - ul.text-center +.footer.nav.navbar.navbar-nav.visible-xs.visible-sm + ul + li + a(href='/') Challenges + - if (cc && cc[1] < 1) li - a(href='/') Challenges - - if (cc && cc[1] < 1) - li - a(href='/challenges/1') Chat - - else - li - a(href='http://chat.freecodecamp.com') Chat - - if (cc && cc[2] < 1) - li - a(href='/challenges/2') Forum - - else - li - a(href='http://forum.freecodecamp.com') Forum + a(href='/challenges/1') Chat + - else li - a(href='/learn-to-code') Buzz + a(href='http://chat.freecodecamp.com') Chat + - if (cc && cc[2] < 1) li - a(href='/account') Account \ No newline at end of file + a(href='/challenges/2') Forum + - else + li + a(href='http://forum.freecodecamp.com') Forum + li + a(href='/learn-to-code') About + if user + li + a(href='/profile') [ #{user.points} ] + if !user + a.btn.signup-btn.btn-nav.btn-sm(href='/login') Sign in \ No newline at end of file diff --git a/views/partials/navbar.jade b/views/partials/navbar.jade index 8f0f6cd30f..74b5e2d97b 100644 --- a/views/partials/navbar.jade +++ b/views/partials/navbar.jade @@ -20,15 +20,16 @@ nav.navbar.navbar-fixed-top li a(href='http://forum.freecodecamp.com') Forum li - a(href='/learn-to-code') Buzz - li - a(href='/account') Account + a(href='/learn-to-code') About + if user + li + a(href='/profile') [ #{user.points} ] if !user a.btn.signup-btn.btn-nav.btn-sm(href='/login') Sign in else if user.profile.picture - img.profile-picture.float-right(src='#{user.profile.picture}') - | [ #{user.points} ] + a(href='/profile') + img.profile-picture.float-right(src='#{user.profile.picture}') else - img.profile-picture.float-right(src='#{user.gravatar(60)}') - | [ #{user.points} ] + a(href='/profile') + img.profile-picture.float-right(src='#{user.gravatar(60)}') \ No newline at end of file From c8d2be67c7b4f0547c8779786c0ea6c3e27d9840 Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Tue, 30 Dec 2014 11:40:37 -0800 Subject: [PATCH 3/9] navbar looks right and hamburger works --- public/css/lib/bootstrap/navbar.less | 1 + public/css/lib/bootstrap/variables.less | 8 +-- public/css/main.less | 3 ++ views/partials/navbar.jade | 72 ++++++++++++++----------- 4 files changed, 48 insertions(+), 36 deletions(-) diff --git a/public/css/lib/bootstrap/navbar.less b/public/css/lib/bootstrap/navbar.less index 30a79d4a43..7a0753c175 100755 --- a/public/css/lib/bootstrap/navbar.less +++ b/public/css/lib/bootstrap/navbar.less @@ -214,6 +214,7 @@ width: 22px; height: 2px; border-radius: 1px; + background-color: #eeeeee !important; } .icon-bar + .icon-bar { margin-top: 4px; diff --git a/public/css/lib/bootstrap/variables.less b/public/css/lib/bootstrap/variables.less index 652b6a7afe..e6d916a76a 100755 --- a/public/css/lib/bootstrap/variables.less +++ b/public/css/lib/bootstrap/variables.less @@ -359,10 +359,10 @@ @navbar-default-border: darken(@navbar-default-bg, 6.5%); // Navbar links -@navbar-default-link-color: #777; -@navbar-default-link-hover-color: #333; -@navbar-default-link-hover-bg: transparent; -@navbar-default-link-active-color: #555; +@navbar-default-link-color: #eee; +@navbar-default-link-hover-color: #4a2b0f; +@navbar-default-link-hover-bg: #eee; +@navbar-default-link-active-color: #eee; @navbar-default-link-active-bg: darken(@navbar-default-bg, 6.5%); @navbar-default-link-disabled-color: #ccc; @navbar-default-link-disabled-bg: transparent; diff --git a/public/css/main.less b/public/css/main.less index ef2cd8de74..9032e526f3 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -359,4 +359,7 @@ thead { color: #eee; font-size: 20px; margin-top: -5px; +} +.navbar-toggle { + color: #eee; } \ No newline at end of file diff --git a/views/partials/navbar.jade b/views/partials/navbar.jade index 74b5e2d97b..e8ca00f27d 100644 --- a/views/partials/navbar.jade +++ b/views/partials/navbar.jade @@ -1,35 +1,43 @@ -nav.navbar.navbar-fixed-top - .container - .navbar-header - a.navbar-brand(href='/') - img.img-responsive.nav-logo(src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg') - #navbar - ul.nav.navbar-nav.navbar-right.visible-md.visible-lg +nav.navbar.navbar-default.navbar-fixed-top.nav-height + .container + .navbar-header + if user + button.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse') + 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') + .collapse.navbar-collapse + ul.nav.navbar-nav.navbar-right + if !user + a.btn.btn-primary.btn-nav.btn-sm(href='/login') Sign in + li + a(href='/') Challenges + - if (cc && cc[1] < 1) li - a(href='/') Challenges - - if (cc && cc[1] < 1) - li - a(href='/challenges/1') Chat - - else - li - a(href='http://chat.freecodecamp.com') Chat - - if (cc && cc[2] < 1) - li - a(href='/challenges/2') Forum - - else - li - a(href='http://forum.freecodecamp.com') Forum + a(href='/challenges/1') Chat + - else li - a(href='/learn-to-code') About - if user - li - a(href='/profile') [ #{user.points} ] - if !user - a.btn.signup-btn.btn-nav.btn-sm(href='/login') Sign in + a(href='http://chat.freecodecamp.com') Chat + - if (cc && cc[2] < 1) + li + a(href='/challenges/2') Forum + - else + li + a(href='http://forum.freecodecamp.com') Forum + li + a(href='/learn-to-code') About + if user + li + a(href='/profile') [ #{user.points} ] + if !user + a.btn.signup-btn.btn-nav.btn-sm(href='/login') Sign in + else + if user.profile.picture + a(href='/profile') + img.profile-picture.float-right(src='#{user.profile.picture}') else - if user.profile.picture - a(href='/profile') - img.profile-picture.float-right(src='#{user.profile.picture}') - else - a(href='/profile') - img.profile-picture.float-right(src='#{user.gravatar(60)}') \ No newline at end of file + a(href='/profile') + img.profile-picture.float-right(src='#{user.gravatar(60)}') \ No newline at end of file From 4ede5662b9bae00cce55dda0b8abbffe2da571aa Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Tue, 30 Dec 2014 12:38:45 -0800 Subject: [PATCH 4/9] got navbar button looking right --- public/css/main.less | 21 ++++++++++++++------- views/partials/navbar.jade | 23 +++++++++++------------ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/public/css/main.less b/public/css/main.less index 9032e526f3..b4959a4aad 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -225,7 +225,6 @@ ul { } .navbar { - height: 40px; white-space: nowrap; } @@ -237,10 +236,6 @@ ul { text-decoration: line-through; } -.dropdown-toggle { - margin-top: -5px; -} - .btn-social { width: 250px; margin: auto; @@ -282,7 +277,7 @@ ul { background-image: linear-gradient(#ffcc4d, #ffac33); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffcc4d, endColorstr=#ffac33, GradientType=0)"; border-color: #f1a02a; - color: #292f33; + color: #292f33 !important; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); } .signup-btn:hover, .signup-btn:focus { @@ -290,7 +285,7 @@ ul { background-image: linear-gradient(#ffcc4d, #e99110); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffcc4d, endColorstr=#e99110, GradientType=0)"; border-color: #ec8b11; - color: #292f33; + color: #292f33 !important; } .signup-btn:active { background-color: #f2a330; @@ -359,7 +354,19 @@ thead { color: #eee; font-size: 20px; margin-top: -5px; + margin-bottom: -5px; } .navbar-toggle { color: #eee; +} + +.navbar-right { + background-color: #4a2b0f; + text-align: center; +} + +.signup-btn-nav { + margin-top:-2px !important; + padding-top: 10px !important; + padding-bottom: 10px !important; } \ No newline at end of file diff --git a/views/partials/navbar.jade b/views/partials/navbar.jade index e8ca00f27d..8e1bfc9f8e 100644 --- a/views/partials/navbar.jade +++ b/views/partials/navbar.jade @@ -11,8 +11,6 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height img.img-responsive.nav-logo(src='https://s3.amazonaws.com/freecodecamp/freecodecamp_logo.svg') .collapse.navbar-collapse ul.nav.navbar-nav.navbar-right - if !user - a.btn.btn-primary.btn-nav.btn-sm(href='/login') Sign in li a(href='/') Challenges - if (cc && cc[1] < 1) @@ -29,15 +27,16 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height a(href='http://forum.freecodecamp.com') Forum li a(href='/learn-to-code') About - if user - li - a(href='/profile') [ #{user.points} ] if !user - a.btn.signup-btn.btn-nav.btn-sm(href='/login') Sign in + li + a.btn.signup-btn.signup-btn-nav(href='/login') Sign in else - if user.profile.picture - a(href='/profile') - img.profile-picture.float-right(src='#{user.profile.picture}') - else - a(href='/profile') - img.profile-picture.float-right(src='#{user.gravatar(60)}') \ No newline at end of file + li + a(href='/account') [ #{user.points} ] + .visible-md.visible-sm + if user.profile.picture + 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)}') \ No newline at end of file From dc9296146e6494209b8cfbb38d595ef441ceff60 Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Tue, 30 Dec 2014 13:15:22 -0800 Subject: [PATCH 5/9] navbar is fully responsive and does not wrap --- public/css/main.less | 8 ++++++++ views/partials/navbar.jade | 11 +++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/public/css/main.less b/public/css/main.less index b4959a4aad..c760c29b67 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -224,6 +224,14 @@ ul { } } +.navbar-right { + @media (max-width: 991px) and (min-width: 767px) { + position: absolute; + right:0; + margin-right: 10px; + white-space: nowrap; + } +} .navbar { white-space: nowrap; } diff --git a/views/partials/navbar.jade b/views/partials/navbar.jade index 8e1bfc9f8e..d60a422601 100644 --- a/views/partials/navbar.jade +++ b/views/partials/navbar.jade @@ -1,12 +1,11 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height .container .navbar-header - if user - button.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse') - span.sr-only Toggle navigation - span.icon-bar - span.icon-bar - span.icon-bar + button.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse') + 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') .collapse.navbar-collapse From ca75b1323cd65691f1adbcc65ce2f7fd62e46755 Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Tue, 30 Dec 2014 14:54:19 -0800 Subject: [PATCH 6/9] Fix navbar logic and remove redundant footer links --- views/challenges/show.jade | 9 --------- views/partials/navbar.jade | 10 +++++----- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/views/challenges/show.jade b/views/challenges/show.jade index 13251ef9c3..6afb19d44e 100644 --- a/views/challenges/show.jade +++ b/views/challenges/show.jade @@ -15,15 +15,6 @@ block content .btn.btn-primary.btn-big.btn-block.completed-challenge I've completed this challenge .ten-pixel-break .btn.btn-success.btn-large.btn-block.skip-challenge I want to skip this challenge for now - - if (points && points > 2 || !cc) - .panel-footer.text-center - span Need a break? Check out our:  - a(href="https://gitter.im/FreeCodeCamp/FreeCodeCamp", target="_blank") Chat Room - |  ,  - a(href="http://blog.freecodecamp.com", target="_blank") Blog - |  , or  - a(href="http://forum.freecodecamp.com", target="_blank") Forum - | . #complete-dialog.modal .modal-dialog.animated.zoomIn.fast-animation .modal-content diff --git a/views/partials/navbar.jade b/views/partials/navbar.jade index d60a422601..b2e178d505 100644 --- a/views/partials/navbar.jade +++ b/views/partials/navbar.jade @@ -12,20 +12,20 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height ul.nav.navbar-nav.navbar-right li a(href='/') Challenges - - if (cc && cc[1] < 1) + - if (!cc || (cc && cc[1]) < 1) li a(href='/challenges/1') Chat - else li - a(href='http://chat.freecodecamp.com') Chat - - if (cc && cc[2] < 1) + a(href='http://chat.freecodecamp.com' target='_blank') Chat + - if (!cc || (cc && cc[2]) < 1) li a(href='/challenges/2') Forum - else li - a(href='http://forum.freecodecamp.com') Forum + a(href='http://forum.freecodecamp.com' target='_blank') Forum li - a(href='/learn-to-code') About + a(href='/about') About if !user li a.btn.signup-btn.signup-btn-nav(href='/login') Sign in From 8a9905becf81b004d9f5bc74a4e0f25e2ee2efa2 Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Tue, 30 Dec 2014 16:26:25 -0800 Subject: [PATCH 7/9] this works, but does not work until I restart the server for some reason --- controllers/user.js | 4 ++-- views/account/profile.jade | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/controllers/user.js b/controllers/user.js index a21f414527..db9791d7a3 100644 --- a/controllers/user.js +++ b/controllers/user.js @@ -141,8 +141,8 @@ exports.getAccount = function(req, res) { } res.render('account/profile', { title: 'Manage your Free Code Camp Account', - cc: c, - ch: req.user.challengesHash, + c: c, + cc: req.user.challengesHash, moment: moment }); }); diff --git a/views/account/profile.jade b/views/account/profile.jade index 8feb21e437..d1f93bafb1 100644 --- a/views/account/profile.jade +++ b/views/account/profile.jade @@ -71,7 +71,7 @@ block content i.fa.fa-twitter | Link Twitter with your account br - - if (ch[0] > 0) + - if (cc[0] > 0) .panel .container h1 Completed Challenges @@ -81,11 +81,11 @@ block content tr th Challenge th Date Finished - for challenge in cc - if ch[challenge.challengeNumber] > 0 + for challenge in c + if cc[challenge.challengeNumber] > 0 tr - td= cc[challenge.challengeNumber].name - td= moment(ch[challenge.challengeNumber], 'X').format("MMM DD, YYYY") + td= c[challenge.challengeNumber].name + td= moment(cc[challenge.challengeNumber], 'X').format("MMM DD, YYYY") br .panel .container From d70bea506a676fd2b43d713a01096ec406261fa9 Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Tue, 30 Dec 2014 20:26:12 -0800 Subject: [PATCH 8/9] update the navigation to have publicly available menu items --- controllers/user.js | 1 + public/css/main.less | 3 +++ views/home.jade | 2 +- views/partials/navbar.jade | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/controllers/user.js b/controllers/user.js index db9791d7a3..847f61c9f1 100644 --- a/controllers/user.js +++ b/controllers/user.js @@ -142,6 +142,7 @@ exports.getAccount = function(req, res) { res.render('account/profile', { title: 'Manage your Free Code Camp Account', c: c, + u: req.user, cc: req.user.challengesHash, moment: moment }); diff --git a/public/css/main.less b/public/css/main.less index c760c29b67..8e3fda9af9 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -225,6 +225,9 @@ ul { } .navbar-right { + @media (min-width: 767px) { + padding-right: 50px; + } @media (max-width: 991px) and (min-width: 767px) { position: absolute; right:0; diff --git a/views/home.jade b/views/home.jade index 8db1458d54..c0ed242ddd 100644 --- a/views/home.jade +++ b/views/home.jade @@ -3,7 +3,7 @@ block content .hidden-xs a(href='https://github.com/freecodecamp/freecodecamp') img(style='position: absolute; top: 40; right: 0; border: 0; margin-top: -10px;', src='https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67', alt='Fork me on GitHub', data-canonical-src='https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png') - .jumbotron.negative-15 + .jumbotron .text-center h1.hug-top Code with Us h2 Let's learn to code by building projects for nonprofits diff --git a/views/partials/navbar.jade b/views/partials/navbar.jade index b2e178d505..4b25791991 100644 --- a/views/partials/navbar.jade +++ b/views/partials/navbar.jade @@ -32,7 +32,7 @@ nav.navbar.navbar-default.navbar-fixed-top.nav-height else li a(href='/account') [ #{user.points} ] - .visible-md.visible-sm + .hidden-xs if user.profile.picture a(href='/account') img.profile-picture.float-right(src='#{user.profile.picture}') From 8fd648b1754f2ab6c7c6c3e7a15023502189dc44 Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Tue, 30 Dec 2014 20:44:35 -0800 Subject: [PATCH 9/9] remove unnecessary variable declaration --- controllers/user.js | 1 - 1 file changed, 1 deletion(-) diff --git a/controllers/user.js b/controllers/user.js index 847f61c9f1..db9791d7a3 100644 --- a/controllers/user.js +++ b/controllers/user.js @@ -142,7 +142,6 @@ exports.getAccount = function(req, res) { res.render('account/profile', { title: 'Manage your Free Code Camp Account', c: c, - u: req.user, cc: req.user.challengesHash, moment: moment });