Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use consolidate to make template engine configurable #236

Merged
merged 5 commits into from
Feb 6, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.DS_Store
.nodemonignore
.sass-cache/
.bower-*/
.idea/
node_modules/
public/lib
test/coverage/
17 changes: 17 additions & 0 deletions app/views/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% extends 'layouts/default.html' %}

{% block main %}
<h1>Oops something went wrong</h1>
<br>
<span>404</span>
{% endblock %}

{% block content %}
<div id="error-message-box">
<div id="error-stack-trace">
<pre>
<code>{{error}}</code>
</pre>
</div>
</div>
{% endblock %}
13 changes: 0 additions & 13 deletions app/views/404.jade

This file was deleted.

17 changes: 17 additions & 0 deletions app/views/500.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% extends 'layouts/default.html' %}

{% block main %}
<h1>Oops something went wrong</h1>
<br>
<span>500</span>
{% endblock %}

{% block content %}
<div id="error-message-box">
<div id="error-stack-trace">
<pre>
<code>{{error}}</code>
</pre>
</div>
</div>
{% endblock %}
12 changes: 0 additions & 12 deletions app/views/500.jade

This file was deleted.

32 changes: 32 additions & 0 deletions app/views/includes/foot.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!-- Angular JS -->
<script type="text/javascript" src="/lib/angular/angular.min.js"></script>
<script type="text/javascript" src="/lib/angular-cookies/angular-cookies.min.js"></script>
<script type="text/javascript" src="/lib/angular-resource/angular-resource.min.js"></script>
<script type="text/javascript" src="/lib/angular-route/angular-route.js"></script>

<!-- Angular UI -->
<script type="text/javascript" src="/lib/angular-bootstrap/ui-bootstrap.js"></script>
<script type="text/javascript" src="/lib/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script type="text/javascript" src="/lib/angular-ui-utils/ui-utils.min.js"></script>

<!-- Application Init -->
<script type="text/javascript" src="/js/app.js"></script>
<script type="text/javascript" src="/js/config.js"></script>
<script type="text/javascript" src="/js/directives.js"></script>
<script type="text/javascript" src="/js/filters.js"></script>

<!-- Application Services -->
<script type="text/javascript" src="/js/services/global.js"></script>
<script type="text/javascript" src="/js/services/articles.js"></script>

<!-- Application Controllers -->
<script type="text/javascript" src="/js/controllers/articles.js"></script>
<script type="text/javascript" src="/js/controllers/index.js"></script>
<script type="text/javascript" src="/js/controllers/header.js"></script>
<script type="text/javascript" src="/js/init.js"></script>


{% if (process.env.NODE_ENV == 'development') %}
<!-- Livereload script rendered -->
<script type="text/javascript", src="http://" + req.host + ":35729/livereload.js"></script>
{% endif %}
30 changes: 0 additions & 30 deletions app/views/includes/foot.jade

This file was deleted.

31 changes: 31 additions & 0 deletions app/views/includes/head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>{{appName}} - {{title}}</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<meta name="keywords" content="node.js, express, mongoose, mongodb, angularjs, swig">
<meta name="description" content="MEAN - A Modern Stack: MongoDB, ExpressJS, AngularJS, NodeJS. (BONUS: Passport User Support).">

<link href="/img/icons/favicon.ico" rel="shortcut icon" type="image/x-icon">

<meta property="fb:app_id" content="APP_ID">
<meta property="og:title" content="{{appName}} - {{title}}">
<meta property="og:description" content="MEAN - A Modern Stack: MongoDB, ExpressJS, AngularJS, NodeJS. (BONUS: Passport User Support).">
<meta property="og:type" content="website">
<meta property="og:url" content="APP_URL">
<meta property="og:image" content="APP_LOGO">
<meta property="og:site_name" content="MEAN - A Modern Stack">
<meta property="fb:admins" content="APP_ADMIN">

<link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.min.css">
<!-- <link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap-responsive.css"> -->
<link rel="stylesheet" href="/css/common.css">

