Include head using preprocess

This commit is contained in:
Dan Mindru 2015-10-19 02:15:26 +02:00
parent 543fb023cc
commit 0b69a7a7c2
5 changed files with 143 additions and 128 deletions

View File

@ -1,10 +1,8 @@
<!-- Solving https://github.com/jonkemp/inline-css/issues/8 would make things nicer. --> <!-- @include head.html -->
<link rel="stylesheet" href="base.css">
<!-- Actual template below, link tag will be removed & compiled tp inline CSS. -->
<!-- @todo gulp-inline-css can't use width in percentages, doesn't parse background-color -> bgcolor --> <!-- @todo gulp-inline-css can't use width in percentages, doesn't parse background-color -> bgcolor -->
<table class="main rbcc" width="100%" bgcolor="#ffffff";> <body>
<table class="main rbcc" width="100%" bgcolor="#ffffff";>
<tr class="rbcc"> <tr class="rbcc">
<td class="main__welcome"> <td class="main__welcome">
<b><!-- @echo welcome --></b> <b><!-- @echo welcome --></b>
@ -60,4 +58,5 @@
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
</body>

18
src/fadeit/head.html Normal file
View File

@ -0,0 +1,18 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- Solving https://github.com/jonkemp/inline-css/issues/8 would make things nicer. -->
<link rel="stylesheet" href="base.css">
</head>
<style type="text/css">
img {
max-width: 100%;
}
body {
-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em;
}
</style>

View File

@ -1,10 +1,8 @@
<!-- Solving https://github.com/jonkemp/inline-css/issues/8 would make things nicer. --> <!-- @include head.html -->
<link rel="stylesheet" href="base.css">
<!-- Actual template below, link tag will be removed & compiled tp inline CSS. --> <body>
<br/>
<br/> <table class="main rbcc" width="100%" bgcolor="#ffffff";>
<table class="main rbcc" width="100%" bgcolor="#ffffff";>
<tr class="sp" height="30px"></tr> <tr class="sp" height="30px"></tr>
<tr class="rbcc"> <tr class="rbcc">
@ -21,4 +19,5 @@
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
</body>

View File

@ -1,11 +1,9 @@
<!-- Solving https://github.com/jonkemp/inline-css/issues/8 would make things nicer. --> <!-- @include head.html -->
<link rel="stylesheet" href="base.css">
<!-- Actual template below, link tag will be removed & compiled tp inline CSS. --> <body>
<br/> <!-- <br/> Makes it easier to add text when composing -->
<br/> <!-- <br/> Makes it easier to add text when composing --> <!-- @todo gulp-inline-css can't use width in percentages, doesn't parse background-color -> bgcolor -->
<!-- @todo gulp-inline-css can't use width in percentages, doesn't parse background-color -> bgcolor --> <table class="main rbcc" width="100%" bgcolor="#ffffff";>
<table class="main rbcc" width="100%" bgcolor="#ffffff";>
<tr class="sp" height="30px"></tr> <tr class="sp" height="30px"></tr>
<tr class="rbcc"> <tr class="rbcc">
@ -49,4 +47,5 @@
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
</body>

View File

@ -8,7 +8,7 @@ var gulp = require('gulp'),
function buildTask(options){ function buildTask(options){
gulp.task('build', function() { gulp.task('build', function() {
gulp.src('./src/**/*.html') gulp.src(['./src/**/*.html', '!./src/**/head.html'])
.pipe(preprocess({ .pipe(preprocess({
context: { context: {
signature: 'Med venlig hilsen / best regards,', signature: 'Med venlig hilsen / best regards,',