diff options
Diffstat (limited to 'js/campus.js')
-rw-r--r-- | js/campus.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/campus.js b/js/campus.js index d7a02e9..a3bd87b 100644 --- a/js/campus.js +++ b/js/campus.js @@ -49,5 +49,17 @@ define(['campus-coords', 'd3'], function(coords, d3) { return function() { var svg = d3.select('#campus-map').append('svg'); initSvg(svg); + + var citems = document.getElementById('campus-items'); + coords.forEach(function(building) { + var header = document.createElement('h2'); + header.id = '/campus/' + building.name; + header.textContent = building.name; + citems.appendChild(header); + + var text_block = document.createElement('p'); + text_block.textContent = building.description; + citems.appendChild(text_block); + }); }; }); |