Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added project and week template with build script

  • Loading branch information...
commit c9a3a7cc814ab3e7720d6ed9d6e4e5431240bc20 0 parents
Greg Allen authored
2  .gitignore
@@ -0,0 +1,2 @@
+.DS_Store
+node_modules
7 Makefile
@@ -0,0 +1,7 @@
+install:
+ npm install juice
+
+build:
+ node build.js
+
+.PHONY: install build
18 build.js
@@ -0,0 +1,18 @@
+var juice = require('juice');
+var fs = require('fs');
+var path = require('path');
+
+var root = path.join(__dirname, 'src');
+fs.readdir(root, function(err, files) {
+ files.forEach(function(file) {
+ var fullpath = path.join(root, file);
+ fs.readFile(fullpath, 'utf8', function(err, src) {
+
+ var out = src.split('style>');
+ var html = juice(out[2], out[1]);
+ var outFile = path.join(__dirname, 'dist', file);
+ console.log(outFile + ' written');
+ fs.writeFile(outFile, html);
+ });
+ });
+});
46 dist/projects.html
@@ -0,0 +1,46 @@
+
+<table style="border-collapse: collapse; width: 600px;">
+ <tr>
+ <td valign="top" style="width: 300px; border: 1px solid #ccc; padding: 4px; valign: top;">
+ <div style="display: block; background: #f0f0f0; padding: 5px; font-weight: bold;">Project Name</div>
+ <ul>
+ <li>Feature 1</li>
+ <li>Feature 2</li>
+ </ul>
+ </td>
+ <td valign="top" style="width: 300px; border: 1px solid #ccc; padding: 4px; valign: top;">
+ <div style="display: block; background: #f0f0f0; padding: 5px; font-weight: bold;">&nbsp;</div>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" style="width: 300px; border: 1px solid #ccc; padding: 4px; valign: top;">
+ <div style="display: block; background: #f0f0f0; padding: 5px; font-weight: bold;">&nbsp;</div>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ <td valign="top" style="width: 300px; border: 1px solid #ccc; padding: 4px; valign: top;">
+ <div style="display: block; background: #f0f0f0; padding: 5px; font-weight: bold;">&nbsp;</div>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" style="width: 300px; border: 1px solid #ccc; padding: 4px; valign: top;">
+ <div style="display: block; background: #f0f0f0; padding: 5px; font-weight: bold;">&nbsp;</div>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ <td valign="top" style="width: 300px; border: 1px solid #ccc; padding: 4px; valign: top;">
+ <div style="display: block; background: #f0f0f0; padding: 5px; font-weight: bold;">&nbsp;</div>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ </tr>
+</table>
45 dist/week.html
@@ -0,0 +1,45 @@
+
+<table style="border-collapse: collapse; width: 600px;">
+ <tr>
+ <td valign="top" style="width: 300px; border: 1px solid #ccc; padding: 4px; valign: top;">
+ <small style="display: block; background: #f0f0f0; padding: 2px;">Monday</small>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ <td valign="top" style="width: 300px; border: 1px solid #ccc; padding: 4px; valign: top;">
+ <small style="display: block; background: #f0f0f0; padding: 2px;">Tuesday</small>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" style="width: 300px; border: 1px solid #ccc; padding: 4px; valign: top;">
+ <small style="display: block; background: #f0f0f0; padding: 2px;">Wednesday</small>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ <td valign="top" style="width: 300px; border: 1px solid #ccc; padding: 4px; valign: top;">
+ <small style="display: block; background: #f0f0f0; padding: 2px;">Thursday</small>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" style="width: 300px; border: 1px solid #ccc; padding: 4px; valign: top;">
+ <small style="display: block; background: #f0f0f0; padding: 2px;">Friday</small>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ <td valign="top" style="width: 300px; border: 1px solid #ccc; padding: 4px; valign: top;">
+ <small style="display: block; background: #f0f0f0; padding: 2px;">Sat/Sun</small>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ </tr>
+</table>
68 src/projects.html
@@ -0,0 +1,68 @@
+<style>
+ table {
+ border-collapse: collapse;
+ width: 600px;
+ }
+ td {
+ width: 300px;
+ }
+ td {
+ border: 1px solid #ccc;
+ padding: 4px;
+ valign: top;
+ }
+ div {
+ display: block;
+ background: #f0f0f0;
+ padding: 5px;
+ font-weight: bold;
+ }
+ p {
+ min-height: 100px;
+ }
+</style>
+<table>
+ <tr>
+ <td valign="top">
+ <div>Project Name</div>
+ <ul>
+ <li>Feature 1</li>
+ <li>Feature 2</li>
+ </ul>
+ </td>
+ <td valign="top">
+ <div>&nbsp;</div>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <div>&nbsp;</div>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ <td valign="top">
+ <div>&nbsp;</div>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <div>&nbsp;</div>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ <td valign="top">
+ <div>&nbsp;</div>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ </tr>
+</table>
66 src/week.html
@@ -0,0 +1,66 @@
+<style>
+ table {
+ border-collapse: collapse;
+ width: 600px;
+ }
+ td {
+ width: 300px;
+ }
+ td {
+ border: 1px solid #ccc;
+ padding: 4px;
+ valign: top;
+ }
+ small {
+ display: block;
+ background: #f0f0f0;
+ padding: 2px;
+ }
+ p {
+ min-height: 100px;
+ }
+</style>
+<table>
+ <tr>
+ <td valign="top">
+ <small>Monday</small>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ <td valign="top">
+ <small>Tuesday</small>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <small>Wednesday</small>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ <td valign="top">
+ <small>Thursday</small>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ <small>Friday</small>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ <td valign="top">
+ <small>Sat/Sun</small>
+ <ul>
+ <li>&nbsp;</li>
+ </ul>
+ </td>
+ </tr>
+</table>
Please sign in to comment.
Something went wrong with that request. Please try again.