Skip to content

Commit

Permalink
fixed nunjucks dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
posabsolute committed May 22, 2015
1 parent cb306ca commit 3202175
Show file tree
Hide file tree
Showing 20 changed files with 66 additions and 67 deletions.
9 changes: 5 additions & 4 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ module.exports = function(grunt) {
options:{
paths : "src",
langs : ["en_US", "fr_CA"],
configureEnvironment : function(env, options){
configureEnvironment : function(env){
var self = this;
env.addFilter('trans', function(str, obj) {
var lang = options.lang || 'en_US';
var lang = self.options.lang || 'en_US';
var locale = YAML.load('locales/'+lang+'.yml');

var string = locale[str],
Expand Down Expand Up @@ -166,8 +167,8 @@ module.exports = function(grunt) {
files: [
{
expand: true,
cwd: "src/templates",
src: ["**/*.html","!**/_*.html"],
cwd: "src",
src: ["templates/**/*.html","!templates/**/_*.html"],
dest: "dist/templates/"+lang+"/",
ext: ".html"
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"grunt-mocha-test": "^0.12.7",
"grunt-nodemailer": "^0.3.0",
"grunt-nunjucks": "^0.1.4",
"grunt-nunjucks-2-html": "git+https://[email protected]/posabsolute/grunt-nunjucks-2-html.git",
"grunt-nunjucks-2-html": "^0.2.9",
"grunt-premailer": "^0.2.11",
"grunt-sass": "^0.18.0",
"jasmine-node": "^1.14.5",
Expand Down
4 changes: 2 additions & 2 deletions src/css/6_components/_component.ink.button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ table.small-button,
table.medium-button,
table.large-button {
overflow: hidden;
margin:0 0px 10px 0!important;
margin:0;

}

Expand All @@ -15,7 +15,7 @@ table.small-button td,
table.medium-button td,
table.large-button td {
display: block;
width: auto !important;
width: auto;
text-align: center;
transition: background-color 0.5s ease;
background: #2ba6cb;
Expand Down
18 changes: 11 additions & 7 deletions src/css/7_themes/sunday/_component.account-information.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.steps{
padding-top:10px;
p{
color: #f3a389;
color: #080862;
font-size:20px;
text-align: left;
padding-top: 10px;
Expand All @@ -17,9 +17,13 @@
}
.update-button-ctn{
background:#ffffff;
td{padding:30px 0px;}
.button-update{
width:50%;
td a {font-size:18px;}
}
}
td{padding:15px 0px;}

.button-update{margin: 0 auto;}
}


@media only screen and (max-width: 600px) {
.header .content h3 {padding: 0;}
}

10 changes: 0 additions & 10 deletions src/css/7_themes/sunday/_component.button.scss

This file was deleted.

2 changes: 1 addition & 1 deletion src/css/7_themes/sunday/_component.header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
font-size: 24px;
text-align: center;
padding: 0 75px;
color: #fb5e2a;
color: #ffffff;
}
}
}
1 change: 0 additions & 1 deletion src/css/7_themes/sunday/sunday.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
@import "base.font";
@import "component.account-information";
@import "component.footer";
@import "component.button";
@import "component.header";
2 changes: 1 addition & 1 deletion src/css/7_themes/transactional/_base.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
body,.body{
background:#f6f6f6;
background:#eeebeb;
}

.content-container {
Expand Down
2 changes: 1 addition & 1 deletion src/css/7_themes/transactional/_sections.footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
height:auto;
}
.footer-logo-container{
padding:10px 0;
padding:0;
}

3 changes: 2 additions & 1 deletion src/css/7_themes/transactional/_sections.invoices.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
INVOICE
------------------------------------- */
.invoice {
margin: 40px auto;
margin: 15px auto;
text-align: left;
width: 100%;
}
.invoice td {
padding: 5px 0;
word-break: normal;
}
.invoice .invoice-items {
width: 100%;
Expand Down
12 changes: 6 additions & 6 deletions src/html-components/_base.html → src/html-components/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
{% block main_css %}<link href="/css/main.css" media="all" rel="stylesheet" type="text/css" />{% endblock %}
{% block responsive_css %}<link href="/css/responsive.css" media="all" data-ignore="ignore" rel="stylesheet" type="text/css" />{% endblock %}
{% block theme_css %}{% endblock %}
{% from "/html-components/_component.button.html" import button %}
{% from "/html-components/_component.caption.html" import caption %}
{% from "/html-components/_component.progressbar.html" import progressbar %}
{% from "/html-components/_component.video.html" import video %}
{% from "/html-components/_component.panel.html" import panel %}
{% from "/html-components/_component.alertHeader.html" import alertHeader %}
{% from "html-components/_component.button.html" import button %}
{% from "html-components/_component.caption.html" import caption %}
{% from "html-components/_component.progressbar.html" import progressbar %}
{% from "html-components/_component.video.html" import video %}
{% from "html-components/_component.panel.html" import panel %}
{% from "html-components/_component.alertHeader.html" import alertHeader %}
</head>
<body>
<table class="body">
Expand Down
16 changes: 8 additions & 8 deletions src/server/services/service.logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ var logs_service = {
return new Error(e);
}
});
console.log({
"loggers" : configs.sendLogs,
"message" : messageTxt
});
return {
"loggers" : configs.sendLogs,
"message" : messageTxt
};
}
console.log({
"loggers" : configs.sendLogs,
"message" : messageTxt
});
return {
"loggers" : configs.sendLogs,
"message" : messageTxt
};
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/templates/sidebar_hero/_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h1>Hi, {{ name }}</h1>
</tr>
</tbody></table>

{% block content %} {% include "/templates/sidebar_hero/_footer.html" %} {% endblock %}
{% block content %} {% include "templates/sidebar_hero/_footer.html" %} {% endblock %}
<!-- container end below -->
</td>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions src/templates/sidebar_hero/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "/html-components/_base.html" %}
{% extends "html-components/base.html" %}
{% block main_css %}<link href="../../../css/main.css" media="all" rel="stylesheet" type="text/css" />{% endblock %}
{% block theme_css %}<link href="../../../css/sidebarhero/sidebarhero.css" media="all" rel="stylesheet" type="text/css" />{% endblock %}

Expand All @@ -8,7 +8,7 @@

{% block mainContent %}

{% block header %} {% include "/templates/sidebar_hero/_header.html" %} {% endblock %}
{% block content %} {% include "/templates/sidebar_hero/_content.html" %} {% endblock %}
{% block header %} {% include "templates/sidebar_hero/_header.html" %} {% endblock %}
{% block content %} {% include "templates/sidebar_hero/_content.html" %} {% endblock %}

{% endblock %}
8 changes: 4 additions & 4 deletions src/templates/transactional/_base-messages.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% extends "/html-components/_base.html" %}
{% block main_css %}<link href="../../../css/main.css" media="all" rel="stylesheet" type="text/css" />{% endblock %}
{% block theme_css %}<link href="../../../css/transactional/transactional.css" media="all" rel="stylesheet" type="text/css" />{% endblock %}
{% extends "html-components/base.html" %}
{% block main_css %}<link href="../../../../css/main.css" media="all" rel="stylesheet" type="text/css" />{% endblock %}
{% block theme_css %}<link href="../../../../css/transactional/transactional.css" media="all" rel="stylesheet" type="text/css" />{% endblock %}

{% block responsive_css %}<link href="../../../css/responsive.css" media="all" data-ignore="ignore" rel="stylesheet" type="text/css" />{% endblock %}
{% block responsive_css %}<link href="../../../../css/responsive.css" media="all" data-ignore="ignore" rel="stylesheet" type="text/css" />{% endblock %}

{% block meta_title %}{% endblock %}

Expand Down
10 changes: 5 additions & 5 deletions src/templates/transactional/account_activation.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% extends "/html-components/_base.html" %}
{% block main_css %}<link href="../../../css/main.css" media="all" rel="stylesheet" type="text/css" />{% endblock %}
{% block theme_css %}<link href="../../../css/sunday/sunday.css" media="all" rel="stylesheet" type="text/css" />{% endblock %}
{% extends "html-components/base.html" %}
{% block main_css %}<link href="../../../../css/main.css" media="all" rel="stylesheet" type="text/css" />{% endblock %}
{% block theme_css %}<link href="../../../../css/sunday/sunday.css" media="all" rel="stylesheet" type="text/css" />{% endblock %}

{% block responsive_css %}<link href="../../../css/responsive.css" media="all" data-ignore="ignore" rel="stylesheet" type="text/css" />{% endblock %}
{% block responsive_css %}<link href="../../../../css/responsive.css" media="all" data-ignore="ignore" rel="stylesheet" type="text/css" />{% endblock %}

{% block meta_title %}Account Activation{% endblock %}

{% block mainContent %}

{% block content %} {% include "/templates/transactional/account_activation/_content.html" %} {% endblock %}
{% block content %} {% include "templates/transactional/account_activation/_content.html" %} {% endblock %}

{% endblock %}
6 changes: 3 additions & 3 deletions src/templates/transactional/account_activation/_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<tr>
<td>

{% block header %} {% include "/templates/transactional/account_activation/_header.html" %} {% endblock %}
{% block header %} {% include "templates/transactional/account_activation/_header.html" %} {% endblock %}

<table class="row account-information">
<tr>
Expand Down Expand Up @@ -49,7 +49,7 @@ <h4>{{ '{{ name }}' }} last step and you're done!</h4>
<table class="twelve columns">
<tr>
<td align="center">
{{ button('Update Account', '#', 'orange-button button-update', 'center') }}
{{ button('Update Account', '#', 'btn-blue button-update', 'center') }}
</td>
<td class="expander"></td>
</tr>
Expand All @@ -58,7 +58,7 @@ <h4>{{ '{{ name }}' }} last step and you're done!</h4>
</tr>
</table>

{% block footer %} {% include "/templates/transactional/account_activation/_footer.html" %} {% endblock %}
{% block footer %} {% include "templates/transactional/account_activation/_footer.html" %} {% endblock %}

</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/transactional/action.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "/templates/transactional/_base-messages.html" %}
{% extends "templates/transactional/_base-messages.html" %}
{% block meta_title %}Action Email{% endblock %}
{% block tableClass %}{% endblock %}
{% block content %}
Expand Down
8 changes: 6 additions & 2 deletions src/templates/transactional/alert.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "/templates/transactional/_base-messages.html" %}
{% extends "templates/transactional/_base-messages.html" %}
{% block meta_title %}Alert{% endblock %}

