make slight modifications to the d3 calendar heatmap on the portfolio page

This commit is contained in:
Michael Q Larson
2015-04-02 15:53:38 -07:00
parent 44c5da8f72
commit 4aea12abca
4 changed files with 17 additions and 8 deletions

View File

@ -100,7 +100,6 @@ block content
#cal-heatmap.img-center
script(src="//d3js.org/d3.v3.min.js")
script(src="//cdn.jsdelivr.net/cal-heatmap/3.3.10/cal-heatmap.min.js")
link(rel="stylesheet", href="//cdn.jsdelivr.net/cal-heatmap/3.3.10/cal-heatmap.css")
script.
var cal = new CalHeatMap();
var calendar = !{JSON.stringify(calender)};
@ -121,6 +120,6 @@ block content
});
.row
.hidden-xs.col-sm-12.text-center
.row
h3.col-sm-6.text-right Longest Streak: #{longestStreak}
h3.col-sm-6.text-left Current Streak: #{currentStreak}
.row.text-primary
h4.col-sm-6.text-right Longest Streak: #{longestStreak}
h4.col-sm-6.text-left Current Streak: #{currentStreak}

View File

@ -23,7 +23,7 @@ block content
a(href=websiteLink)= websiteLink
h3 Project Description:
.col-xs-12
h4 #{projectDescription} (About #{estimatedHours} hours per camper)
h4.negative-15 #{projectDescription} (About #{estimatedHours} hours per camper)
h3 This project involves building:
.col-xs-12
if (approvedWebsite)

View File

@ -33,3 +33,15 @@ script.
webkitRequestAnimationFrame || msRequestAnimationFrame;
if (raf) raf(cb);
else window.addEventListener('load', cb);
var cb = function () {
var l = document.createElement('link');
l.rel = 'stylesheet';
l.href = '//cdn.jsdelivr.net/cal-heatmap/3.3.10/cal-heatmap.css';
var h = document.getElementsByTagName('head')[0];
h.parentNode.insertBefore(l, h);
};
var raf = requestAnimationFrame || mozRequestAnimationFrame ||
webkitRequestAnimationFrame || msRequestAnimationFrame;
if (raf) raf(cb);
else window.addEventListener('load', cb);

View File

@ -1,8 +1,6 @@
script(src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js")
script(src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.11/angular.min.js")
script(src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.0/ui-bootstrap-tpls.min.js")
script(src="//d3js.org/d3.v3.min.js")
script(src="//cdn.jsdelivr.net/cal-heatmap/3.3.10/cal-heatmap.min.js")
include meta
title #{title} | Free Code Camp
meta(charset='utf-8')