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')
, config = require('./lib/config.js')
, utils = require('./lib/utils.js')
, http = require('http')
, partials = require('express-partials')
, app = module.exports = express()
, Client = require('./lib/client.js')
, Broadcaster = require('./lib/broadcaster.js')
......@@ -18,7 +17,6 @@ var express = require('express')
app.configure(function(){
app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
app.use(partials());
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
......
......@@ -5,7 +5,6 @@
, "dependencies": {
"express": "3.4.8"
, "ejs": ">= 0.0.1"
, "express-partials": "*"
, "socket.io": "*"
, "node-fs": "*"
, "tailfd": "*"
......
<% include header.ejs %>
<nav>
<ol class="breadcrumb">
</ol>
......@@ -59,3 +61,4 @@
</section>
</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 -->
<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">
<header class="col-md-12">
<h1>Welcome!</h1>
......@@ -121,4 +123,6 @@ scp_compress = 1
</article>
</section>
</article>
\ No newline at end of file
</article>
<% include footer.ejs %>
\ No newline at end of file
<% include header.ejs %>
<article class="page">
<header><h2>Preferences</h2></header>
......@@ -44,7 +46,7 @@
<input id="header" type="checkbox"> Show header
</label>
</div>
<div class="checkbox">
<div class="checkbox">
<label>
<input id="sidebar" type="checkbox"> Enable sidebar
</label>
......@@ -87,4 +89,6 @@
</div> <!-- /#prefernces -->
</div>
</div>
</article>
\ No newline at end of file
</article>
<% 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