Files: c4d2eee18be85d39027240013d4974bc653d2484 / index.js
1057 bytesRaw
1 | var fs = require('fs'); |
2 | var h = require('hyperscript'); |
3 | var http = require('http') |
4 | |
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')) |
24 | ), |
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 | ) |
34 | ) |
35 | ).outerHTML) |
36 | }).listen(1337); |
37 |
Built with git-ssb-web