From 7edd9ef2ee6780382c31e9c1cbc8e22c864747d7 Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Thu, 6 Nov 2014 23:29:42 -0800 Subject: [PATCH] strike through conditionally for completed exercises --- views/partials/challenges.jade | 83 +++++++++++++++++----------------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/views/partials/challenges.jade b/views/partials/challenges.jade index b10632eea6c..a65549a46f6 100644 --- a/views/partials/challenges.jade +++ b/views/partials/challenges.jade @@ -1,87 +1,86 @@ .panel.panel-primary .panel-heading Challenges .panel-body - = cc ol(start='0') li - a(href="/challenges/0", class="#{ cc === 3 ? 'strikethrough' : '' }") A One-minute Introduction to Free Code Camp + a(href="/challenges/0", class="#{ cc.indexOf(0) > -1 ? 'strikethrough' : '' }") A One-minute Introduction to Free Code Camp li - a(href="/challenges/1") Enter the Free Code Camp Chat Room + a(href="/challenges/1", class="#{ cc.indexOf(1) > -1 ? 'strikethrough' : '' }") Enter the Free Code Camp Chat Room li - a(href="/challenges/2") Create a Website and Deploy it to the Internet + a(href="/challenges/2", class="#{ cc.indexOf(2) > -1 ? 'strikethrough' : '' }") Create a Website and Deploy it to the Internet li - a(href="/challenges/3") Install Github's Atom Text Editor + a(href="/challenges/3", class="#{ cc.indexOf(3) > -1 ? 'strikethrough' : '' }") Install Github's Atom Text Editor li - a(href="/challenges/4") Modify and Redeploy Your Website + a(href="/challenges/4", class="#{ cc.indexOf(4) > -1 ? 'strikethrough' : '' }") Modify and Redeploy Your Website li - a(href="/challenges/5") Start Your First Pair Programming Session + a(href="/challenges/5", class="#{ cc.indexOf(5) > -1 ? 'strikethrough' : '' }") Start Your First Pair Programming Session li - a(href="/challenges/6") Add Dynamic Content to your Website + a(href="/challenges/6", class="#{ cc.indexOf(6) > -1 ? 'strikethrough' : '' }") Add Dynamic Content to your Website li - a(href="/challenges/7") Codecademy's HTML & CSS track + a(href="/challenges/7", class="#{ cc.indexOf(7) > -1 ? 'strikethrough' : '' }") Codecademy's HTML & CSS track li - a(href="/challenges/8") Experiment with HTML and CSS in CodePen + a(href="/challenges/8", class="#{ cc.indexOf(8) > -1 ? 'strikethrough' : '' }") Experiment with HTML and CSS in CodePen li - a(href="/challenges/9") Code School's Try jQuery + a(href="/challenges/9", class="#{ cc.indexOf(9) > -1 ? 'strikethrough' : '' }") Code School's Try jQuery li - a(href="/challenges/10") jQuery Exercises + a(href="/challenges/10", class="#{ cc.indexOf(10) > -1 ? 'strikethrough' : '' }") jQuery Exercises li - a(href="/challenges/11") Code School's Discover DevTools + a(href="/challenges/11", class="#{ cc.indexOf(11) > -1 ? 'strikethrough' : '' }") Code School's Discover DevTools li - a(href="/challenges/12") Customize Bootstrap with Bootswatch + a(href="/challenges/12", class="#{ cc.indexOf(12) > -1 ? 'strikethrough' : '' }") Customize Bootstrap with Bootswatch li - a(href="/challenges/13") Inject Life with CSS Transformations + a(href="/challenges/13", class="#{ cc.indexOf(13) > -1 ? 'strikethrough' : '' }") Inject Life with CSS Transformations li - a(href="/challenges/14") Codecademy's JavaScript track + a(href="/challenges/14", class="#{ cc.indexOf(14) > -1 ? 'strikethrough' : '' }") Codecademy's JavaScript track li - a.disabled(href="/challenges/15") Get Help The Hacker Way with RSAP + a.disabled(href="/challenges/15", class="#{ cc.indexOf(15) > -1 ? 'strikethrough' : '' }") Get Help The Hacker Way with RSAP li - a.disabled(href="/challenges/16") Easy Algorithm Scripting Challenges on Coderbyte + a.disabled(href="/challenges/16", class="#{ cc.indexOf(16) > -1 ? 'strikethrough' : '' }") Easy Algorithm Scripting Challenges on Coderbyte li - a.disabled(href="/challenges/17") Harvard's CS50: Introduction to Computer Science + a.disabled(href="/challenges/17", class="#{ cc.indexOf(17) > -1 ? 'strikethrough' : '' }") Harvard's CS50: Introduction to Computer Science li - a.disabled(href="/challenges/18") Medium Algorithm Scripting Challenges on Coderbyte + a.disabled(href="/challenges/18", class="#{ cc.indexOf(18) > -1 ? 'strikethrough' : '' }") Medium Algorithm Scripting Challenges on Coderbyte li - a.disabled(href="/challenges/19") Stanford's Relational Databases Mini-course + a.disabled(href="/challenges/19", class="#{ cc.indexOf(19) > -1 ? 'strikethrough' : '' }") Stanford's Relational Databases Mini-course li - a.disabled(href="/challenges/20") Stanford's JSON Mini-course + a.disabled(href="/challenges/20", class="#{ cc.indexOf(20) > -1 ? 'strikethrough' : '' }") Stanford's JSON Mini-course li - a.disabled(href="/challenges/21") Build a Text-based Adventure + a.disabled(href="/challenges/21", class="#{ cc.indexOf(21) > -1 ? 'strikethrough' : '' }") Build a Text-based Adventure li - a.disabled(href="/challenges/22") Hard Algorithm Scripting Challenges on Coderbyte + a.disabled(href="/challenges/22", class="#{ cc.indexOf(22) > -1 ? 'strikethrough' : '' }") Hard Algorithm Scripting Challenges on Coderbyte li - a.disabled(href="/challenges/23") Stanford's SQL Mini-course + a.disabled(href="/challenges/23", class="#{ cc.indexOf(23) > -1 ? 'strikethrough' : '' }") Stanford's SQL Mini-course li - a.disabled(href="/challenges/24") Build an Interview Question Machine + a.disabled(href="/challenges/24", class="#{ cc.indexOf(24) > -1 ? 'strikethrough' : '' }") Build an Interview Question Machine li - a.disabled(href="/challenges/25") Code School's Try Git + a.disabled(href="/challenges/25", class="#{ cc.indexOf(25) > -1 ? 'strikethrough' : '' }") Code School's Try Git li - a.disabled(href="/challenges/26") Install Node.js + a.disabled(href="/challenges/26", class="#{ cc.indexOf(26) > -1 ? 'strikethrough' : '' }") Install Node.js li - a.disabled(href="/challenges/27") Clone a Github Repo + a.disabled(href="/challenges/27", class="#{ cc.indexOf(27) > -1 ? 'strikethrough' : '' }") Clone a Github Repo li - a.disabled(href="/challenges/28") Deploy an app to Heroku + a.disabled(href="/challenges/28", class="#{ cc.indexOf(28) > -1 ? 'strikethrough' : '' }") Deploy an app to Heroku li - a.disabled(href="/challenges/29") Code School's Real-time web with Node.JS + a.disabled(href="/challenges/29", class="#{ cc.indexOf(29) > -1 ? 'strikethrough' : '' }") Code School's Real-time web with Node.JS li - a.disabled(href="/challenges/30") Try MongoDB + a.disabled(href="/challenges/30", class="#{ cc.indexOf(30) > -1 ? 'strikethrough' : '' }") Try MongoDB li - a.disabled(href="/challenges/31") Explore your Network with the LinkedIn API + a.disabled(href="/challenges/31", class="#{ cc.indexOf(31) > -1 ? 'strikethrough' : '' }") Explore your Network with the LinkedIn API li - a.disabled(href="/challenges/32") Build your first API + a.disabled(href="/challenges/32", class="#{ cc.indexOf(32) > -1 ? 'strikethrough' : '' }") Build your first API li - a.disabled(href="/challenges/33") Aggregate Data with Chron Jobs and Screen Scraping + a.disabled(href="/challenges/33", class="#{ cc.indexOf(33) > -1 ? 'strikethrough' : '' }") Aggregate Data with Chron Jobs and Screen Scraping li - a.disabled(href="/challenges/34") Code School's Shaping up with Angular.JS + a.disabled(href="/challenges/34", class="#{ cc.indexOf(34) > -1 ? 'strikethrough' : '' }") Code School's Shaping up with Angular.JS li - a.disabled(href="/challenges/35") Reverse Engineer SnapChat + a.disabled(href="/challenges/35", class="#{ cc.indexOf(35) > -1 ? 'strikethrough' : '' }") Reverse Engineer SnapChat li - a.disabled(href="/challenges/36") Reverse Engineer Reddit + a.disabled(href="/challenges/36", class="#{ cc.indexOf(36) > -1 ? 'strikethrough' : '' }") Reverse Engineer Reddit li - a.disabled(href="/challenges/37") Reverse Engineer Pintrest + a.disabled(href="/challenges/37", class="#{ cc.indexOf(37) > -1 ? 'strikethrough' : '' }") Reverse Engineer Pintrest li - a.disabled(href="/challenges/38") Help a Nonprofit: Team Project + a.disabled(href="/challenges/38", class="#{ cc.indexOf(38) > -1 ? 'strikethrough' : '' }") Help a Nonprofit: Team Project li - a.disabled(href="/challenges/39") Help a Nonprofit: Solo Project + a.disabled(href="/challenges/39", class="#{ cc.indexOf(39) > -1 ? 'strikethrough' : '' }") Help a Nonprofit: Solo Project li - a.disabled(href="/challenges/40") Crack the Coding Interview \ No newline at end of file + a.disabled(href="/challenges/40", class="#{ cc.indexOf(40) > -1 ? 'strikethrough' : '' }") Crack the Coding Interview \ No newline at end of file