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,9 +1,7 @@
<!-- Solving https://github.com/jonkemp/inline-css/issues/8 would make things nicer. -->
<link rel="stylesheet" href="base.css">
<!-- Actual template below, link tag will be removed & compiled tp inline CSS. -->
<!-- @include head.html -->
<!-- @todo gulp-inline-css can't use width in percentages, doesn't parse background-color -> bgcolor -->
<body>
<table class="main rbcc" width="100%" bgcolor="#ffffff";>
<tr class="rbcc">
<td class="main__welcome">
@ -61,3 +59,4 @@
</td>
</tr>
</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,8 +1,6 @@
<!-- Solving https://github.com/jonkemp/inline-css/issues/8 would make things nicer. -->
<link rel="stylesheet" href="base.css">
<!-- Actual template below, link tag will be removed & compiled tp inline CSS. -->
<!-- @include head.html -->
<body>
<br/>
<table class="main rbcc" width="100%" bgcolor="#ffffff";>
<tr class="sp" height="30px"></tr>
@ -22,3 +20,4 @@
</td>
</tr>
</table>
</body>

View File

@ -1,8 +1,6 @@
<!-- Solving https://github.com/jonkemp/inline-css/issues/8 would make things nicer. -->
<link rel="stylesheet" href="base.css">
<!-- Actual template below, link tag will be removed & compiled tp inline CSS. -->
<!-- @include head.html -->
<body>
<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 -->
<table class="main rbcc" width="100%" bgcolor="#ffffff";>
@ -50,3 +48,4 @@
</td>
</tr>
</table>
</body>

View File

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