mirror of https://github.com/moparisthebest/mail
Add basic styleguide workflow with assemble
parent
1d64c2dfb0
commit
e6147e1fdc
@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
module.exports.register = function(Handlebars) {
|
||||
|
||||
// Customize this helper
|
||||
Handlebars.registerHelper('stripFileExtension', function(str) {
|
||||
var content = str.replace(/\.[^\.]*$/, '');
|
||||
return new Handlebars.SafeString(content);
|
||||
});
|
||||
|
||||
};
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
title: Styleguide
|
||||
---
|
||||
|
||||
{{#compose src="src/img/icons/*.svg"}}
|
||||
<svg role="presentation"><use xlink:href="#icon-{{stripFileExtension @filename}}" /></svg>
|
||||
{{@filename}}
|
||||
{{/compose}}
|
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ title }} | Whiteout Mail</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- inline icons have to come first, hide immediately with inline styles -->
|
||||
<div style="width: 0; height: 0; visibility: hidden;">
|
||||
{{glob "src/img/icons/all.svg"}}
|
||||
</div>
|
||||
|
||||
{{> body}}
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue