diff --git a/data/elevationProfile2017.csv b/data/elevationProfile2017.csv new file mode 100644 index 0000000..0d2ab7c --- /dev/null +++ b/data/elevationProfile2017.csv @@ -0,0 +1,105 @@ +distance,elevation +0,-9 +0.01,9.84 +0.18,19.68 +0.48,9.84 +0.83,13.12 +1.1,19.68 +1.37,16.4 +1.8,9.84 +2.27,29.52 +2.65,52.49 +2.87,39.37 +3.11,13.12 +3.49,9.84 +3.78,16.4 +4.17,6.56 +4.76,3.28 +4.94,6.56 +5.07,36.08 +5.13,16.4 +5.22,121.39 +5.48,154.19 +5.54,170.6 +5.77,150.91 +5.98,213 +6.01,259 +6.4,272 +6.7,269 +7,239 +7.2,220 +7.5,226 +7.8,224 +8,167 +8.3,184 +8.4,210 +8.8,253 +9.1,234 +9.4,197 +9.6,157 +9.9,157 +10.1,79 +10.3,151 +10.65,174 +10.8,226 +11.1,266 +11.4,230 +11.43,270 +11.5,203 +11.75,131 +12,92 +12.17,72 +12.22,112 +12.63,157.48 +12.9,180.44 +13.4,183 +13.6,213 +13.8,253 +14,203 +14.23,217 +14.5,164 +14.75,144 +14.9,98 +15.1,141 +15.3,87 +15.65,125 +15.9,161 +16.2,184 +16.6,197 +16.9,220 +17.1,230 +17.4,295 +17.65,266 +17.76,315 +18,299 +18.3,312 +18.6,305 +18.7,338 +18.9,292 +19.3,266 +19.6,282 +19.84,246 +20,295 +20.3,275 +20.8,292 +21.1,292 +21.26,197 +21.6,157 +21.8,180 +22,108 +22.46,62 +22.65,49.21 +22.94,26.24 +23.3,62 +23.6,23 +23.9,20 +24.2,56 +24.4,26 +24.65,49 +24.9,26 +25.1,46 +25.35,16.4 +25.7,-9 +26,-3 +26.2,16.4 +26.21,-9 diff --git a/src/assets/gifs/Balint.gif b/src/assets/gifs/Balint.gif new file mode 100644 index 0000000..ffe3ba5 Binary files /dev/null and b/src/assets/gifs/Balint.gif differ diff --git a/src/assets/gifs/Hilary Dykes.mov b/src/assets/gifs/Hilary Dykes.mov new file mode 100644 index 0000000..312c9a5 Binary files /dev/null and b/src/assets/gifs/Hilary Dykes.mov differ diff --git a/src/assets/gifs/Hilary.gif b/src/assets/gifs/Hilary.gif new file mode 100644 index 0000000..529370a Binary files /dev/null and b/src/assets/gifs/Hilary.gif differ diff --git a/src/assets/gifs/Iain Mickle.mov b/src/assets/gifs/Iain Mickle.mov new file mode 100644 index 0000000..d8aaaae Binary files /dev/null and b/src/assets/gifs/Iain Mickle.mov differ diff --git a/src/assets/gifs/Iain.gif b/src/assets/gifs/Iain.gif new file mode 100644 index 0000000..03b1f47 Binary files /dev/null and b/src/assets/gifs/Iain.gif differ diff --git a/src/assets/gifs/Lauren.gif b/src/assets/gifs/Lauren.gif new file mode 100644 index 0000000..0555d2b Binary files /dev/null and b/src/assets/gifs/Lauren.gif differ diff --git a/src/css/project.less b/src/css/project.less index e423319..fd1c13c 100644 --- a/src/css/project.less +++ b/src/css/project.less @@ -16,6 +16,20 @@ a { } } +.gif-container { + max-width: 1000px; + margin: auto; + margin-top: 50px; + .display-flex; + .flex-wrap(wrap); + .gif { + .flex(0 0 50%); + img { + width: 100%; + } + } +} + .month-title { font-family: @bold-graphics; } @@ -89,7 +103,8 @@ a { .chart-wrapper { display: block; text-align: center; - width: 100%; + max-width: 1200px; + margin: auto; .display-flex; .flex-wrap(wrap); .miles-chart, .elevation-chart { @@ -144,7 +159,7 @@ a { } .source { - width: 90%; + max-width: 1000px; @media @mobile { width: 95%; } @@ -161,7 +176,7 @@ a { background: lighten(@light-gray,10%); // border: 4px solid @light-gray; padding: 20px; - width: 80%; + max-width: 900px; margin: auto; &.padded { margin-bottom: 40px; diff --git a/src/js/races.js b/src/js/races.js index a6e0b37..0e55364 100644 --- a/src/js/races.js +++ b/src/js/races.js @@ -177,7 +177,7 @@ function hoverChart(targetID,maxval,yLabel,units,runnerID) { x.domain([0, 26.2]); y.domain([parsePace('00:00'),parsePace("20:00")]); - yRight.domain([-7,1000]) + yRight.domain([-9,1000]) // Define the axes svg.append("g") diff --git a/src/js/training.js b/src/js/training.js index de9c176..e30b3e5 100644 --- a/src/js/training.js +++ b/src/js/training.js @@ -308,10 +308,10 @@ function dotChart(targetID,maxval,runnerID){ left: 100 }; if (screen.width > 768) { - var width = 900 - margin.left - margin.right; + // var width = 900 - margin.left - margin.right; var height = 470 - margin.top - margin.bottom; } else if (screen.width <= 768 && screen.width > 480) { - var width = 720 - margin.left - margin.right; + // var width = 720 - margin.left - margin.right; var height = 470 - margin.top - margin.bottom; } else if (screen.width <= 480 && screen.width > 340) { console.log("big phone"); @@ -321,7 +321,7 @@ function dotChart(targetID,maxval,runnerID){ bottom: 40, left: 55 }; - var width = 340 - margin.left - margin.right; + // var width = 340 - margin.left - margin.right; var height = 350 - margin.top - margin.bottom; } else if (screen.width <= 340) { console.log("mini iphone") @@ -331,9 +331,10 @@ function dotChart(targetID,maxval,runnerID){ bottom: 40, left: 55 }; - var width = 310 - margin.left - margin.right; + // var width = 310 - margin.left - margin.right; var height = 370 - margin.top - margin.bottom; } + var width = Math.min(windowWidth,maxWidth) - 10 - margin.left - margin.right; console.log(margin); d3.select(targetID).select("svg").remove(); @@ -653,12 +654,12 @@ for (var jdx=0; jdx= navposition) { @@ -748,5 +759,30 @@ var navDisplay = function() { } else { navID.className = "fixed hide"; } + + // var p_top = psec.getBoundingClientRect().top + window_top - 40; + // var f_top = fsec.getBoundingClientRect().top + window_top - 40; + // var s_top = ssec.getBoundingClientRect().top + window_top - 40; + // var l_top = lsec.getBoundingClientRect().top + window_top - 40; + // var r_top = rsec.getBoundingClientRect().top + window_top - 40; + // + // var p_btm = psec.getBoundingClientRect().bottom + window_top - 40; + // var f_btm = fsec.getBoundingClientRect().bottom + window_top - 40; + // var s_btm = ssec.getBoundingClientRect().bottom + window_top - 40; + // var l_btm = lsec.getBoundingClientRect().bottom + window_top - 40; + // var r_btm = rsec.getBoundingClientRect().bottom + window_top - 40; + // + // var top = [p_top, f_top, s_top, l_top, r_top]; + // var btm = [p_btm, f_btm, s_btm, l_btm, r_btm]; + // + // for (var i = 0; i < top.length; i++) { + // if ((top[i] < window_top) && (btm[i] > window_top)) { + // scroll[i].classList.add('activelink'); + // } + // else { + // scroll[i].classList.remove('activelink'); + // } + // } + }; window.addEventListener("scroll", navDisplay); diff --git a/src/races/index.html b/src/races/index.html index bc8c59a..644a8ea 100644 --- a/src/races/index.html +++ b/src/races/index.html @@ -115,7 +115,7 @@ <% }); %>
-
Source: Strava, Bálint Gál, Gene Dykes, Greg McQuaid, Hilary Shirazi, Iain Mickle, Jorge Maravilla, Lauren Elkins
+
Source: Strava, Bálint Gál, Gene Dykes, Greg McQuaid, Hilary Shirazi, Iain Mickle, Jorge Maravilla and Lauren Elkins
<% } %> <% }); %> @@ -137,7 +137,7 @@ var laurenData = <%= JSON.stringify(json.LaurenElkins) %>; var raceData = <%= JSON.stringify(csv.allStravaSplits) %>; - var elevationData = <%= JSON.stringify(csv.elevationProfile) %>; + var elevationData = <%= JSON.stringify(csv.elevationProfile2017) %>; diff --git a/src/training/index.html b/src/training/index.html index 0ec539d..d1f42d5 100644 --- a/src/training/index.html +++ b/src/training/index.html @@ -19,6 +19,13 @@ <%= t.include("partials/_flat_nav.html") %> <%= t.include("partials/_nav.html") %> +
+
+
+
+
+
+
@@ -107,14 +114,6 @@ <% if (d.Key == "hilary"){ %>
-
-
Hilary and Gene's total elevation gain
-
-
-
-
-
-
Hilary and Gene's total miles
@@ -124,14 +123,19 @@
+ +
+
Hilary and Gene's total elevation gain
+
+
+
+
+
+
-
Hilary Shirazi ran a total of hours in the last 3 months, -
or the equivalent of of a full-time job.
-
Gene Dykes ran a total of hours in the last 3 months, -
or the equivalent of of a full-time job.
-
+
<%=d.FunFact.replace("**","").replace("*","").replace("**","").replace("*","")%>
Source: Strava, <%=d.Name%>
@@ -139,15 +143,6 @@ <% } else { %>
-
-
<%=d.Name.split(" ")[0]%>'s total elevation gain
-
-
-
-
-
-
-
<%=d.Name.split(" ")[0]%>'s total miles
@@ -156,11 +151,18 @@
+
+
<%=d.Name.split(" ")[0]%>'s total elevation gain
+
+
+
+
+
+
-
<%=d.Name.split(" ")[0]%> ran a total of hours in the last 3 months, -
or the equivalent of of a full-time job.
+
<%=d.FunFact.replace("**","").replace("*","").replace("**","").replace("*","")%>
Source: Strava, <%=d.Name%>
@@ -208,7 +210,7 @@ <% }); %>
-
Source: Strava, Bálint Gál, Gene Dykes, Greg McQuaid, Hilary Shirazi, Iain Mickle, Jorge Maravilla, Lauren Elkins
+
Source: Strava, Bálint Gál, Gene Dykes, Greg McQuaid, Hilary Shirazi, Iain Mickle, Jorge Maravilla and Lauren Elkins
<% } %> <% }); %>