{% block alert %}
Expand All @@ -11,7 +11,11 @@

<p>{{ 'alert_text_2' | trans }}</p>

<p>{{ 'alert_text_3' | trans }}</p>

<br clear="all">

<p>{{ button('Upgrade my account', '#', '') }}</p>

<p>{{ 'alert_text_3' | trans }}</p>

{% endblock %}
10 changes: 5 additions & 5 deletions src/templates/transactional/receipt.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "/templates/transactional/_base-messages.html" %}
{% extends "templates/transactional/_base-messages.html" %}
{% block meta_title %}Receipt{% endblock %}
{% block tableClass %}{% endblock %}

Expand All @@ -21,19 +21,19 @@ <h5 class="center-text">Thanks for using Acme Inc.</h2>
<table class="invoice-items" cellpadding="0" cellspacing="0" width="100%" >
<tr>
<td>Service 1</td>
<td class="alignright">$ 19.99</td>
<td class="alignright">$19.99</td>
</tr>
<tr>
<td>Service 2</td>
<td class="alignright">$ 9.99</td>
<td class="alignright">$9.99</td>
</tr>
<tr>
<td>Service 3</td>
<td class="alignright">$ 4.00</td>
<td class="alignright">$4.00</td>
</tr>
<tr class="total">
<td class="alignright" width="80%">Total</td>
<td class="alignright">$ 33.98</td>
<td class="alignright">$33.98</td>
</tr>
</table>
</td>
Expand Down

0 comments on commit 3202175

Please sign in to comment.