Commit 558ff925 authored by Leo Iannacone's avatar Leo Iannacone

express-partials is not really needed - splited layout.ejs in header.ejs and...

express-partials is not really needed - splited layout.ejs in header.ejs and footer.ejs and included in each page
parent 0853cfad
...@@ -8,7 +8,6 @@ var express = require('express') ...@@ -8,7 +8,6 @@ var express = require('express')
, config = require('./lib/config.js') , config = require('./lib/config.js')
, utils = require('./lib/utils.js') , utils = require('./lib/utils.js')
, http = require('http') , http = require('http')
, partials = require('express-partials')
, app = module.exports = express() , app = module.exports = express()
, Client = require('./lib/client.js') , Client = require('./lib/client.js')
, Broadcaster = require('./lib/broadcaster.js') , Broadcaster = require('./lib/broadcaster.js')
...@@ -18,7 +17,6 @@ var express = require('express') ...@@ -18,7 +17,6 @@ var express = require('express')
app.configure(function(){ app.configure(function(){
app.set('views', __dirname + '/views'); app.set('views', __dirname + '/views');
app.set('view engine', 'ejs'); app.set('view engine', 'ejs');
app.use(partials());
app.use(express.bodyParser()); app.use(express.bodyParser());
app.use(express.methodOverride()); app.use(express.methodOverride());
app.use(app.router); app.use(app.router);
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
, "dependencies": { , "dependencies": {
"express": "3.4.8" "express": "3.4.8"
, "ejs": ">= 0.0.1" , "ejs": ">= 0.0.1"
, "express-partials": "*"
, "socket.io": "*" , "socket.io": "*"
, "node-fs": "*" , "node-fs": "*"
, "tailfd": "*" , "tailfd": "*"
......
<% include header.ejs %>
<nav> <nav>
<ol class="breadcrumb"> <ol class="breadcrumb">
</ol> </ol>
...@@ -59,3 +61,4 @@ ...@@ -59,3 +61,4 @@
</section> </section>
</article> </article>
<% include footer.ejs %>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.png" />
<title><%= web.title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/external_libs/bootstrap-3.1.1-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<div id="wrapper" class="container-fluid">
<header id="pageheader" onclick="window.location.href='/'">
<h1><%= web.title %> <small><%= version %></small></h1>
<p class="lead"><%= web.description %></p>
</header>
<nav class="navbar navbar-inverse" role="navigation">
<div class="navbar-header">
<span class="navbar-brand">Distributions</span>
</div>
<div class="collapse navbar-collapse">
<div id="distributions">
<ul class="nav navbar-nav"></ul>
</div>
<div id="pages">
<ul class="nav navbar-nav pull-right">
<% if (web.paths.preferences) { %>
<li><a href="<%= web.paths.preferences %>">Preferences</a></li>
<% } %>
<li class="home-link">
<a class="pull-left" href="/">Home</a>
<span class="pull-right icon"></span>
</li>
</ul>
</div>
</div>
</nav>
<%- body %>
</div> <!-- #wrapper --> </div> <!-- #wrapper -->
<footer class="container-fluid"> <footer class="container-fluid">
......
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.png" />
<title><%= web.title %></title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/external_libs/bootstrap-3.1.1-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<div id="wrapper" class="container-fluid">
<header id="pageheader" onclick="window.location.href='/'">
<h1><%= web.title %> <small><%= version %></small></h1>
<p class="lead"><%= web.description %></p>
</header>
<nav class="navbar navbar-inverse" role="navigation">
<div class="navbar-header">
<span class="navbar-brand">Distributions</span>
</div>
<div class="collapse navbar-collapse">
<div id="distributions">
<ul class="nav navbar-nav"></ul>
</div>
<div id="pages">
<ul class="nav navbar-nav pull-right">
<% if (web.paths.preferences) { %>
<li><a href="<%= web.paths.preferences %>">Preferences</a></li>
<% } %>
<li class="home-link">
<a class="pull-left" href="/">Home</a>
<span class="pull-right icon"></span>
</li>
</ul>
</div>
</div>
</nav>
<% include header.ejs %>
<article id="home" class="page row"> <article id="home" class="page row">
<header class="col-md-12"> <header class="col-md-12">
<h1>Welcome!</h1> <h1>Welcome!</h1>
...@@ -121,4 +123,6 @@ scp_compress = 1 ...@@ -121,4 +123,6 @@ scp_compress = 1
</article> </article>
</section> </section>
</article> </article>
\ No newline at end of file
<% include footer.ejs %>
\ No newline at end of file
<% include header.ejs %>
<article class="page"> <article class="page">
<header><h2>Preferences</h2></header> <header><h2>Preferences</h2></header>
...@@ -44,7 +46,7 @@ ...@@ -44,7 +46,7 @@
<input id="header" type="checkbox"> Show header <input id="header" type="checkbox"> Show header
</label> </label>
</div> </div>
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input id="sidebar" type="checkbox"> Enable sidebar <input id="sidebar" type="checkbox"> Enable sidebar
</label> </label>
...@@ -87,4 +89,6 @@ ...@@ -87,4 +89,6 @@
</div> <!-- /#prefernces --> </div> <!-- /#prefernces -->
</div> </div>
</div> </div>
</article> </article>
\ No newline at end of file
<% include footer.ejs %>
\ No newline at end of file
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