Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

body class is now an array.

  • Loading branch information...
commit 57ea79a876352dc10d6ed0368bb75eb5466e3438 1 parent b9265a6
@jbe authored
Showing with 6 additions and 6 deletions.
  1. +2 −2 lib/laydown.rb
  2. +2 −2 lib/template.rb
  3. +2 −2 template.slim
View
4 lib/laydown.rb
@@ -19,12 +19,12 @@ module Laydown
:js => [],
:inline_js => [],
:head => [],
- :body_class => nil,
+ :body_class => [],
:body => :yield,
:ga_code => :@ga_code
}
- ARRAY_PROPS = [:keywords, :css, :js, :inline_js, :head]
+ ARRAY_PROPS = [:keywords, :css, :js, :inline_js, :head, :body_class]
def self.compile(template={})
View
4 lib/template.rb
@@ -11,7 +11,7 @@
; _buf << ("<meta content=\"#{Temple::Utils.escape_html((data[:description]))}\" name=\"description\">"\
""\
"") ; end ; if data[:keywords].any? ;
- ; _buf << ("<meta content=\"#{Temple::Utils.escape_html((data[:keywords].join(', ')))}\" name=\"keywords\">"\
+ ; _buf << ("<meta content=\"#{Temple::Utils.escape_html((data[:keywords].flatten.join(', ')))}\" name=\"keywords\">"\
""\
"") ; end ; data[:css].flatten.each do |url| ;
; unless url == '' ;
@@ -31,7 +31,7 @@
; data[:head].each do |item| ;
; _buf << (item) ;
;
- ; end ; end ; _buf << ("</head><body class=\"#{Temple::Utils.escape_html((data[:body_class]))}\">"\
+ ; end ; end ; _buf << ("</head><body class=\"#{Temple::Utils.escape_html((data[:body_class].flatten.join(' ')))}\">"\
"#{data[:body]}"\
""\
"") ; if data[:ga_code] ;
View
4 template.slim
@@ -11,7 +11,7 @@ html
meta name="description" content=data[:description]
- if data[:keywords].any?
- meta name="keywords" content=data[:keywords].join(', ')
+ meta name="keywords" content=data[:keywords].flatten.join(', ')
- data[:css].flatten.each do |url|
- unless url == ''
@@ -31,7 +31,7 @@ html
- data[:head].each do |item|
== item
- body class=data[:body_class]
+ body class=data[:body_class].flatten.join(' ')
== data[:body]
- if data[:ga_code]
Please sign in to comment.
Something went wrong with that request. Please try again.