From 24caa3e470472ce3dbca06811cd42d7261854643 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Mon, 6 Dec 2010 20:32:08 -0800 Subject: [PATCH] fix missing title on post pages, tweak style --- assets/blog.css | 2 +- blog.rb | 5 +++-- blog/37signals-chalk-dissected.html | 2 +- blog/a-preview-of-mach-o-file-generation.html | 2 +- blog/basics-of-the-mach-o-file-format.html | 2 +- blog/working-with-c-style-structs-in-ruby.html | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/assets/blog.css b/assets/blog.css index 91721bd..014500f 100644 --- a/assets/blog.css +++ b/assets/blog.css @@ -119,7 +119,7 @@ footer { text-align: center ; margin: 0 ; padding: 1em ; background-color: #a6bcdf - ; border-top: solid 1px #222 + ; border-top: solid 1px #666 ; clear: both } diff --git a/blog.rb b/blog.rb index 99bd761..a85d5f1 100755 --- a/blog.rb +++ b/blog.rb @@ -23,7 +23,7 @@ posts = Posts['published'].map do |filename| line = lines.shift.strip m = line.match(/(\w+):/) if m && param = m[1].downcase - post[param] = line.sub(Regexp.new('^' + param + ':\s*', 'i'), '').strip + post[param.to_sym] = line.sub(Regexp.new('^' + param + ':\s*', 'i'), '').strip elsif line.match(/^----\s*$/) lines.shift while lines.first.strip.empty? break @@ -37,7 +37,8 @@ posts = Posts['published'].map do |filename| end posts.each_with_index do |post, i| - post[:html] = Mustache.render(template, { :post => post, + post[:html] = Mustache.render(template, { :title => post[:title], + :post => post, :previous => i < posts.length - 1 && posts[i + 1], :next => i > 0 && posts[i - 1] }) diff --git a/blog/37signals-chalk-dissected.html b/blog/37signals-chalk-dissected.html index a16f67d..c26e0f0 100644 --- a/blog/37signals-chalk-dissected.html +++ b/blog/37signals-chalk-dissected.html @@ -1,7 +1,7 @@ - :: samhuri.net +37signals' Chalk Dissected :: samhuri.net