- Transform "special tag" to some normal tag such as:
row
=><table><tr></tr></table>
- You can use Scss and it will inline it to tags in the html. You only have to link it to the document.
- It use .pug (was jade before) to minimise html. You'll need to read pug docs https://pugjs.org/language/tags.html
//Contain the newsletter
wrapper
//Each content need to be in a row -> column
row
//Can put few collumns
columns-align-center()
h1 Newshater
row
//columns-align-xxx will align content
columns-align-right(width="25%").
Newshater is <br/>
Really nice!
columns-align-left(width="50%")
p Newshater = newsletter (lol)
columns-align-center(width="25%")
p Newshater will be better than foundation mail framework!
row
columns.customClass Just some text
npm install
- use gulp with
gulp
orgulp watch
- Files in
src
folder will be compiled to process. - The specials tags in process will be compiled in
dist
folder. - So you can use html only with specials tags and paste it to
process
folder and rungulp
command. It's not recommended and not usefull. - In
dist
folder, it will create html and css. Css will be inline in html at this part. So you can and you should DELETE the .css file indist
folder at the end or anytime.
Left side = custom tag "=>" right side of = .pug representation like (shorter than html for explain)
Wrapper is the newsletter container. All should be in this container
wrapper
=>table
->tr
->td(align="center")
->table.wrapper
->tr
->td
Row is like a row in the popular framework
row
=>table.row
->tr
All columns have to be in a row
columns
=>td.columns
columns-align-center
=>td.columns(align="center")
columns-align-left
=>td.columns(align="left")
columns-align-right
=>td.columns(align="left")
columns-spacer
=>td.columns-spage  
;
Spacer is like a row and it should not contain content
row
=>table.spacer
->tr
->td
a-link place the target="blank" automatically
a-link
=>a.link(target="blank")
- Please don't add your custom tag to the core I'll add it after some test
- Add your custom tag in a new file. You can use
newshater/newshater-additional-components-template
to create your file. - Please don't edit the template. It should be usefull for other users.
- Import your custom tag to gulpfile.js at the top of document like
my_additional_components = require('./newshater/my-additional-components')
- Call it after
coreComponents(); //Execute all components
near the line 52 of gulpfile.js. You should add somethig likemy_additional_components()
.
- Tag to replace:
newshater.replaceEach('TagToReplace', [
tags replacement option]);
######Tags options - Replace tag by:
{tag: 'td'}
- Replace tag by few tags:
{tag: 'table'}, {tag: 'tr'}, {tag: 'td'}
Each tags can have options - Add class:
{tag: 'td', class: 'columns-spacer'}
- Add content:
{tag: 'td', content: ' '}
- Add attributes:
{tag: 'a', attributes: ['target="blank"']}
Attribute contain an array and accept few attributes
newshater.replaceEach('TagToReplace', [{tag: 'table', class: 'customClass'}, {tag: 'tr'}, {tag: 'td', attributes: ['align="center"', 'valign="bottom"'], class: 'CustomClass'}]);
#TO DO
- Add it in the
npm
depot - Make serious test in few newsletter
- Add other components
- Add more flexibility/function in the components creation
- Organise folders
- Create base template
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
I allow people to create newsletter and gain money with it.
I don't allow to use it to create a "mailbuilder" like and sell it by month or other.
Thanks, Guillaume Huard Hughes