From a9d8992b8817fba2b87cc67fbac56abe4cf63f7c Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Thu, 28 May 2015 16:59:25 -0700 Subject: [PATCH] fix if else syntax in Jade and add cities --- seed_data/field-guides.json | 2 ++ views/account/account.jade | 12 ++++++------ views/account/show.jade | 14 +++++++------- views/coursewares/showBonfire.jade | 6 +++--- views/coursewares/showHTML.jade | 6 +++--- views/coursewares/showJS.jade | 6 +++--- views/coursewares/showZiplineOrBasejump.jade | 2 +- views/partials/challenge-modals.jade | 4 ++-- 8 files changed, 27 insertions(+), 25 deletions(-) diff --git a/seed_data/field-guides.json b/seed_data/field-guides.json index 2d520e480e..0fecdbcc4f 100644 --- a/seed_data/field-guides.json +++ b/seed_data/field-guides.json @@ -296,6 +296,7 @@ "
  • Berkeley
  • ", "
  • Berlin
  • ", "
  • Bhaktapur
  • ", + "
  • Bijeljina
  • ", "
  • Boston
  • ", "
  • Boulder
  • ", "
  • Brussels
  • ", @@ -396,6 +397,7 @@ "
  • Tirana
  • ", "
  • Tulsa
  • ", "
  • Verde Valley
  • ", + "
  • Valencia
  • ", "
  • Washington, DC
  • ", " ", " ", diff --git a/views/account/account.jade b/views/account/account.jade index 3ad7a8d442..1f7495fd50 100644 --- a/views/account/account.jade +++ b/views/account/account.jade @@ -260,28 +260,28 @@ block content .panel.panel-info .panel-heading.text-center Manage your account here: .panel-body - - if (!user.google || !user.facebook || !user.linkedin || !user.twitter) - - if (!user.google) + if (!user.google || !user.facebook || !user.linkedin || !user.twitter) + if (!user.google) .col-xs-12 a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/auth/google') i.fa.fa-google-plus | Link Google with my account - - if (!user.facebook) + if (!user.facebook) .col-xs-12 a.btn.btn-lg.btn-block.btn-facebook.btn-link-social(href='/auth/facebook') i.fa.fa-facebook | Link Facebook with my account - //- if (!user.github) + //if (!user.github) // .col-xs-12 // a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github') // i.fa.fa-github // | Link GitHub with my account - - if (!user.linkedin) + if (!user.linkedin) .col-xs-12 a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social(href='/auth/linkedin') i.fa.fa-linkedin | Link LinkedIn with my account - - if (!user.twitter) + if (!user.twitter) .col-xs-12 a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/auth/twitter') i.fa.fa-twitter diff --git a/views/account/show.jade b/views/account/show.jade index 821aa3aac1..53f95cf724 100644 --- a/views/account/show.jade +++ b/views/account/show.jade @@ -23,15 +23,15 @@ block content else img.img-center.img-responsive.public-profile-img(src='https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png') h1.text-center.negative-5.profile-social-icons - - if (twitterHandle) + if (twitterHandle) a.fa.fa-twitter-square.text-primary(title="@#{username}'s Twitter Profile", href="http://twitter.com/#{twitterHandle}", target='_blank') - - if (githubProfile) + if (githubProfile) a.fa.fa-github-square.text-primary(title="@#{username}'s GitHub Profile", href=githubProfile, target='_blank') - - if (codepenProfile) + if (codepenProfile) a.ion-social-codepen.text-primary(title="@#{username}'s CodePen Profile", href=codepenProfile, target='_blank') - - if (linkedinProfile) + if (linkedinProfile) a.fa.fa-linkedin-square.text-primary(title="@#{username}'s LinkedIn Profile", href=linkedinProfile, target='_blank') - - if (facebookProfile) + if (facebookProfile) a.fa.fa-facebook-square.text-primary(title="@#{username}'s Facebook Profile", href=facebookProfile, target='_blank') .visible-md.visible-lg .col-xs-12.col-sm-12.col-md-4.text-justify @@ -137,7 +137,7 @@ block content h4.col-sm-6.text-left Current Streak: #{currentStreak} - - if (challenges.length > 0) + if (challenges.length > 0) .col-sm-12 table.table.table-striped thead @@ -154,7 +154,7 @@ block content a(href=challenge.solution, target='_blank') View my solution br - - if (bonfires.length > 0) + if (bonfires.length > 0) .col-sm-12 table.table.table-striped thead diff --git a/views/coursewares/showBonfire.jade b/views/coursewares/showBonfire.jade index 471be7dc68..b09968ebe3 100644 --- a/views/coursewares/showBonfire.jade +++ b/views/coursewares/showBonfire.jade @@ -136,16 +136,16 @@ block content .text-center .animated.zoomInDown.delay-half span.completion-icon.ion-checkmark-circled.text-primary - - if (user) + if (user) a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf) Go to my next challenge (ctrl + enter) - - if (user.progressTimestamps.length > 2) + if (user.progressTimestamps.length > 2) a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(target="_blank", href="https://twitter.com/intent/tweet?text=I%20just%20#{verb}%20%40FreeCodeCamp%20#{name}&url=http%3A%2F%2Ffreecodecamp.com/challenges/#{dashedName}&hashtags=LearnToCode, JavaScript") i.fa.fa-twitter   = phrase - - else + else a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress include ../partials/challenge-modals script. diff --git a/views/coursewares/showHTML.jade b/views/coursewares/showHTML.jade index 3d9677811a..c34ae02a61 100644 --- a/views/coursewares/showHTML.jade +++ b/views/coursewares/showHTML.jade @@ -38,7 +38,7 @@ block content span.ion-arrow-up-b | Less information br - - if (user) + if (user) a.btn.btn-primary.btn-big.btn-block#next-courseware-button | Go to my next challenge br @@ -48,14 +48,14 @@ block content .btn-group.input-group.btn-group-justified label.btn.btn-success#trigger-help-modal i.fa.fa-medkit - |   Help(disabled) + |   Help label.btn.btn-success#trigger-issue-modal i.fa.fa-bug |   Bug .button-spacer script. var userLoggedIn = true; - - else + else a.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress script. var userLoggedIn = false; diff --git a/views/coursewares/showJS.jade b/views/coursewares/showJS.jade index 71b74db08d..43d954a2f2 100644 --- a/views/coursewares/showJS.jade +++ b/views/coursewares/showJS.jade @@ -77,12 +77,12 @@ block content .text-center .animated.zoomInDown.delay-half span.completion-icon.ion-checkmark-circled.text-primary - - if (user) + if (user) a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf, ng-disabled='completedWithForm.$invalid && existingUser.length > 0') Go to my next challenge (ctrl + enter) - - if (points && points > 2) + if (points && points > 2) a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(href="https://twitter.com/intent/tweet?text=I%20just%20#{verb}%20%40FreeCodeCamp%20#{name}&url=http%3A%2F%2Ffreecodecamp.com/challenges/#{dashedName}&hashtags=LearnToCode, JavaScript" target="_blank") i.fa.fa-twitter   = phrase - - else + else a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress include ../partials/challenge-modals diff --git a/views/coursewares/showZiplineOrBasejump.jade b/views/coursewares/showZiplineOrBasejump.jade index 75dbcc3b28..ae72c47528 100644 --- a/views/coursewares/showZiplineOrBasejump.jade +++ b/views/coursewares/showZiplineOrBasejump.jade @@ -69,7 +69,7 @@ block content .text-center .animated.zoomInDown.delay-half span.completion-icon.ion-checkmark-circled.text-primary - - if (user) + if (user) form.form-horizontal(novalidate='novalidate', name='completedWithForm') .form-group.text-center .col-xs-10.col-xs-offset-1.col-sm-8.col-sm-offset-2.col-md-8.col-md-offset-2.animated.fadeIn diff --git a/views/partials/challenge-modals.jade b/views/partials/challenge-modals.jade index 2715ed0b98..5270e77cd4 100644 --- a/views/partials/challenge-modals.jade +++ b/views/partials/challenge-modals.jade @@ -30,7 +30,7 @@ a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') × .modal-body.text-center h3 Remember to use   - a('/field-guide/how-do-i-get-help-when-i-get-stuck') RSAP + a(href='/field-guide/how-do-i-get-help-when-i-get-stuck' target='_blank') RSAP | . h3 If you've already read the errors and searched Google, you should ask for help. h3 This will open a help request in our Help chat room. @@ -44,7 +44,7 @@ a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') × .modal-body.text-center h3 Remember to use   - a('/field-guide/how-do-i-get-help-when-i-get-stuck') RSAP + a(href='/field-guide/how-do-i-get-help-when-i-get-stuck' target='_blank') RSAP | . h3 If you've already read the errors and searched Google, you should ask for help. h3 This will open a help request in our Help chat room.