<link rel="stylesheet" href="/css/views/articles.css">

<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
29 changes: 0 additions & 29 deletions app/views/includes/head.jade

This file was deleted.

7 changes: 7 additions & 0 deletions app/views/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends 'layouts/default.html' %}
{% block content %}
<section data-ng-view />
<script type="text/javascript">
window.user = {{user|safe}};
</script>
{% endblock %}
6 changes: 0 additions & 6 deletions app/views/index.jade

This file was deleted.

13 changes: 13 additions & 0 deletions app/views/layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml" itemscope="itemscope" itemtype="http://schema.org/Product">
{% include '../includes/head.html' %}
<body>
<div class="navbar navbar-inverse navbar-fixed-top" data-ng-include="'views/header.html'" data-role="navigation"></div>
<section class="content">
<section class="container">
{% block content %}{% endblock %}
</section>
</section>
{% include '../includes/foot.html' %}
</body>
</html>
9 changes: 0 additions & 9 deletions app/views/layouts/default.jade

This file was deleted.

24 changes: 24 additions & 0 deletions app/views/users/auth.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{% extends '../layouts/default.html' %}

{% block content %}
<div class="row">
<div class="col-md-offset-1 col-md-5">
<a href="/auth/facebook"><img src="/img/icons/facebook.png"></a>
<a href="/auth/github"><img src="/img/icons/github.png"></a>
<a href="/auth/twitter"><img src="/img/icons/twitter.png"></a>
<a href="/auth/google"><img src="/img/icons/google.png"></a>
<a href="/auth/linkedin"><img src="/img/icons/linkedin.png"></a>
</div>
<div class="col-md-6">
{% if message && message.length %}
<div class="fade in alert alert-error">
<button class="close" data-dismiss="alert">&times;</button>
<div class="strong">
{{ message }}
</div>
</div>
{% endif %}
{% block auth %}{% endblock %}
</div>
</div>
{% endblock %}
21 changes: 0 additions & 21 deletions app/views/users/auth.jade

This file was deleted.

24 changes: 24 additions & 0 deletions app/views/users/signin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{% extends 'auth.html' %}

{% block auth %}
<form class="signin form-horizontal" action="/users/session" method="post">
<div class="form-group">
<label class="col-md-4 control-label" for="email">Email</label>
<div class="col-md-8">
<input id="email" class="form-control" type="text" name="email" placeholder="Email">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="password">Password</label>
<div class="col-md-8">
<input id="password" class="form-control" type="password" name="password" placeholder="Password">
</div>
</div>
<div class="form-group">
<div class="col-md-offset-4 col-md-8">
<button class="btn btn-primary" type="submit">Sign in</button>&nbsp;
or&nbsp;<a class="show-signup" href="/signup">Sign up</a>
</div>
</div>
</form>
{% endblock %}
20 changes: 0 additions & 20 deletions app/views/users/signin.jade

This file was deleted.

36 changes: 36 additions & 0 deletions app/views/users/signup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% extends 'auth.html' %}

{% block auth %}
<form class="signin form-horizontal" action="/users" method="post">
<div class="form-group">
<label class="col-md-4 control-label" for="name">Full Name</label>
<div class="col-md-8">
<input id="name" class="form-control" type="text" name="name" placeholder="Full Name" value="{{user.name}}" />
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="email">Email</label>
<div class="col-md-8">
<input id="email" class="form-control" type="text" name="email" placeholder="Email" value="{{user.email}}" />
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="username">Username</label>
<div class="col-md-8">
<input id="username" class="form-control" type="text" name="username" placeholder="Username" value="{{user.username}}" />
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="password">Password</label>
<div class="col-md-8">
<input id="password" class="form-control" type="password" name="password" placeholder="Password" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-4 col-md-8">
<button class="btn btn-primary" type="submit">Sign up</button>&nbsp;
or&nbsp;<a class="show-login" href="/signin">login</a>
</div>
</div>
</form>
{% endblock %}
30 changes: 0 additions & 30 deletions app/views/users/signup.jade

This file was deleted.

Loading