diff --git a/assets/css/mobile.css b/assets/css/mobile.css index c221dc3..8714d97 100644 --- a/assets/css/mobile.css +++ b/assets/css/mobile.css @@ -38,6 +38,8 @@ #forkme { display: none } + ul.nav { width: 80% } + ul.nav li { font-size: 1.4em ; line-height: 1.6em } @@ -108,7 +110,7 @@ ; font-size: 1em } - #stats { font-size: 1em } + #stats { font-size: 1em; margin-bottom: 0.5em } footer { margin: 0 ; padding: 0.5em 0 diff --git a/bin/projects.js b/bin/projects.js index 71c7f38..65f0c31 100755 --- a/bin/projects.js +++ b/bin/projects.js @@ -23,10 +23,9 @@ function main() { ctx.template = html.toString() fs.readFile(projectFile, function(err, json) { if (err) throw err - var projects = JSON.parse(json) - , names = Object.keys(projects) + var projects = JSON.parse(json).projects , index = path.join(targetDir, 'index.html') - + // write project index fs.readFile(path.join(templateDir, 'index.html'), function(err, tpl) { if (err) throw err @@ -34,7 +33,7 @@ function main() { if (err && err.code !== 'EEXIST') throw err fs.unlink(index, function(err) { if (err && err.code !== 'ENOENT') throw err - var vals = { names: names } + var vals = { projects: projects } , html = mustache.to_html(tpl.toString(), vals) fs.writeFile(index, html, function(err) { if (err) throw err @@ -46,9 +45,9 @@ function main() { // write project pages ctx.n = 0 - names.forEach(function(name) { + projects.forEach(function(project) { ctx.n += 1 - buildProject(name, projects[name], ctx) + buildProject(project.name, project, ctx) }) }) }) diff --git a/projects.json b/projects.json index dd5d07c..ec6d29e 100644 --- a/projects.json +++ b/projects.json @@ -1,15 +1,45 @@ -{ "batteries" : { "description" : "a general purpose node library" } -, "bin" : { "description" : "~/bin" } -, "cheat.el" : { "description" : "cheat from emacs" } -, "compiler" : { "description" : "an x86 compiler written in ruby" } -, "config" : { "description" : "important dot files (zsh, emacs, vim, screen)" } -, "format" : { "description" : "printf for JavaScript" } -, "gitter" : { "description" : "a GitHub client for Node (v2 API)" } -, "lake" : { "description" : "A simple implementation of Scheme in C" } -, "mojo.el" : { "description" : "turn emacs into a sweet mojo editor" } -, "NorthWatcher" : { "description" : "cron for filesystem changes" } -, "repl-edit" : { "description" : "edit Node repl commands with your text editor" } -, "samhuri.net" : { "description" : "this site" } -, "strftime" : { "description" : "strftime for JavaScript" } -, "ThePusher" : { "description" : "Github post receive hook router" } +{ "projects" : + [ { "name" : "batteries" + , "description" : "a general purpose node library" + } + , { "name" : "bin" + , "description" : "~/bin" + } + , { "name" : "cheat.el" + , "description" : "cheat from emacs" + } + , { "name" : "compiler" + , "description" : "an x86 compiler written in ruby" + } + , { "name" : "config" + , "description" : "important dot files (zsh, emacs, vim, screen)" + } + , { "name" : "format" + , "description" : "printf for JavaScript" + } + , { "name" : "gitter" + , "description" : "a GitHub client for Node (v2 API)" + } + , { "name" : "lake" + , "description" : "A simple implementation of Scheme in C" + } + , { "name" : "mojo.el" + , "description" : "turn emacs into a sweet mojo editor" + } + , { "name" : "NorthWatcher" + , "description" : "cron for filesystem changes" + } + , { "name" : "repl-edit" + , "description" : "edit Node repl commands with your text editor" + } + , { "name" : "samhuri.net" + , "description" : "this site" + } + , { "name" : "strftime" + , "description" : "strftime for JavaScript" + } + , { "name" : "ThePusher" + , "description" : "Github post receive hook router" + } + ] } diff --git a/samhuri.net.tmproj b/samhuri.net.tmproj index e6f565b..cf622bb 100644 --- a/samhuri.net.tmproj +++ b/samhuri.net.tmproj @@ -3,7 +3,7 @@ currentDocument - bin/blog.rb + assets/css/style.css documents @@ -112,14 +112,14 @@ caret column - 21 + 31 line - 2 + 63 firstVisibleColumn 0 firstVisibleLine - 0 + 1 assets/js/blog.js diff --git a/templates/proj/index.html b/templates/proj/index.html index b0229ff..25597eb 100644 --- a/templates/proj/index.html +++ b/templates/proj/index.html @@ -20,6 +20,13 @@ #gh img { border: none } span { padding: 5px } #forkme { display: none } + #projects li p { margin: 0 } + #projects li p.description + { font-size: 0.6em + ; line-height: 1em + ; color: #444 + ; margin-bottom: 0.5em + } @@ -28,13 +35,6 @@

projects

-

GitHub

@@ -50,6 +50,16 @@ following +