This commit is contained in:
popomore 2013-11-27 11:48:17 +08:00
parent b740ff8f53
commit 21a668c80e

View File

@ -59,6 +59,7 @@ h1{
padding-top: 10px; padding-top: 10px;
pointer-events: none; pointer-events: none;
font-weight: 300; font-weight: 300;
white-space: nowrap;
} }
#life .event{ #life .event{
padding-right: 20px; padding-right: 20px;
@ -217,8 +218,11 @@ h1{
html = ''; html = '';
var days = 0; var days = 0;
for (var y=firstYear; y<=nowYear+1; y++){ for (var y=firstYear; y<=nowYear+1; y++){
html += '<section class="year" style="left: ' + (days*dayLength) + 'px">' + y + '</section>'; html += '<section class="year" style="left: ' + (days*dayLength) + 'px">' +
y + ' (' + (y - firstYear) + ')' +
'</section>';
days += (y % 4 == 0) ? 366 : 365; days += (y % 4 == 0) ? 366 : 365;
} }
data.forEach(function(d){ data.forEach(function(d){