summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-04-08 11:11:44 +0200
committerPeter Wu <peter@lekensteyn.nl>2015-04-08 11:11:44 +0200
commit8f5499085c5d12a5fcf84e26592197e4f3470165 (patch)
treef9eba84e6eabfcedcfa21ed40e3fa0eabe5ebc09 /js
parent2b3939e07503af13924ce034908dd46d64dfbc93 (diff)
downloadsite-8f5499085c5d12a5fcf84e26592197e4f3470165.tar.gz
Add campus description
Diffstat (limited to 'js')
-rw-r--r--js/campus.js12
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);
+ });
};
});