Sha256: 3794d0664f32358fc888f9492f8343ab984bdaf9b2f299d9123509b302dcc892
Contents?: true
Size: 569 Bytes
Versions: 7
Compression:
Stored size: 569 Bytes
Contents
module Sinatra module Twitter module HAMLHelper def container(layout=:fixed, &block) @layout = layout haml_tag :div, :class => layout == :fixed ? :container : 'container-fluid', &block end def row(&block) haml_tag :div, :class => @layout == :fixed ? :row : 'row-fluid', &block end (1..12).each do |col| define_method "span#{col}" do |offset={}, &block| haml_tag :div, :class => "span#{col}#{!offset.empty? ? " offset#{offset[:offset]}" : ''}", &block end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems