From 3b320c8852021852f667a945482c2a92e392a103 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Wed, 9 Dec 2015 15:39:36 -0600 Subject: [PATCH 1/4] improve look of commit views --- client/less/main.less | 6 +++++- server/views/commit/directory.jade | 7 +------ server/views/commit/index.jade | 8 +++++++- server/views/resources/stories.jade | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/client/less/main.less b/client/less/main.less index 1c11469fc8..c8a33ea006 100644 --- a/client/less/main.less +++ b/client/less/main.less @@ -532,10 +532,14 @@ thead { border-radius: 5px; } -.story-section { +.height-500 { height: 500px; } +.height-300 { + height: 300px; +} + .testimonial-copy { text-align: justify; font-size: 18px !important; diff --git a/server/views/commit/directory.jade b/server/views/commit/directory.jade index 5133e89116..2cf46eeb36 100644 --- a/server/views/commit/directory.jade +++ b/server/views/commit/directory.jade @@ -6,15 +6,10 @@ block content .row .col-xs-12.col-sm-10.col-sm-offset-1 for nonprofit in nonprofits - .col-xs-12.col-sm-6.col-md-4.story-section + .col-xs-12.col-sm-6.col-md-4.height-300 .text-center h2= nonprofit.displayName img.testimonial-image.img-responsive.img-center(src=nonprofit.imgUrl) .button-spacer a.text-center(href='/commit?nonprofit=#{nonprofit.name}') Commit to #{nonprofit.displayName} p= nonprofit.description - .spacer - .col-xs-12 - a.btn.btn-lg.btn-block.btn-primary.btn-link-social(href='mailto:team@freecodecamp.com?subject=Supporting%20Nonprofits') - span.ion-email - | Email us about adding your nonprofit here diff --git a/server/views/commit/index.jade b/server/views/commit/index.jade index 876eb81362..95a1928efe 100644 --- a/server/views/commit/index.jade +++ b/server/views/commit/index.jade @@ -27,9 +27,15 @@ block content label.btn.btn-primary.btn-lg.active input(type='radio' id=frontEndCert value=frontEndCert name='goal' checked="checked") | Front End Development Certification (takes about 400 hours) + label.btn.btn-primary.btn-lg + input(type='radio' id=fullStackCert value=dataVisCert name='goal') + | Data Visualization Certification (takes about 800 hours) + label.btn.btn-primary.btn-lg + input(type='radio' id=fullStackCert value=backEndCert name='goal') + | Back End Development Certification (takes about 1,200 hours) label.btn.btn-primary.btn-lg input(type='radio' id=fullStackCert value=fullStackCert name='goal') - | Full Stack Development Certification (takes about 800 hours) + | Full Stack Development Certification (takes about 2,080 hours) .spacer .row .col-xs-12.col-sm-6.col-sm-offset-3 diff --git a/server/views/resources/stories.jade b/server/views/resources/stories.jade index 37548a054d..794c4badea 100644 --- a/server/views/resources/stories.jade +++ b/server/views/resources/stories.jade @@ -8,7 +8,7 @@ block content .row for story in stories .col-xs-12.col-sm-6.col-md-4 - .story-section + .height-500 a(href=story.linkedin target='_blank') img.testimonial-image.img-responsive.img-center(src=story.image) h3.text-center= story.camper From 1464adc3502ad7aa4a084d237468e7da882bebdc Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 9 Dec 2015 14:19:37 -0800 Subject: [PATCH 2/4] Add new cert goals to backend --- server/boot/commit.js | 5 ++--- server/utils/commit-goals.json | 2 ++ server/views/commit/index.jade | 13 +++++++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/server/boot/commit.js b/server/boot/commit.js index 4ba0f3801e..5e613d65fd 100644 --- a/server/boot/commit.js +++ b/server/boot/commit.js @@ -106,10 +106,9 @@ export default function commit(app) { Object.assign( { title: 'Commit to a nonprofit. Commit to your goal.', - pledge, - frontEndCert: commitGoals.frontEndCert, - fullStackCert: commitGoals.fullStackCert + pledge }, + commitGoals, nonprofit ) ); diff --git a/server/utils/commit-goals.json b/server/utils/commit-goals.json index d9f20e47ff..9c7c69721b 100644 --- a/server/utils/commit-goals.json +++ b/server/utils/commit-goals.json @@ -1,4 +1,6 @@ { "frontEndCert": "Front End Development Certification", + "backEndCert": "Back End Development Certification", + "dataVisCert": "Data Visualisation Certification", "fullStackCert": "Full Stack Development Certification" } diff --git a/server/views/commit/index.jade b/server/views/commit/index.jade index 95a1928efe..44da121405 100644 --- a/server/views/commit/index.jade +++ b/server/views/commit/index.jade @@ -28,10 +28,10 @@ block content input(type='radio' id=frontEndCert value=frontEndCert name='goal' checked="checked") | Front End Development Certification (takes about 400 hours) label.btn.btn-primary.btn-lg - input(type='radio' id=fullStackCert value=dataVisCert name='goal') + input(type='radio' id=dataVisCert value=dataVisCert name='goal') | Data Visualization Certification (takes about 800 hours) label.btn.btn-primary.btn-lg - input(type='radio' id=fullStackCert value=backEndCert name='goal') + input(type='radio' id=backEndCert value=backEndCert name='goal') | Back End Development Certification (takes about 1,200 hours) label.btn.btn-primary.btn-lg input(type='radio' id=fullStackCert value=fullStackCert name='goal') @@ -91,6 +91,15 @@ block content }); $('#commit-btn-submit').click(function() { + + if ( + history && + typeof history.pushState === 'function' + ) { + history.pushState(history.state, null, '/commit/pledge?' + $('form').serialize()); + return null; + } + window.location.href = '/commit/pledge?' + $('form').serialize(); }); }); From 473a77e0a2c5648df0ebe81cb5392433c35865a9 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Thu, 10 Dec 2015 00:01:09 -0600 Subject: [PATCH 3/4] update copy and improve look of commit and its directory --- client/less/main.less | 4 ++-- server/views/commit/directory.jade | 2 +- server/views/commit/index.jade | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/client/less/main.less b/client/less/main.less index c8a33ea006..99de14a19f 100644 --- a/client/less/main.less +++ b/client/less/main.less @@ -536,8 +536,8 @@ thead { height: 500px; } -.height-300 { - height: 300px; +.height-400 { + height: 400px; } .testimonial-copy { diff --git a/server/views/commit/directory.jade b/server/views/commit/directory.jade index 2cf46eeb36..e27ba5f1cd 100644 --- a/server/views/commit/directory.jade +++ b/server/views/commit/directory.jade @@ -6,7 +6,7 @@ block content .row .col-xs-12.col-sm-10.col-sm-offset-1 for nonprofit in nonprofits - .col-xs-12.col-sm-6.col-md-4.height-300 + .col-xs-12.col-sm-6.col-md-4.height-400 .text-center h2= nonprofit.displayName img.testimonial-image.img-responsive.img-center(src=nonprofit.imgUrl) diff --git a/server/views/commit/index.jade b/server/views/commit/index.jade index 95a1928efe..3b2de4d79d 100644 --- a/server/views/commit/index.jade +++ b/server/views/commit/index.jade @@ -22,24 +22,24 @@ block content input(type='text' value='#{name}' name='nonprofit') .row .col-xs-12.col-sm-6.col-sm-offset-3 - h3 Step 1: Choose your goal + h3 Step 1: What's your goal? .btn-group.btn-group-justified(data-toggle='buttons' role='group') label.btn.btn-primary.btn-lg.active input(type='radio' id=frontEndCert value=frontEndCert name='goal' checked="checked") - | Front End Development Certification (takes about 400 hours) + | Front End Cert label.btn.btn-primary.btn-lg input(type='radio' id=fullStackCert value=dataVisCert name='goal') - | Data Visualization Certification (takes about 800 hours) + | Data Viz Cert label.btn.btn-primary.btn-lg input(type='radio' id=fullStackCert value=backEndCert name='goal') - | Back End Development Certification (takes about 1,200 hours) + | Back End Cert label.btn.btn-primary.btn-lg input(type='radio' id=fullStackCert value=fullStackCert name='goal') - | Full Stack Development Certification (takes about 2,080 hours) + | Full Stack Cert .spacer .row .col-xs-12.col-sm-6.col-sm-offset-3 - h3 Step 2: Choose your monthly pledge + h3 Step 2: How much do you want to pledge monthly until you meet that goal? .btn-group.btn-group-justified(data-toggle='buttons' role='group') label.btn.btn-success input(type='radio' id='5-dollar-pledge' value='5' name='amount') From a8a73abea0c72bf49c2b4466c5fd4deffb3fb61b Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Fri, 11 Dec 2015 16:44:14 -0800 Subject: [PATCH 4/4] More changes to commit copy --- server/views/commit/index.jade | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/views/commit/index.jade b/server/views/commit/index.jade index 7d82f7626b..e9a919fd5a 100644 --- a/server/views/commit/index.jade +++ b/server/views/commit/index.jade @@ -22,24 +22,24 @@ block content input(type='text' value='#{name}' name='nonprofit') .row .col-xs-12.col-sm-6.col-sm-offset-3 - h3 Step 1: What's your goal? + h3 Step 1: Which certification do you pledge to complete? .btn-group.btn-group-justified(data-toggle='buttons' role='group') label.btn.btn-primary.btn-lg.active input(type='radio' id=frontEndCert value=frontEndCert name='goal' checked="checked") - | Front End Cert + | Front End label.btn.btn-primary.btn-lg input(type='radio' id=dataVisCert value=dataVisCert name='goal') - | Data Viz Cert + | Data label.btn.btn-primary.btn-lg input(type='radio' id=backEndCert value=backEndCert name='goal') - | Back End Cert + | Back End label.btn.btn-primary.btn-lg input(type='radio' id=fullStackCert value=fullStackCert name='goal') - | Full Stack Cert + | Full Stack .spacer .row .col-xs-12.col-sm-6.col-sm-offset-3 - h3 Step 2: How much do you want to pledge monthly until you meet that goal? + h3 Step 2: How much do you want to pledge monthly until you earn that certification? .btn-group.btn-group-justified(data-toggle='buttons' role='group') label.btn.btn-success input(type='radio' id='5-dollar-pledge' value='5' name='amount')