Commit febcd1a9 authored by Leo Iannacone's avatar Leo Iannacone

moved index page to distribution page

parent 545fc36d
...@@ -39,6 +39,7 @@ var io = require('socket.io').listen(app); ...@@ -39,6 +39,7 @@ var io = require('socket.io').listen(app);
// Routes // Routes
app.get('/', routes.index); app.get('/', routes.index);
app.get('/distribution', routes.distribution)
function watch_path_onsocket(event_name, socket, data, watch_path, updater) { function watch_path_onsocket(event_name, socket, data, watch_path, updater) {
name = "watcher-" + event_name name = "watcher-" + event_name
......
var socket = io.connect('//localhost:3000'); var socket = io.connect('//localhost:3000');
// update distributions
socket.on('distributions', function(distributions) {
$('#distributions ul').html('');
distributions.forEach(function (name){
$('#distributions ul').append('<li id="distribution-' + name +'"><a href="/distribution#' + name + '">' + name + '</li>');
});
});
if (window.location.pathname == '/') { if (window.location.pathname == '/distribution') {
var old_data = Utils.from_hash_to_data() var old_data = Utils.from_hash_to_data()
socket.on('distributions', function(distributions) {
Page_Distrubion.navbar.update(distributions)
});
socket.on('distribution_packages', function(data){ socket.on('distribution_packages', function(data){
Page_Distrubion.packages.set(data) Page_Distrubion.packages.set(data)
}) })
......
...@@ -139,15 +139,6 @@ var Page_Distrubion = { ...@@ -139,15 +139,6 @@ var Page_Distrubion = {
} }
}, },
navbar: {
update: function (distributions) {
$('#distributions ul').html('');
distributions.forEach(function (name){
$('#distributions ul').append('<li id="distribution-' + name +'"><a href="#' + name + '">' + name + '</li>');
});
},
},
select: function(data) { select: function(data) {
if (! data) if (! data)
data = Utils.from_hash_to_data() data = Utils.from_hash_to_data()
......
/*
* GET home page.
*/
var config = require('../config.js')
exports.index = function(req, res){
res.render('index', config.web)
};
...@@ -8,3 +8,7 @@ var config = require('../config.js') ...@@ -8,3 +8,7 @@ var config = require('../config.js')
exports.index = function(req, res){ exports.index = function(req, res){
res.render('index', config.web) res.render('index', config.web)
}; };
exports.distribution = function(req, res) {
res.render('distribution', config.web)
}
<nav>
<ol class="breadcrumb">
</ol>
</nav>
<article class="row">
<aside class="col-md-3">
<nav id="packages">
<h2>Packages</h2>
<ul class="nav nav-pills nav-stacked"></ul>
</nav>
<div id="sticky" >
<section id="files">
<h3 class="title">Files</h3>
<nav id="logs">
<ul class="nav nav-pills nav-stacked"></ul>
</nav>
<nav id="archives">
<h4>Archives</h4>
<ul></ul>
</nav>
<nav id="debs">
<h4>Debs</h4>
<ul></ul>
</nav>
</section>
</div>
</aside>
<section class="col-md-9">
<header>
<h1 id="title"></h1>
</header>
<div id="file">
<pre></pre>
</div>
</section>
</article>
<nav>
<ol class="breadcrumb">
</ol>
</nav>
<article class="row">
<aside class="col-md-3">
<nav id="packages">
<h2>Packages</h2>
<ul class="nav nav-pills nav-stacked"></ul>
</nav>
<div id="sticky" >
<section id="files">
<h3 class="title">Files</h3>
<nav id="logs">
<ul class="nav nav-pills nav-stacked"></ul>
</nav>
<nav id="archives">
<h4>Archives</h4>
<ul></ul>
</nav>
<nav id="debs">
<h4>Debs</h4>
<ul></ul>
</nav>
</section>
</div>
</aside>
<section class="col-md-9">
<header>
<h1 id="title"></h1>
</header>
<div id="file">
<pre></pre>
</div>
</section>
</article>
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