Commit 545fc36d authored by Leo Iannacone's avatar Leo Iannacone

start moving index to /distribution

parent c783290d
var socket = io.connect('//localhost:3000'); var socket = io.connect('//localhost:3000');
var old_data = Utils.from_hash_to_data()
socket.on('distributions', function(distributions) {
Page_Distrubion.navbar.update(distributions)
});
socket.on('distribution_packages', function(data){ if (window.location.pathname == '/') {
Page_Distrubion.packages.set(data)
})
socket.on('package_file_list', function(data){ var old_data = Utils.from_hash_to_data()
Page_Distrubion.files.set(data)
})
socket.on('file', function (data) { socket.on('distributions', function(distributions) {
Page_Distrubion.file.set(data) Page_Distrubion.navbar.update(distributions)
}) });
socket.on('file_newcontent', function(data) { socket.on('distribution_packages', function(data){
Page_Distrubion.file.append(data) Page_Distrubion.packages.set(data)
}) })
socket.on('error', function() { console.error(arguments) }); socket.on('package_file_list', function(data){
Page_Distrubion.files.set(data)
})
socket.on('file', function (data) {
Page_Distrubion.file.set(data)
})
socket.on('file_newcontent', function(data) {
Page_Distrubion.file.append(data)
})
$(window).on('hashchange', function() { $(window).on('hashchange', function() {
data = Utils.from_hash_to_data() data = Utils.from_hash_to_data()
Page_Distrubion.update(data, old_data) Page_Distrubion.update(data, old_data)
old_data = data old_data = data
});
$(window).on('load', function (){
Page_Distrubion.update(old_data)
$(window).scroll(function() {
var offset = $("#file").offset();
if ($(window).scrollTop() > offset.top + 220) {
$("#sticky").stop().addClass('fixed');
}
else {
$("#sticky").stop().removeClass('fixed');
}
}); });
});
$(window).on('load', function (){
Page_Distrubion.update(old_data)
$(window).scroll(function() {
var offset = $("#file").offset();
if ($(window).scrollTop() > offset.top + 220) {
$("#sticky").stop().addClass('fixed');
}
else {
$("#sticky").stop().removeClass('fixed');
}
});
});
}
socket.on('error', function() { console.error(arguments) });
<div class="container-fluid"> <nav>
<header > <ol class="breadcrumb">
<h1><%= title %></h1> </ol>
<p class="lead"><%= description %></p> </nav>
</header>
<nav id="distributions" class="navbar navbar-inverse" role="navigation"> <article class="row">
<div class="navbar-header"> <aside class="col-md-3">
<span class="navbar-brand" href="#">Distrbutions</span> <nav id="packages">
</div> <h2>Packages</h2>
<div class="collapse navbar-collapse"> <ul class="nav nav-pills nav-stacked"></ul>
<ul class="nav navbar-nav"></ul> </nav>
</div>
</nav> <div id="sticky" >
<nav> <section id="files">
<ol class="breadcrumb"> <h3 class="title">Files</h3>
</ol> <nav id="logs">
</nav>
<article class="row">
<aside class="col-md-3">
<nav id="packages">
<h2>Packages</h2>
<ul class="nav nav-pills nav-stacked"></ul> <ul class="nav nav-pills nav-stacked"></ul>
</nav> </nav>
<nav id="archives">
<div id="sticky" > <h4>Archives</h4>
<section id="files"> <ul></ul>
<h3 class="title">Files</h3> </nav>
<nav id="logs"> <nav id="debs">
<ul class="nav nav-pills nav-stacked"></ul> <h4>Debs</h4>
</nav> <ul></ul>
<nav id="archives"> </nav>
<h4>Archives</h4> </section>
<ul></ul> </div>
</nav>
<nav id="debs"> </aside>
<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>
<section class="col-md-9">
<header>
<h1 id="title"></h1>
</header>
<div id="file">
<pre></pre>
</div>
</section>
</article>
<footer><%= footer %></footer>
</div>
...@@ -16,6 +16,29 @@ ...@@ -16,6 +16,29 @@
<script src='/javascripts/main.js'></script> <script src='/javascripts/main.js'></script>
</head> </head>
<body> <body>
<%- body %> <div class="container-fluid">
<header >
<h1><%= title %></h1>
<p class="lead"><%= description %></p>
</header>
<nav id="distributions" class="navbar navbar-inverse" role="navigation">
<div class="navbar-header">
<span class="navbar-brand" href="#">Distrbutions</span>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav"></ul>
</div>
</nav>
<%- body %>
<footer>
<%= footer %>
</footer>
</div> <!-- .container-fluild -->
</body> </body>
</html> </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