From 2e8c6461e62c4e43757b4904ca673f5c84ce0c1f Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Thu, 19 Feb 2015 17:18:44 -0800 Subject: [PATCH] Start work on D3 cal-heatmap --- app.js | 7 ++++++- views/account/show.jade | 26 ++++++++++++++------------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/app.js b/app.js index dff8270448..8d3d8703e9 100644 --- a/app.js +++ b/app.js @@ -139,11 +139,16 @@ var trusted = [ '*.ionicframework.com', 'https://syndication.twitter.com', '*.youtube.com', + '*.jsdelivr.net' ]; app.use(helmet.contentSecurityPolicy({ defaultSrc: trusted, - scriptSrc: ['*.optimizely.com', '*.aspnetcdn.com'].concat(trusted), + scriptSrc: [ + '*.optimizely.com', + '*.aspnetcdn.com', + '*.d3js.org', + ].concat(trusted), 'connect-src': [ 'ws://*.rafflecopter.com', 'wss://*.rafflecopter.com', diff --git a/views/account/show.jade b/views/account/show.jade index 8194c4b107..a9f4e5e5af 100644 --- a/views/account/show.jade +++ b/views/account/show.jade @@ -98,15 +98,17 @@ block content | Try it out - if (ch[0] > 0) - .col-sm-12 - table.table.table-striped - thead - tr - th Challenge - th Date Finished - for challenge in challenges - if ch[challenge.challengeNumber] > 0 - tr - td= challenges[challenge.challengeNumber].name - td= moment(ch[challenge.challengeNumber], 'X').format("MMM DD, YYYY") - br \ No newline at end of file + html. + + + + + .col-xs-12 + p= ch + .embed-responsive.embed-responsive-16by9 + #cal-heatmap + script. + var cal = new CalHeatMap(); + cal.init({ + "domain": "day" + }); \ No newline at end of file