diff --git a/TODO b/TODO index 48be3e6..22ece76 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,7 @@ TODO ==== - * use a template for project pages, generate static html + * promote JS links on project pages (the only ones that mention javascript so far!) * integrate github finder into project pages diff --git a/proj/batteries/index.html b/proj/batteries/index.html index c9a1447..d743c3f 100644 --- a/proj/batteries/index.html +++ b/proj/batteries/index.html @@ -2,14 +2,13 @@ - batteries for node + batteries + + + + + +← samhuri.net +

← projects

+Fork me on GitHub +

format

+

printf for JavaScript

+ + + + + + +
watchers forks
+
+
+

branches

+ +
+
+

languages

+ +
+
+

contributors

+ +
+
+
\ No newline at end of file diff --git a/proj/gitter/index.html b/proj/gitter/index.html index 7ff72b5..1b885ad 100644 --- a/proj/gitter/index.html +++ b/proj/gitter/index.html @@ -1,19 +1,188 @@ - -gitter for node - -

- GitHub client for Node, v2 API
- github project -

+ + + + gitter + + + + + + + +← samhuri.net +

← projects

+Fork me on GitHub +

gitter

+

a GitHub client for Node (v2 API)

+ + + + + + +
watchers forks
+
+
+

branches

+ +
+
+

languages

+ +
+
+

contributors

+ +
+
+
\ No newline at end of file diff --git a/proj/projects.json b/proj/projects.json new file mode 100644 index 0000000..bff211e --- /dev/null +++ b/proj/projects.json @@ -0,0 +1,6 @@ +{ "batteries" : { "description" : "a general purpose node library" } +, "format" : { "description" : "printf for JavaScript" } +, "gitter" : { "description" : "a GitHub client for Node (v2 API)" } +, "repl-edit" : { "description" : "edit Node repl commands with your text editor" } +, "strftime" : { "description" : "strftime for JavaScript" } +} diff --git a/proj/repl-edit/index.html b/proj/repl-edit/index.html index d71a34b..ddf4eb1 100644 --- a/proj/repl-edit/index.html +++ b/proj/repl-edit/index.html @@ -1,19 +1,188 @@ - -repl-edit for node - -

- Use your text editor to edit commands in Node's repl.
- github project -

+ + + + repl-edit + + + + + + + +← samhuri.net +

← projects

+Fork me on GitHub +

repl-edit

+

edit Node repl commands with your text editor

+ + + + + + +
watchers forks
+
+
+

branches

+ +
+
+

languages

+ +
+
+

contributors

+ +
+
+
\ No newline at end of file diff --git a/proj/store.js b/proj/store.js index c997e2c..68911c0 100644 --- a/proj/store.js +++ b/proj/store.js @@ -1,22 +1,33 @@ (function() { if (typeof localStorage === 'undefined') return var global = this - global.ObjectStore = { - clear: function() { - localStorage.clear() - }, - get: function(key) { - var val = localStorage.getItem(key) - return typeof val === 'string' ? JSON.parse(val) : val - }, - key: function(n) { - return localStorage.key(n) - }, - set: function(key, val) { - localStorage.setItem(key, JSON.stringify(val)) - }, - remove: function(key) { - localStorage.remove(key) + global.createObjectStore = function(namespace) { + function makeKey(k) { + return '--' + namespace + '-' + (k || '') + } + return { + clear: function() { + var i = localStorage.length + , k + , prefix = new RegExp('^' + makeKey()) + while (--i) { + k = localStorage.key(i) + if (k.match(prefix)) { + localStorage.remove(k) + } + } + }, + get: function(key) { + var val = localStorage.getItem(makeKey(key)) + return typeof val === 'string' ? JSON.parse(val) : val + }, + set: function(key, val) { + localStorage.setItem(makeKey(key), JSON.stringify(val)) + }, + remove: function(key) { + localStorage.removeItem(makeKey(key)) + } } } + global.ObjectStore = global.createObjectStore('default') }()) diff --git a/proj/strftime/index.html b/proj/strftime/index.html index e82dce9..8dddd13 100644 --- a/proj/strftime/index.html +++ b/proj/strftime/index.html @@ -1,19 +1,188 @@ - -strftime for JavaScript - -

- strftime for JavaScript
- github project -

+ + + + strftime + + + + + + + +← samhuri.net +

← projects

+Fork me on GitHub +

strftime

+

strftime for JavaScript

+ + + + + + +
watchers forks
+
+
+

branches

+ +
+
+

languages

+ +
+
+

contributors

+ +
+
+
\ No newline at end of file diff --git a/proj/template/index.html b/proj/template/index.html new file mode 100644 index 0000000..db155aa --- /dev/null +++ b/proj/template/index.html @@ -0,0 +1,203 @@ + + + + + {{name}} + + + + + + + +← samhuri.net +

← projects

+Fork me on GitHub +

{{name}}

+

{{description}}

+ + + + + + +
watchers forks
+
+
+

branches

+ +
+
+

languages

+ +
+
+

contributors

+ +
+
+
\ No newline at end of file