transacemail
Version:
Transactional Email & Templated Email for NodeJS
292 lines (254 loc) • 18.9 kB
text/jade
mixin iForSymbolType(symbol)
i(class=["alert", "alert-"+(symbol.type === "function" || symbol.type === "method" ? "info":"success")])
mixin labelForSymbolType(symbol)
div(class=["label", "label-"+(symbol.gtype === "function" || symbol.gtype === "method" ? "info":"success"), "radius", "ctx-type"])= symbol.ctx.type
//- alert alert-warning
doctype 5
html
head
meta(name='viewport', content='width=device-width', charset='utf-8')
title Node TransacEmail - Transactional Email & Templated Email for NodeJS done right
link(rel="stylesheet", href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css")
link(rel="stylesheet", href="http://getbootstrap.com/2.3.2/assets/css/bootstrap-responsive.css")
link(rel="stylesheet", href="http://getbootstrap.com/2.3.2/assets/css/docs.css")
style
body > .navbar .brand {
float:left;
text-shadow: rgba(255, 255, 255, 0.0980392) 0px 1px 0px, rgba(255, 255, 255, 0.4) 0px 0px 30px;
color: white;
margin-left:0px;
font-weight:normal;
}
.bs-docs-sidenav i{
width: 8px;
height: 8px;
padding: 0px;
margin: 0px;
display: inline-block;
margin-right:0.5em;
}
section#opt{text-align:center}
code[class*="language-"],pre[class*="language-"]{color:black;text-shadow:0 1px white;font-family:Consolas,Monaco,'Andale Mono',monospace;direction:ltr;text-align:left;white-space:pre;word-spacing:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*="language-"]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*="language-"],pre[class*="language-"]{background:#f5f2f0}:not(pre)>code[class*="language-"]{padding:.1em;border-radius:.3em}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:slategray}.token.punctuation{color:#999}.namespace{opacity:.7}.token.property,.token.tag,.token.boolean,.token.number{color:#905}.token.selector,.token.attr-name,.token.string{color:#690}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string{color:#a67f59;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.regex,.token.important{color:#e90}.token.important{font-weight:bold}.token.entity{cursor:help}
div.description {margin: 14px 0; padding-top: 14px; border-bottom:1px solid #eee; }
.tags {}
.ctx-type {
display:inline-block;
margin-right:0.5em;
//- float:right; margin-top:8px
}
.popover {width:510px;}
.popover img{width:500px; min-height:239px;}
@import url(http://fonts.googleapis.com/css?family=Pacifico);
.navbar-inverse .nav.sponsored > li.inter > p{
color:#999;
padding:10px 0.5em 0 0.5em;
}
.navbar-inverse .nav > li.sponsor{
transition:all 200ms linear;
}
.navbar-inverse .nav > li.sponsor:hover{
transform:rotate(10deg);
transition:all 100ms linear;
}
.navbar-inverse .nav > li.sponsor-bringr{
background-color: #ffffff;
}
.navbar-inverse .nav > li.sponsor-bringr > a{
font-family: "Pacifico";
font-size: 17px;
line-height: 19px;
color: black;
}
.navbar-inverse .nav > li.sponsor-redsmin{
background-image: radial-gradient(50% 100%,#C91E13 0,#8E1509 100%);
}
.navbar-inverse .nav > li.sponsor-redsmin a{
color:white;
line-height: 19px;
}
body(data-spy="scroll", data-target=".scrollspy")
div.navbar.navbar-inverse.navbar-fixed-top
div.navbar-inner
div.container
a.brand Node TransacEmail
div.nav-collapse.collapse
ul.nav.pull-right.sponsored
li.inter
p Development sponsored by
li.sponsor.sponsor-bringr
a.bringr(href='http://bringr.net/?btt', data-placement="bottom", title="Outil d'analyse des réseaux sociaux") Bringr
li.inter
p and
li.sponsor.sponsor-redsmin
a.redsmin(href='https://redsmin.com/?btt', data-placement="bottom", title="Fully featured GUI for Redis") Redsmin
header.jumbotron.subhead#overview
div.container
h1 Node TransacEmail
p.lead Transactional Email & Templated Email for NodeJS done right
.container
.row
.span3.bs-docs-sidebar
ul.nav.nav-list.bs-docs-sidenav.affix-top
each file in files
li(class=(file.name !== currentName ? "":"active"))
a(href=file.targetName) #{file.name}
.scrollspy
ul.nav.nav-list.bs-docs-sidenav.affix-top
li
a(href='#what') What/Getting Started/Who ?
each symbol in symbols
li
if name === currentName
a(href='#'+symbol.name)
mixin iForSymbolType(symbol) #{symbol.name}
else
a(href=symbol.targetFile+'#'+symbol.name)
mixin iForSymbolType(symbol) #{symbol.name}
.span9
section#opt
iframe(src="http://ghbtns.com/github-btn.html?user=fgribreau&repo=node-transacemail&type=watch&count=true&size=large", allowtransparency="true", frameborder="0", scrolling="0", width="140", height="30")
iframe(src="http://ghbtns.com/github-btn.html?user=fgribreau&repo=node-transacemail&type=fork&count=true&size=large", allowtransparency="true", frameborder="0", scrolling="0", width="140", height="30")
iframe(src="http://ghbtns.com/github-btn.html?user=fgribreau&repo=node-transacemail&type=follow&count=true&size=large", allowtransparency="true", frameborder="0", scrolling="0", width="300", height="30")
a(href="https://twitter.com/intent/tweet?button_hashtag=transacemail&text=node-transacemail%20-%20Transactional%20Email%20%26%20Templated%20Email%20for%20NodeJS%20done%20right%20/by%20@fgribreau", class="twitter-hashtag-button", data-size="large", data-related="FGRibreau", data-url="http://fgribreau.github.com/node-transacemail/docs/node-transacemail.js.html") Share on Twitter
section#what
.page-header
h1 What provides Node-TransacEmail ?
ul
p Clear Separation of Concerns
p Supports any Template Engine (e.g.
a(href="http://underscorejs.org/#template") Underscore Templates
| )
ul
li
code Mailing.compile(mailDir, {templateEngine: engine});
p Supports any Mail Provider (e.g
a(href="http://github.com/FGRibreau/node-transacemail-mandrill") Mandrill
| )
ul
li
code Mailing.compile(mailDir, {mailProvider: require('transacemail-mandrill')('apikey')});
p Supports any number of CSS files for each email. CSS is automatically inlined for free thanks to
a(href="https://github.com/LearnBoost/juice") Juice
p Supports any file extension
ul
li
code Mailing.Mail.DEFAULT_HTML_EXT = ".html";
li
code Mailing.Mail.DEFAULT_TEXT_EXT = ".text";
li
code Mailing.Mail.DEFAULT_META_EXT = ".meta.js";
section#demo
.page-header
h1 Getting Started
p
a(href="https://github.com/FGRibreau/node-transacemail/tree/master/example") See the working example code
| . We accept pull-requests!
section#who
.page-header
h1 Who are you?
p My name is Francois-Guillaume Ribreau, I
a(href="http://twitter.com/FGRibreau") discover, share (twitter)
| ,
a(href="http://blog.fgribreau.com/") learn (blog)
| ,
a(href="https://github.com/FGRibreau?tab=repositories") code (github)
| ,
a.bringr(href="http://bringr.net", data-placement='top', title="Outil d'analyse des réseaux sociaux") d
a.redsmin(href="http://redsmin.com", data-placement='top', title="Fully featured GUI for Redis") o
|.
- if (dox.length > 0)
section#who
.page-header
h1 Documentation
each symbol in dox
section(id=symbol.ctx.name)
h1= symbol.ctx.name
if !symbol.gtype && symbol.type
p
div(class=["label", "label-inverse", "radius", "ctx-type"])= symbol.type
else
p
mixin labelForSymbolType(symbol)
if symbol.ctx.string
span= symbol.ctx.string
if symbol.return
| ->
span= symbol.return
if symbol.hasParams
table.table.table-bordered.table-striped
thead
tr
th(style="width:20%") Option name
th(style="width:20%") Type
th Description
tbody
each tag in symbol.tags
if tag.type == 'param'
tr
td= tag.name
td= tag.types
td= tag.description
.description !{symbol.description.full} !{symbol.description.extra}
pre
code.language-javascript
= symbol.code
footer.footer
div.container
p Documentation generated with
a(href="https://github.com/FGRibreau/doxx") Doxx
| created by
a.twitter-follow-button(href='https://twitter.com/FGRibreau',data-show-count='false') Francois-Guillaume Ribreau
p Doxx is sponsored by
a.bringr(href='http://bringr.net/?btt', data-placement='top', title="Outil d'analyse des réseaux sociaux") Bringr
| and
a.redsmin(href='https://redsmin.com/?btt', data-placement='top', title="Fully featured GUI for Redis") Redsmin
p Theme borrowed from Twitter Bootstrap
script(src="http://platform.twitter.com/widgets.js")
script(src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js")
script(src="http://leaverou.github.com/prefixfree/prefixfree.js")
script(src="http://getbootstrap.com/2.3.2/assets/js/bootstrap-transition.js")
script(src="http://getbootstrap.com/2.3.2/assets/js/bootstrap-scrollspy.js")
script(src="http://getbootstrap.com/2.3.2/assets/js/bootstrap-dropdown.js")
script(src="http://getbootstrap.com/2.3.2/assets/js/bootstrap-collapse.js")
script(src="http://getbootstrap.com/2.3.2/assets/js/bootstrap-affix.js")
script(src="http://getbootstrap.com/2.3.2/assets/js/bootstrap-tooltip.js")
script(src="http://getbootstrap.com/2.3.2/assets/js/bootstrap-popover.js")
script
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1844157-4']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
script
/**
* Prism: Lightweight, robust, elegant syntax highlighting
* MIT license http://www.opensource.org/licenses/mit-license.php/
* @author Lea Verou http://lea.verou.me
*/(function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.util.clone(e[i]));return r;case"Array":return e.slice()}return e}},languages:{extend:function(e,n){var r=t.util.clone(t.languages[e]);for(var i in n)r[i]=n[i];return r},insertBefore:function(e,n,r,i){i=i||t.languages;var s=i[e],o={};for(var u in s)if(s.hasOwnProperty(u)){if(u==n)for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);o[u]=s[u]}return i[e]=o},DFS:function(e,n){for(var r in e){n.call(e,r,e[r]);t.util.type(e)==="Object"&&t.languages.DFS(e[r],n)}}},highlightAll:function(e,n){var r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');for(var i=0,s;s=r[i++];)t.highlightElement(s,e===!0,n)},highlightElement:function(r,i,s){var o,u,a=r;while(a&&!e.test(a.className))a=a.parentNode;if(a){o=(a.className.match(e)||[,""])[1];u=t.languages[o]}if(!u)return;r.className=r.className.replace(e,"").replace(/\s+/g," ")+" language-"+o;a=r.parentNode;/pre/i.test(a.nodeName)&&(a.className=a.className.replace(e,"").replace(/\s+/g," ")+" language-"+o);var f=r.textContent;if(!f)return;f=f.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\u00a0/g," ");var l={element:r,language:o,grammar:u,code:f};t.hooks.run("before-highlight",l);if(i&&self.Worker){var c=new Worker(t.filename);c.onmessage=function(e){l.highlightedCode=n.stringify(JSON.parse(e.data));l.element.innerHTML=l.highlightedCode;s&&s.call(l.element);t.hooks.run("after-highlight",l)};c.postMessage(JSON.stringify({language:l.language,code:l.code}))}else{l.highlightedCode=t.highlight(l.code,l.grammar);l.element.innerHTML=l.highlightedCode;s&&s.call(r);t.hooks.run("after-highlight",l)}},highlight:function(e,r){return n.stringify(t.tokenize(e,r))},tokenize:function(e,n){var r=t.Token,i=[e],s=n.rest;if(s){for(var o in s)n[o]=s[o];delete n.rest}e:for(var o in n){if(!n.hasOwnProperty(o)||!n[o])continue;var u=n[o],a=u.inside,f=!!u.lookbehind||0;u=u.pattern||u;for(var l=0;l<i.length;l++){var c=i[l];if(i.length>e.length)break e;if(c instanceof r)continue;u.lastIndex=0;var h=u.exec(c);if(h){f&&(f=h[1].length);var p=h.index-1+f,h=h[0].slice(f),d=h.length,v=p+d,m=c.slice(0,p+1),g=c.slice(v+1),y=[l,1];m&&y.push(m);var b=new r(o,a?t.tokenize(h,a):h);y.push(b);g&&y.push(g);Array.prototype.splice.apply(i,y)}}}return i},hooks:{all:{},add:function(e,n){var r=t.hooks.all;r[e]=r[e]||[];r[e].push(n)},run:function(e,n){var r=t.hooks.all[e];if(!r||!r.length)return;for(var i=0,s;s=r[i++];)s(n)}}},n=t.Token=function(e,t){this.type=e;this.content=t};n.stringify=function(e){if(typeof e=="string")return e;if(Object.prototype.toString.call(e)=="[object Array]"){for(var r=0;r<e.length;r++)e[r]=n.stringify(e[r]);return e.join("")}var i={type:e.type,content:n.stringify(e.content),tag:"span",classes:["token",e.type],attributes:{}};i.type=="comment"&&(i.attributes.spellcheck="true");t.hooks.run("wrap",i);var s="";for(var o in i.attributes)s+=o+'="'+(i.attributes[o]||"")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'" '+s+">"+i.content+"</"+i.tag+">"};if(!self.document){self.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,i=n.code;self.postMessage(JSON.stringify(t.tokenize(i,t.languages[r])));self.close()},!1);return}var r=document.getElementsByTagName("script");r=r[r.length-1];if(r){t.filename=r.src;document.addEventListener&&!r.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)}})();;
Prism.languages.markup={comment:/<!--[\w\W]*?--(>|>)/g,prolog:/<\?.+?\?>/,doctype:/<!DOCTYPE.+?>/,cdata:/<!\[CDATA\[[\w\W]+?]]>/i,tag:{pattern:/<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|\w+))?\s*)*\/?>/gi,inside:{tag:{pattern:/^<\/?[\w:-]+/i,inside:{punctuation:/^<\/?/,namespace:/^[\w-]+?:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,inside:{punctuation:/=|>|"/g}},punctuation:/\/?>/g,"attr-name":{pattern:/[\w:-]+/g,inside:{namespace:/^[\w-]+?:/}}}},entity:/&#?[\da-z]{1,8};/gi};Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))});;
Prism.languages.css={comment:/\/\*[\w\W]*?\*\//g,atrule:/@[\w-]+?(\s+[^;{]+)?(?=\s*{|\s*;)/gi,url:/url\((["']?).*?\1\)/gi,selector:/[^\{\}\s][^\{\}]*(?=\s*\{)/g,property:/(\b|\B)[a-z-]+(?=\s*:)/ig,string:/("|')(\\?.)*?\1/g,important:/\B!important\b/gi,ignore:/&(lt|gt|amp);/gi,punctuation:/[\{\};:]/g};Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{style:{pattern:/(<|<)style[\w\W]*?(>|>)[\w\W]*?(<|<)\/style(>|>)/ig,inside:{tag:{pattern:/(<|<)style[\w\W]*?(>|>)|(<|<)\/style(>|>)/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.css}}});;
Prism.languages.clike={comment:{pattern:/(^|[^\\])(\/\*[\w\W]*?\*\/|\/\/.*?(\r?\n|$))/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|catch|finally|null|break|continue)\b/g,"boolean":/\b(true|false)\b/g,number:/\b-?(0x)?\d*\.?[\da-f]+\b/g,operator:/[-+]{1,2}|!|=?<|=?>|={1,2}|(&){1,2}|\|?\||\?|\*|\//g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g};;
Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(var|let|if|else|while|do|for|return|in|instanceof|function|new|with|typeof|try|catch|finally|null|break|continue)\b/g,number:/\b(-?(0x)?\d*\.?[\da-f]+|NaN|-?Infinity)\b/g});Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,lookbehind:!0}});Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/(<|<)script[\w\W]*?(>|>)[\w\W]*?(<|<)\/script(>|>)/ig,inside:{tag:{pattern:/(<|<)script[\w\W]*?(>|>)|(<|<)\/script(>|>)/ig,inside:Prism.languages.markup.tag.inside},rest:Prism.languages.javascript}}});;
// App js
script
$(function(){
var $window = $(window);
$('.bs-docs-sidenav').affix({
offset: {
top: function () { return $window.width() <= 980 ? 480 : 400 }
, bottom: 127
}
});
var c = {trigger:'hover', html:true};
$('.bringr').popover($.extend({
title:"Outil d'analyse des réseaux sociaux",
content:"<img src=\"http://farm9.staticflickr.com/8358/8376503257_0f71beb262.jpg\"/>"
}, c));
$('.redsmin').popover($.extend({
title:"Fully featured GUI for Redis",
content:"<img src=\"http://farm9.staticflickr.com/8475/8376696703_c96da066e3.jpg\"/>"
}, c));
})