laydown 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/laydown.gemspec +1 -1
- data/lib/laydown.rb +2 -2
- data/lib/template.rb +2 -2
- data/template.slim +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.1
|
data/laydown.gemspec
CHANGED
data/lib/laydown.rb
CHANGED
@@ -19,12 +19,12 @@ module Laydown
|
|
19
19
|
:js => [],
|
20
20
|
:inline_js => [],
|
21
21
|
:head => [],
|
22
|
-
:body_class =>
|
22
|
+
:body_class => [],
|
23
23
|
:body => :yield,
|
24
24
|
:ga_code => :@ga_code
|
25
25
|
}
|
26
26
|
|
27
|
-
ARRAY_PROPS = [:keywords, :css, :js, :inline_js, :head]
|
27
|
+
ARRAY_PROPS = [:keywords, :css, :js, :inline_js, :head, :body_class]
|
28
28
|
|
29
29
|
def self.compile(template={})
|
30
30
|
|
data/lib/template.rb
CHANGED
@@ -11,7 +11,7 @@ _buf = [] ; _temple_pre_tags = /<pre|<textarea/ ; _buf << ("<!DOCTYPE html><html
|
|
11
11
|
; _buf << ("<meta content=\"#{Temple::Utils.escape_html((data[:description]))}\" name=\"description\">"\
|
12
12
|
""\
|
13
13
|
"") ; end ; if data[:keywords].any? ;
|
14
|
-
; _buf << ("<meta content=\"#{Temple::Utils.escape_html((data[:keywords].join(', ')))}\" name=\"keywords\">"\
|
14
|
+
; _buf << ("<meta content=\"#{Temple::Utils.escape_html((data[:keywords].flatten.join(', ')))}\" name=\"keywords\">"\
|
15
15
|
""\
|
16
16
|
"") ; end ; data[:css].flatten.each do |url| ;
|
17
17
|
; unless url == '' ;
|
@@ -31,7 +31,7 @@ _buf = [] ; _temple_pre_tags = /<pre|<textarea/ ; _buf << ("<!DOCTYPE html><html
|
|
31
31
|
; data[:head].each do |item| ;
|
32
32
|
; _buf << (item) ;
|
33
33
|
;
|
34
|
-
; end ; end ; _buf << ("</head><body class=\"#{Temple::Utils.escape_html((data[:body_class]))}\">"\
|
34
|
+
; end ; end ; _buf << ("</head><body class=\"#{Temple::Utils.escape_html((data[:body_class].flatten.join(' ')))}\">"\
|
35
35
|
"#{data[:body]}"\
|
36
36
|
""\
|
37
37
|
"") ; if data[:ga_code] ;
|
data/template.slim
CHANGED
@@ -11,7 +11,7 @@ html
|
|
11
11
|
meta name="description" content=data[:description]
|
12
12
|
|
13
13
|
- if data[:keywords].any?
|
14
|
-
meta name="keywords" content=data[:keywords].join(', ')
|
14
|
+
meta name="keywords" content=data[:keywords].flatten.join(', ')
|
15
15
|
|
16
16
|
- data[:css].flatten.each do |url|
|
17
17
|
- unless url == ''
|
@@ -31,7 +31,7 @@ html
|
|
31
31
|
- data[:head].each do |item|
|
32
32
|
== item
|
33
33
|
|
34
|
-
body class=data[:body_class]
|
34
|
+
body class=data[:body_class].flatten.join(' ')
|
35
35
|
== data[:body]
|
36
36
|
|
37
37
|
- if data[:ga_code]
|