fix if else syntax in Jade and add cities

This commit is contained in:
Quincy Larson
2015-05-28 16:59:25 -07:00
parent 560e66527b
commit a9d8992b88
8 changed files with 27 additions and 25 deletions

View File

@ -296,6 +296,7 @@
" <li><a href='https://www.facebook.com/groups/free.code.camp.berkeley/' target='_blank'>Berkeley</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.berkeley/' target='_blank'>Berkeley</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.berlin/' target='_blank'>Berlin</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.berlin/' target='_blank'>Berlin</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.bhaktapur/' target='_blank'>Bhaktapur</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.bhaktapur/' target='_blank'>Bhaktapur</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.bijeljina/' target='_blank'>Bijeljina</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.boston/' target='_blank'>Boston</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.boston/' target='_blank'>Boston</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.boulder/' target='_blank'>Boulder</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.boulder/' target='_blank'>Boulder</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.brussels/' target='_blank'>Brussels</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.brussels/' target='_blank'>Brussels</a></li>",
@ -396,6 +397,7 @@
" <li><a href='https://www.facebook.com/groups/free.code.camp.tirana/' target='_blank'>Tirana</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.tirana/' target='_blank'>Tirana</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.tulsa/' target='_blank'>Tulsa</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.tulsa/' target='_blank'>Tulsa</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.northern.arizona/' target='_blank'>Verde Valley</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.northern.arizona/' target='_blank'>Verde Valley</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.vlc/' target='_blank'>Valencia</a></li>",
" <li><a href='https://www.facebook.com/groups/free.code.camp.washington.dc/' target='_blank'>Washington, DC</a></li>", " <li><a href='https://www.facebook.com/groups/free.code.camp.washington.dc/' target='_blank'>Washington, DC</a></li>",
" </ol>", " </ol>",
" </h4>", " </h4>",

View File

@ -260,28 +260,28 @@ block content
.panel.panel-info .panel.panel-info
.panel-heading.text-center Manage your account here: .panel-heading.text-center Manage your account here:
.panel-body .panel-body
- if (!user.google || !user.facebook || !user.linkedin || !user.twitter) if (!user.google || !user.facebook || !user.linkedin || !user.twitter)
- if (!user.google) if (!user.google)
.col-xs-12 .col-xs-12
a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/auth/google') a.btn.btn-lg.btn-block.btn-google-plus.btn-link-social(href='/auth/google')
i.fa.fa-google-plus i.fa.fa-google-plus
| Link Google with my account | Link Google with my account
- if (!user.facebook) if (!user.facebook)
.col-xs-12 .col-xs-12
a.btn.btn-lg.btn-block.btn-facebook.btn-link-social(href='/auth/facebook') a.btn.btn-lg.btn-block.btn-facebook.btn-link-social(href='/auth/facebook')
i.fa.fa-facebook i.fa.fa-facebook
| Link Facebook with my account | Link Facebook with my account
//- if (!user.github) //if (!user.github)
// .col-xs-12 // .col-xs-12
// a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github') // a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
// i.fa.fa-github // i.fa.fa-github
// | Link GitHub with my account // | Link GitHub with my account
- if (!user.linkedin) if (!user.linkedin)
.col-xs-12 .col-xs-12
a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social(href='/auth/linkedin') a.btn.btn-lg.btn-block.btn-linkedin.btn-link-social(href='/auth/linkedin')
i.fa.fa-linkedin i.fa.fa-linkedin
| Link LinkedIn with my account | Link LinkedIn with my account
- if (!user.twitter) if (!user.twitter)
.col-xs-12 .col-xs-12
a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/auth/twitter') a.btn.btn-lg.btn-block.btn-twitter.btn-link-social(href='/auth/twitter')
i.fa.fa-twitter i.fa.fa-twitter

View File

