Allows you to lay out HTML using ASCII art. Stolen from psykotic’s code posted to reddit: http://programming.reddit.com/info/k9dx/comments
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
require 'box_layout' page_template = <<-END ---------- | | ---------- | | | | | | | | | | | | | | | | ---------- | | ---------- END layout = BoxLayout.html page_template puts "<title>cute</title>" puts "<style>* { border: 1px solid black }</style>" puts layout % %w[header left body right footer].map {|s| "**#{s}**" } |
gem install box_layout
git clone git://github.com/seattlerb/box_layout