index.jsView |
---|
1 | 1 … | var fs = require('fs'); |
2 | 2 … | var h = require('hyperscript'); |
3 | 3 … | var http = require('http') |
4 | 4 … | |
5 | | -var site = h('html', |
6 | | - h('head', |
7 | | - h('title', 'Gwen Bell · Plank Log'), |
8 | | - h('style', fs.readFileSync('walkthe.css', 'utf8')) |
9 | | - ), |
10 | | - h('body', |
11 | | - h('div.sidebar', |
12 | | - h('h1', 'Gwen Bell\'s Plank Log'), |
13 | | - h('p', 'Plank Log: Write it down before it disappears forever.'), |
14 | | - h('p', {innerHTML: '<a href="http://gwenbell.com:8807/%25Omw69K3+sY4O6bTMMyecLNgXHpckmthKXjl+1iEPEUk=.sha256" target="splank">Engineer Year</a>'}) |
| 5 … | +var viewer = "http://gwenbell.com:8807/"; |
| 6 … | + |
| 7 … | +var posts = { |
| 8 … | + "Your Own Social": "%25eKXxfaiKR+qW7WaVJirI/FDCBaktqhkGSA3qJt1THqE=.sha256", |
| 9 … | + "Engineer Year": "%25Omw69K3+sY4O6bTMMyecLNgXHpckmthKXjl+1iEPEUk=.sha256", |
| 10 … | + "Interview for Death & Tech": "%25YIZVZ6uRmJsQiwRFzqMWcOY7B6f4x1o3qgCAxuwQwpI%3D.sha256" |
| 11 … | +} |
| 12 … | + |
| 13 … | +var cash = "" |
| 14 … | + |
| 15 … | +for (var post in posts) { |
| 16 … | + cash = cash + "<a href='" + viewer + posts[post] + "' target='splank'>" + post + "</a></p><p>" |
| 17 … | +} |
| 18 … | + |
| 19 … | +http.createServer(function (req, res){ |
| 20 … | + res.end(h('html', |
| 21 … | + h('head', |
| 22 … | + h('title', 'Plank || Built with Hyperscript by Gwen Bell'), |
| 23 … | + h('style', fs.readFileSync('dotheplank.css', 'utf8')) |
15 | 24 … | ), |
16 | | - h('div.frame', |
17 | | - h('iframe', {name:'splank', href:'http://gwenbell.com'}) |
| 25 … | + h('body', |
| 26 … | + h('div.sidebar', |
| 27 … | + h('h1', 'Gwen Bell'), |
| 28 … | + h('p', 'Plank: Log it before it disappears forever.'), |
| 29 … | + h('div.posts', {innerHTML: cash}) |
| 30 … | + ), |
| 31 … | + h('div.frame', |
| 32 … | + h('iframe', {name:'splank', href:'http://gwenbell.com'}) |
| 33 … | + ) |
18 | 34 … | ) |
19 | | - ) |
20 | | -) |
21 | | - |
22 | | -http.createServer(function (req, res){ |
23 | | - res.end(site.outerHTML); |
| 35 … | + ).outerHTML) |
24 | 36 … | }).listen(1337); |