@ -23,15 +23,15 @@ block content
else else
img.img-center.img-responsive.public-profile-img(src='https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png') 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 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') 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') 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') 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') 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') a.fa.fa-facebook-square.text-primary(title="@#{username}'s Facebook Profile", href=facebookProfile, target='_blank')
.visible-md.visible-lg .visible-md.visible-lg
.col-xs-12.col-sm-12.col-md-4.text-justify .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} h4.col-sm-6.text-left Current Streak: #{currentStreak}
- if (challenges.length > 0) if (challenges.length > 0)
.col-sm-12 .col-sm-12
table.table.table-striped table.table.table-striped
thead thead
@ -154,7 +154,7 @@ block content
a(href=challenge.solution, target='_blank') View my solution a(href=challenge.solution, target='_blank') View my solution
br br
- if (bonfires.length > 0) if (bonfires.length > 0)
.col-sm-12 .col-sm-12
table.table.table-striped table.table.table-striped
thead thead

View File

@ -136,16 +136,16 @@ block content
.text-center .text-center
.animated.zoomInDown.delay-half .animated.zoomInDown.delay-half
span.completion-icon.ion-checkmark-circled.text-primary 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) 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") 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 &thinsp; i.fa.fa-twitter &thinsp;
= phrase = phrase
- else else
a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
include ../partials/challenge-modals include ../partials/challenge-modals
script. script.

View File

@ -38,7 +38,7 @@ block content
span.ion-arrow-up-b span.ion-arrow-up-b
| Less information | Less information
br br
- if (user) if (user)
a.btn.btn-primary.btn-big.btn-block#next-courseware-button a.btn.btn-primary.btn-big.btn-block#next-courseware-button
| Go to my next challenge | Go to my next challenge
br br
@ -48,14 +48,14 @@ block content
.btn-group.input-group.btn-group-justified .btn-group.input-group.btn-group-justified
label.btn.btn-success#trigger-help-modal label.btn.btn-success#trigger-help-modal
i.fa.fa-medkit i.fa.fa-medkit
| &nbsp; Help(disabled) | &nbsp; Help
label.btn.btn-success#trigger-issue-modal label.btn.btn-success#trigger-issue-modal
i.fa.fa-bug i.fa.fa-bug
| &nbsp; Bug | &nbsp; Bug
.button-spacer .button-spacer
script. script.
var userLoggedIn = true; var userLoggedIn = true;
- else else
a.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress a.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
script. script.
var userLoggedIn = false; var userLoggedIn = false;

View File

@ -77,12 +77,12 @@ block content
.text-center .text-center
.animated.zoomInDown.delay-half .animated.zoomInDown.delay-half
span.completion-icon.ion-checkmark-circled.text-primary 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) 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") 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 &thinsp; i.fa.fa-twitter &thinsp;
= phrase = phrase
- else else
a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
include ../partials/challenge-modals include ../partials/challenge-modals

View File

@ -69,7 +69,7 @@ block content
.text-center .text-center
.animated.zoomInDown.delay-half .animated.zoomInDown.delay-half
span.completion-icon.ion-checkmark-circled.text-primary span.completion-icon.ion-checkmark-circled.text-primary
- if (user) if (user)
form.form-horizontal(novalidate='novalidate', name='completedWithForm') form.form-horizontal(novalidate='novalidate', name='completedWithForm')
.form-group.text-center .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 .col-xs-10.col-xs-offset-1.col-sm-8.col-sm-offset-2.col-md-8.col-md-offset-2.animated.fadeIn

View File

@ -30,7 +30,7 @@
a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') × a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
.modal-body.text-center .modal-body.text-center
h3 Remember to use &thinsp; h3 Remember to use &thinsp;
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 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. 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') × a.close.closing-x(href='#', data-dismiss='modal', aria-hidden='true') ×
.modal-body.text-center .modal-body.text-center
h3 Remember to use &thinsp; h3 Remember to use &thinsp;
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 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. h3 This will open a help request in our Help chat room.