diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2dea411
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,2 @@
+build:
+ ./build.js
diff --git a/TODO b/TODO
index a45eb58..a93be5b 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,24 @@
TODO
====
+ * last commit date
+
+ * svg commit graph
+
+ * favicon
+
+ * offline cache
+
+ * semantic markup (section, nav, header, footer, etc)
+
+ * css3 transitions
+
* promote JS links on project pages (the only ones that mention javascript so far!)
* link to github finder on project pages
+
+ * cache github data in ie6 and ie7 (cookies?)
+
+ * fix display issues in ie6
+
+ * more gradients? any other cool visualizations?
\ No newline at end of file
diff --git a/border-radius.htc b/assets/border-radius.htc
similarity index 100%
rename from border-radius.htc
rename to assets/border-radius.htc
diff --git a/proj/forkme.png b/assets/forkme.png
similarity index 100%
rename from proj/forkme.png
rename to assets/forkme.png
diff --git a/proj/gh.png b/assets/gh.png
similarity index 100%
rename from proj/gh.png
rename to assets/gh.png
diff --git a/proj/gitter.js b/assets/gitter.js
similarity index 98%
rename from proj/gitter.js
rename to assets/gitter.js
index 248ccdf..c5c9f7d 100644
--- a/proj/gitter.js
+++ b/assets/gitter.js
@@ -14,7 +14,6 @@
, ie
if (isBrowser) {
- // fuck ie
ie = (function() {
var undef
, v = 3
@@ -48,7 +47,7 @@
ctor.prototype.__proto__ = superCtor.prototype
ctor.prototype.constructor = ctor
}
- } else { // fuck ie
+ } else {
var __hasProp = Object.prototype.hasOwnProperty
inherits = function(child, parent) {
for (var key in parent) {
@@ -209,7 +208,7 @@
var dataProp = '_' + prop
, fn = 'get' + titleCaseFirst(prop)
, processData = function(d) {
- if (ie < 9) { // fuck ie
+ if (ie < 9) {
this[dataProp] = camelize(unpack(d))
} else {
getter(this, dataProp, function() { return camelize(unpack(d))})
@@ -426,7 +425,7 @@
var has = Object.prototype.hasOwnProperty;
// ES5 15.2.3.6
- if (!Object.defineProperty || ie === 8) { // fuck ie
+ if (!Object.defineProperty || ie === 8) {
Object.defineProperty = function(object, property, descriptor) {
if (typeof descriptor == "object" && object.__defineGetter__) {
if (has.call(descriptor, "value")) {
@@ -450,7 +449,7 @@
// ES5 15.2.3.14
// http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
- if (!Object.keys) { // fuck ie
+ if (!Object.keys) {
(function() {
var hasDontEnumBug = true,
dontEnums = [
@@ -509,7 +508,7 @@
}
// ES5 15.4.4.18
- if (!Array.prototype.forEach) { // fuck ie
+ if (!Array.prototype.forEach) {
Array.prototype.forEach = function(block, thisObject) {
var len = this.length >>> 0;
for (var i = 0; i < len; i++) {
@@ -522,7 +521,7 @@
// ES5 15.4.4.19
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
- if (!Array.prototype.map) { // fuck ie
+ if (!Array.prototype.map) {
Array.prototype.map = function(fun /*, thisp*/) {
var len = this.length >>> 0;
if (typeof fun != "function")
@@ -540,7 +539,7 @@
}
// ES5 15.4.4.20
- if (!Array.prototype.filter) { // fuck ie
+ if (!Array.prototype.filter) {
Array.prototype.filter = function (block /*, thisp */) {
var values = [];
var thisp = arguments[1];
@@ -553,7 +552,7 @@
// ES5 15.4.4.21
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
- if (!Array.prototype.reduce) { // fuck ie
+ if (!Array.prototype.reduce) {
Array.prototype.reduce = function(fun /*, initial*/) {
var len = this.length >>> 0;
if (typeof fun != "function")
diff --git a/ie7.css b/assets/ie7.css
similarity index 100%
rename from ie7.css
rename to assets/ie7.css
diff --git a/proj/proj.css b/assets/proj.css
similarity index 87%
rename from proj/proj.css
rename to assets/proj.css
index f469fee..65a61e1 100644
--- a/proj/proj.css
+++ b/assets/proj.css
@@ -8,7 +8,8 @@
; -moz-border-radius: 20px
; -webkit-border-radius: 20px
; border-radius: 20px
- ; behavior: url(../../border-radius.htc) /* fuck ie */
+ ; behavior: url(../assets/border-radius.htc)
+ ; behavior: url(../../assets/border-radius.htc)
}
h4 { margin: 0.5em 0 0.7em }
@@ -18,7 +19,7 @@ h4 { margin: 0.5em 0 0.7em }
; width: 31%
; max-width: 400px
; float: left
- ; display: inline /* fuck ie */
+ ; display: inline
; padding: 0.5em 0.2em
; border-left: dashed 1px #aaa
}
diff --git a/proj/proj.js b/assets/proj.js
similarity index 100%
rename from proj/proj.js
rename to assets/proj.js
diff --git a/proj/spinner.gif b/assets/spinner.gif
similarity index 100%
rename from proj/spinner.gif
rename to assets/spinner.gif
diff --git a/proj/store.js b/assets/store.js
similarity index 98%
rename from proj/store.js
rename to assets/store.js
index 1c845cb..02aa969 100644
--- a/proj/store.js
+++ b/assets/store.js
@@ -30,7 +30,7 @@
}
}
global.ObjectStore = global.createObjectStore('default')
- } else { // fuck ie
+ } else {
// Create an in-memory store, should probably fall back to cookies
global.createObjectStore = function() {
var store = {}
diff --git a/style.css b/assets/style.css
similarity index 85%
rename from style.css
rename to assets/style.css
index b0e30d9..a2d7f3d 100644
--- a/style.css
+++ b/assets/style.css
@@ -49,14 +49,8 @@ ul { text-align: center
; -moz-border-radius: 20px
; -webkit-border-radius: 20px
; border-radius: 20px
-
- /* ie searches for this path relative to the referencing file,
- * not this file as any sane implementation would do.
- *
- * fuck ie
- */
- ; behavior: url(border-radius.htc)
- ; behavior: url(../border-radius.htc)
+ ; behavior: url(assets/border-radius.htc)
+ ; behavior: url(../assets/border-radius.htc)
}
li { display: inline
@@ -68,11 +62,10 @@ li { display: inline
li:after { content: ' •' }
li:last-child:after { content: '' }
-li.ie-bullet { display: none } /* fuck ie */
-li.last:after { content: '' } /* fuck ie */
li a { padding: 5px
; text-shadow: #999 5px 5px 5px
+ ; -webkit-transition: all 0.5s ease-out
}
li a:visited { color: #227 }
@@ -82,6 +75,20 @@ li a:active { color: #000
; border-bottom: dashed 1px #000
}
+ul#projects { width: 40%
+ ; max-width: 400px
+ }
+
+ul#projects li { display: block
+ ; line-height: 1.8em
+ }
+
+li.ie-bullet,
+ul#projects li.ie-bullet { display: none }
+
+li.last:after,
+ul#projects li:after { content: '' }
+
#sjs { text-align: center
; font-size: 1.2em
}
@@ -124,10 +131,11 @@ td:nth-child(2) { padding: 0 10px }
}
li { display: block
- ; margin: 0.7em 0.7em 1em
; font-size: 1.5em
+ ; line-height: 1.6em
}
- li:after { content: '' }
+
+ li:after { content: '' }
}
/* iPhone */
diff --git a/build.js b/build.js
new file mode 100755
index 0000000..659ff6e
--- /dev/null
+++ b/build.js
@@ -0,0 +1,76 @@
+#!/usr/bin/env node
+
+var constants
+ , fs = require('fs')
+ , path = require('path')
+ , mustache = require('mustache')
+ , EEXIST
+ , ENOENT
+ , _template
+ , _n = 0
+
+try {
+ constants = require('constants')
+} catch (e) {
+ constants = process
+}
+EEXIST = constants.EEXIST
+ENOENT = constants.ENOENT
+
+function main() {
+ fs.readFile(path.join(__dirname, 'templates', 'proj', 'proj', 'index.html'), function(err, html) {
+ if (err) throw err
+ _template = html.toString()
+ fs.readFile(path.join(__dirname, 'projects.json'), function(err, json) {
+ if (err) throw err
+ var projects = JSON.parse(json)
+ , names = Object.keys(projects)
+ , index = path.join(__dirname, 'proj', 'index.html')
+
+ // write project index
+ fs.readFile(path.join(__dirname, 'templates', 'proj', 'index.html'), function(err, tpl) {
+ if (err) throw err
+ fs.mkdir(path.join(__dirname, 'proj'), 0775, function(err) {
+ if (err && err.errno !== EEXIST) throw err
+ fs.unlink(index, function(err) {
+ if (err && err.errno !== ENOENT) throw err
+ var vals = { names: names.slice(0, -1)
+ , lastName: names[names.length-1]
+ }
+ , html = mustache.to_html(tpl.toString(), vals)
+ fs.writeFile(index, html, function(err) {
+ if (err) throw err
+ console.log('* (project index)')
+ })
+ })
+ })
+ })
+
+ // write project pages
+ names.forEach(function(name) {
+ _n += 1
+ buildProject(name, projects[name])
+ })
+ })
+ })
+}
+
+function buildProject(name, project) {
+ var dir = path.join(__dirname, 'proj', name)
+ , index = path.join(dir, 'index.html')
+ fs.mkdir(dir, 0775, function(err) {
+ if (err && err.errno !== EEXIST) throw err
+ fs.unlink(index, function(err) {
+ if (err && err.errno !== ENOENT) throw err
+ project.name = name
+ fs.writeFile(index, mustache.to_html(_template, project), function(err) {
+ if (err) console.error('error: ', err.message)
+ _n -= 1
+ console.log('* ' + name + (err ? ' (failed)' : ''))
+ if (_n === 0) console.log('done')
+ })
+ })
+ })
+}
+
+if (module == require.main) main()
diff --git a/index.html b/index.html
index 96ed7a3..f0c08b6 100644
--- a/index.html
+++ b/index.html
@@ -3,10 +3,9 @@
samhuri.net
-
-
+
-
-
-
-
+
+
+
-
+
batteries
a general purpose node library
- watchers |
+ watchers |
— |
- forks |
+ forks |
branches
-

+
languages
-

+
contributors
-

+
diff --git a/proj/bin/index.html b/proj/bin/index.html
new file mode 100644
index 0000000..7bdcf78
--- /dev/null
+++ b/proj/bin/index.html
@@ -0,0 +1,55 @@
+
+
+
+
+ bin :: samhuri.net
+
+
+
+
+
+
+
+
+
+
+
+bin
+~/bin
+
+
+ watchers |
+ — |
+ forks |
+
+
+
+
+
branches
+

+
+
+
languages
+

+
+
+
contributors
+

+
+
+
+
+ @_sjs
+
\ No newline at end of file
diff --git a/proj/build.js b/proj/build.js
deleted file mode 100755
index 227abd3..0000000
--- a/proj/build.js
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/env node
-
-var constants
- , fs = require('fs')
- , path = require('path')
- , mustache = require('mustache')
- , EEXIST
- , ENOENT
- , _template
- , _n = 0
-
-try {
- constants = require('constants')
-} catch (e) {
- constants = process
-}
-EEXIST = constants.EEXIST
-ENOENT = constants.ENOENT
-
-function main() {
- fs.readFile(path.join(__dirname, 'template', 'index.html'), function(err, html) {
- if (err) throw err
- _template = html.toString()
- fs.readFile(path.join(__dirname, 'projects.json'), function(err, json) {
- if (err) throw err
- var projects = JSON.parse(json)
- Object.keys(projects).forEach(function(name) {
- _n += 1
- buildProject(name, projects[name])
- })
- })
- })
-}
-
-function buildProject(name, project) {
- var dir = path.join(__dirname, name)
- , index = path.join(dir, 'index.html')
- fs.mkdir(dir, 0775, function(err) {
- if (err && err.errno !== EEXIST) throw err
- fs.unlink(index, function(err) {
- if (err && err.errno !== ENOENT) throw err
- project.name = name
- fs.writeFile(index, mustache.to_html(_template, project), function(err) {
- _n -= 1
- console.log('* ' + name)
- if (_n === 0) console.log('done')
- })
- })
- })
-}
-
-if (module == require.main) main()
diff --git a/proj/cheat.el/index.html b/proj/cheat.el/index.html
new file mode 100644
index 0000000..316ddf9
--- /dev/null
+++ b/proj/cheat.el/index.html
@@ -0,0 +1,55 @@
+
+
+
+
+ cheat.el :: samhuri.net
+
+
+
+
+
+
+
+
+
+
+
+cheat.el
+cheat from emacs
+
+
+ watchers |
+ — |
+ forks |
+
+
+
+
+
branches
+

+
+
+
languages
+

+
+
+
contributors
+

+
+
+
+
+ @_sjs
+
\ No newline at end of file
diff --git a/proj/compiler/index.html b/proj/compiler/index.html
new file mode 100644
index 0000000..d345819
--- /dev/null
+++ b/proj/compiler/index.html
@@ -0,0 +1,55 @@
+
+
+
+
+ compiler :: samhuri.net
+
+
+
+
+
+
+
+
+
+
+
+compiler
+an x86 compiler written in ruby
+
+
+ watchers |
+ — |
+ forks |
+
+
+
+
+
branches
+

+
+
+
languages
+

+
+
+
contributors
+

+
+
+
+
+ @_sjs
+
\ No newline at end of file
diff --git a/proj/config/index.html b/proj/config/index.html
new file mode 100644
index 0000000..a0d540d
--- /dev/null
+++ b/proj/config/index.html
@@ -0,0 +1,55 @@
+
+
+
+
+ config :: samhuri.net
+
+
+
+
+
+
+
+
+
+
+
+config
+important dot files (zsh, emacs, vim, screen)
+
+
+ watchers |
+ — |
+ forks |
+
+
+
+
+
branches
+

+
+
+
languages
+

+
+
+
contributors
+

+
+
+
+
+ @_sjs
+
\ No newline at end of file
diff --git a/proj/format/index.html b/proj/format/index.html
index 6ebc17f..7934dd3 100644
--- a/proj/format/index.html
+++ b/proj/format/index.html
@@ -3,8 +3,8 @@
format :: samhuri.net
-
-
+
+
-
-
-
-
+
+
+
-
+
format
printf for JavaScript
- watchers |
+ watchers |
— |
- forks |
+ forks |
branches
-

+
languages
-

+
contributors
-

+
diff --git a/proj/gitter/index.html b/proj/gitter/index.html
index b7f827b..a43a349 100644
--- a/proj/gitter/index.html
+++ b/proj/gitter/index.html
@@ -3,8 +3,8 @@
gitter :: samhuri.net
-
-
+
+
-
-
-
-
+
+
+
-
+
gitter
a GitHub client for Node (v2 API)
- watchers |
+ watchers |
— |
- forks |
+ forks |
branches
-

+
languages
-

+
contributors
-

+
diff --git a/proj/index.html b/proj/index.html
index 75cb0c8..335f895 100644
--- a/proj/index.html
+++ b/proj/index.html
@@ -3,10 +3,10 @@
projects :: samhuri.net
-
-
+
+
+
+
+
+
+
+
+projects
+
+
+
+
+
+
+ projects |
+ — |
+ followers |
+
+
+ watching projects
+ | — |
+ following people |
+
+
+
+ @_sjs
+
+
+
+
diff --git a/proj/template/index.html b/templates/proj/proj/index.html
similarity index 63%
rename from proj/template/index.html
rename to templates/proj/proj/index.html
index f3718ac..6642586 100644
--- a/proj/template/index.html
+++ b/templates/proj/proj/index.html
@@ -3,8 +3,8 @@
{{name}} :: samhuri.net
-
-
+
+
-
-
-
-
+
+
+
-
+
{{name}}
{{description}}
- watchers |
+ watchers |
— |
- forks |
+ forks |
branches
-

+
languages
-

+
contributors
-

+