Project

laydown

0.0
No commit activity in last 3 years
No release in over 3 years
Provides a simple Ruby DSL for defining HTML5 layouts for web apps. For those who has written the same layout too many times.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

>= 0
>= 0
 Project Readme
#
#                            «=»
#                             ^
#                      $  «« ^¨^ »»  $
#                           '' ''
#        .
#       «=»
#        ^
#    «« ^¨^ »»
#     LAYDOWN
#     ''|'|''
#       | |                  |>
#       | |            ______|_
#       | |           | oo     |
#'''''''''''''''''''''''''''''******

Quick HTML5 layouts.

# $ gem install laydown

 

require 'laydown'

layout = Laydown.new(
  charset:      'utf-8' # default
  title:        'A man in a #{@where}',
  description:  'Very interesting',
  favicon:      'pill.png',
  keywords:     ['man', :@keywords],

  css:          ['site.css', :@css],
  js:           ['app.js', :@js],
  inline_js:    ['alert("#{@msg}");'],

  head:         '<meta soundtrack="Piazzolla">',
  body:         :yield, # default
  body_class:   ['dark', :@body_class],
  ga_code:      'google_analytics_id'
  )

# ----------------------------

@where    = 'cave'
@keywords = 'cave, interesting'
@css      = 'somesheet.css'

layout.render(self, :msg => 'hello') { '<p>body text</p>' }
# => your html5 layout

Features

  • Fast
  • Small footprint
  • Built on Temple and Tilt

Copyright

Copyright (c) 2011 Jostein Berre Eliassen. See LICENCE for details. (MIT licence)