Commit 7dcaf7ac authored by Leo Iannacone's avatar Leo Iannacone

reflects changes in html

parent 117d2203
<h1><%= title %></h1>
<p>Welcome to <%= title %></p>
\ No newline at end of file
<p>Welcome to <%= title %></p>
......@@ -3,8 +3,34 @@
<head>
<title><%= title %></title>
<link rel='stylesheet' href='/stylesheets/style.css' />
<script src='//code.jquery.com/jquery-1.7.2.min.js'></script>
<script src='//localhost:3000/socket.io/socket.io.js'></script>
<script>
function get_path(path) {
info = path.split('/');
if (info.length == 1) {
socket.emit("get-distribution", path);
}
}
var socket = io.connect('//localhost:3000');
socket.on('distributions', function(distributions) {
$('#distributions').html('');
distributions.forEach(function (name){
$('#distributions').append('<li><a href="#' + name + '">' + name + '</li>');
});
});
socket.on('error', function() { console.error(arguments) });
$(window).on('hashchange', function() {
get_path(window.location.hash.replace('#',''));
});
</script>
</head>
<body>
<ul id='messages'></ul>
<ul id="distributions"></ul>
<%- body %>
</body>
</html>
\ No newline at end of file
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment