Merge pull request #423 from QuincyLarson/master

Bonfire display fix and new field-guide
This commit is contained in:
Quincy Larson
2015-05-05 16:42:16 -07:00
2 changed files with 84 additions and 65 deletions

View File

@ -317,6 +317,27 @@
"</div>" "</div>"
] ]
}, },
{
"_id": "bd7158d9c445eddfaeb5bdff",
"name": "How can I deploy a website without writing any code at all?",
"description": [
"<h2 class='text-center'>It's possible to build dynamic, mobile responsive websites without writing any code at all, in just a few minutes.</h2><br/>",
"<div class=\"embed-responsive embed-responsive-16by9\">",
" <iframe src=\"//player.vimeo.com/video/115194017\" class=\"embed-responsive-item\"></iframe>",
"</div>",
"<div class=\"col-xs-12 col-sm-10 col-sm-offset-1 text-left\">",
" <h3>Here are the technologies we used here:",
" <ul>",
" <li><a href='http://www.atom.io/'>atom.io</a> - a free code editor</li>",
" <li><a href='http://www.startbootstrap.com/'>startbootstrap.com</a> - a collection of free responsive (Bootstrap) templates</li>",
" <li><a href='http://www.powr.io/'>powr.io</a> - a collection of free JavaScript plugins</li>",
" <li><a href='http://www.bitballoon.com/'>bitballoon.com</a> - a tool for drag and drop website deployment</li>",
" </ul>",
" </h3>",
"<h3>You will quickly reach the limits of what you can do without actually coding, but it's nice to be able to rapidly build working prototype websites like this.</h3>",
"</div>"
]
},
{ {
"_id": "bd7158d9c446eddfaeb5bdef", "_id": "bd7158d9c446eddfaeb5bdef",
"name": "How do Free Code Camp's Nonprofit Projects work?", "name": "How do Free Code Camp's Nonprofit Projects work?",

View File

@ -99,72 +99,70 @@ block content
i.fa.icon-beaker i.fa.icon-beaker
| Try it out | Try it out
.spacer .spacer
.hidden-xs.hidden-sm.col-md-12 .hidden-xs.hidden-sm.col-md-12
#cal-heatmap.d3-centered #cal-heatmap.d3-centered
script. script.
$(document).ready(function() { $(document).ready(function () {
setTimeout(function() { setTimeout(function () {
var cal = new CalHeatMap(); var cal = new CalHeatMap();
var calendar = !{JSON.stringify(calender)}; var calendar = !{JSON.stringify(calender)};
cal.init({ cal.init({
itemSelector: "#cal-heatmap", itemSelector: "#cal-heatmap",
domain: "month", domain: "month",
subDomain: "x_day", subDomain: "x_day",
domainGutter: 10, domainGutter: 10,
data: calendar, data: calendar,
cellSize: 15, cellSize: 15,
align: 'center', align: 'center',
cellRadius: 3, cellRadius: 3,
cellPadding: 2, cellPadding: 2,
tooltip: true, tooltip: true,
range: 6, range: 6,
start: new Date().setDate(new Date().getDate() - 150), start: new Date().setDate(new Date().getDate() - 150),
legendColors: ["#cccccc", "#215f1e"], legendColors: ["#cccccc", "#215f1e"],
legend: [1, 2, 3], legend: [1, 2, 3],
label: { label: {
position: "top" position: "top"
} }
}); });
}, 300); }, 300);
}); });
.row .row
.hidden-xs.col-sm-12.text-center .hidden-xs.col-sm-12.text-center
.row.text-primary .row.text-primary
h4.col-sm-6.text-right Longest Streak: #{longestStreak} h4.col-sm-6.text-right Longest Streak: #{longestStreak}
h4.col-sm-6.text-left Current Streak: #{currentStreak} h4.col-sm-6.text-left Current Streak: #{currentStreak}
- if (challenges.length > 0)
.col-sm-12 - if (challenges.length > 0)
table.table.table-striped .col-sm-12
thead table.table.table-striped
tr thead
th.col-xs-4 Challenge tr
th.col-xs-2 Completed th.col-xs-4 Challenge
th.col-xs-6 Link th.col-xs-2 Completed
for challenge in challenges th.col-xs-6 Link
tr for challenge in challenges
td.col-xs-4 tr
a(href='/challenges/' + challenge.name)= challenge.name td.col-xs-4= challenge.name
td.col-xs-2= moment(challenge.completedDate, 'x').format("MMM DD, YYYY") td.col-xs-2= moment(challenge.completedDate, 'x').format("MMM DD, YYYY")
td.col-xs-6 td.col-xs-6
a(href=challenge.solution) View my solution a(href=challenge.solution) 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
tr tr
th.col-xs-4 Bonfire th.col-xs-4 Bonfire
th.col-xs-2 Completed th.col-xs-2 Completed
th.col-xs-6 Solution th.col-xs-6 Solution
for bonfire in bonfires for bonfire in bonfires
tr tr
td.col-xs-4 td.col-xs-4= bonfire.name
a(href='/bonfires/'+ bonfire.name)= bonfire.name td.col-xs-2= moment(bonfire.completedDate, 'x').format("MMM DD, YYYY")
td.col-xs-2= moment(bonfire.completedDate, 'x').format("MMM DD, YYYY") td.col-xs-6
td.col-xs-6 pre.wrappable= bonfire.solution
pre= bonfire.solution br
br