mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
fix missing title on post pages, tweak style
This commit is contained in:
parent
92c4af2b1e
commit
24caa3e470
6 changed files with 8 additions and 7 deletions
|
|
@ -119,7 +119,7 @@ footer { text-align: center
|
||||||
; margin: 0
|
; margin: 0
|
||||||
; padding: 1em
|
; padding: 1em
|
||||||
; background-color: #a6bcdf
|
; background-color: #a6bcdf
|
||||||
; border-top: solid 1px #222
|
; border-top: solid 1px #666
|
||||||
; clear: both
|
; clear: both
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
5
blog.rb
5
blog.rb
|
|
@ -23,7 +23,7 @@ posts = Posts['published'].map do |filename|
|
||||||
line = lines.shift.strip
|
line = lines.shift.strip
|
||||||
m = line.match(/(\w+):/)
|
m = line.match(/(\w+):/)
|
||||||
if m && param = m[1].downcase
|
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*$/)
|
elsif line.match(/^----\s*$/)
|
||||||
lines.shift while lines.first.strip.empty?
|
lines.shift while lines.first.strip.empty?
|
||||||
break
|
break
|
||||||
|
|
@ -37,7 +37,8 @@ posts = Posts['published'].map do |filename|
|
||||||
end
|
end
|
||||||
|
|
||||||
posts.each_with_index do |post, i|
|
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],
|
:previous => i < posts.length - 1 && posts[i + 1],
|
||||||
:next => i > 0 && posts[i - 1]
|
:next => i > 0 && posts[i - 1]
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<meta charset=utf-8>
|
<meta charset=utf-8>
|
||||||
<meta name=viewport content=width=device-width>
|
<meta name=viewport content=width=device-width>
|
||||||
<title> :: samhuri.net</title>
|
<title>37signals' Chalk Dissected :: samhuri.net</title>
|
||||||
<link rel=stylesheet href=../assets/blog.css>
|
<link rel=stylesheet href=../assets/blog.css>
|
||||||
<script>
|
<script>
|
||||||
var _gaq = _gaq || [];
|
var _gaq = _gaq || [];
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<meta charset=utf-8>
|
<meta charset=utf-8>
|
||||||
<meta name=viewport content=width=device-width>
|
<meta name=viewport content=width=device-width>
|
||||||
<title> :: samhuri.net</title>
|
<title>A preview of Mach-O file generation :: samhuri.net</title>
|
||||||
<link rel=stylesheet href=../assets/blog.css>
|
<link rel=stylesheet href=../assets/blog.css>
|
||||||
<script>
|
<script>
|
||||||
var _gaq = _gaq || [];
|
var _gaq = _gaq || [];
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<meta charset=utf-8>
|
<meta charset=utf-8>
|
||||||
<meta name=viewport content=width=device-width>
|
<meta name=viewport content=width=device-width>
|
||||||
<title> :: samhuri.net</title>
|
<title>Basics of the Mach-O file format :: samhuri.net</title>
|
||||||
<link rel=stylesheet href=../assets/blog.css>
|
<link rel=stylesheet href=../assets/blog.css>
|
||||||
<script>
|
<script>
|
||||||
var _gaq = _gaq || [];
|
var _gaq = _gaq || [];
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<meta charset=utf-8>
|
<meta charset=utf-8>
|
||||||
<meta name=viewport content=width=device-width>
|
<meta name=viewport content=width=device-width>
|
||||||
<title> :: samhuri.net</title>
|
<title>Working with C-style structs in Ruby :: samhuri.net</title>
|
||||||
<link rel=stylesheet href=../assets/blog.css>
|
<link rel=stylesheet href=../assets/blog.css>
|
||||||
<script>
|
<script>
|
||||||
var _gaq = _gaq || [];
|
var _gaq = _gaq || [];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue