plate-lang 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/plate/cli.rb +2 -2
- data/lib/plate/compiler.rb +5 -3
- data/lib/plate/version.rb +1 -1
- data/lib/plate-lang.rb +1 -0
- data/skeleton/app/assets/css/app.css +5 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60b1eef965deb6bad87abcdab08187ac7bd3ab22
|
4
|
+
data.tar.gz: c44ebe8aab2e189cc5219c2c8c52db98c50355fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c270324ca8359ec21ef0538d40eae1d63c4a7ae4c2fdb8a5b8b8731545c5c9e1134f9ba0503baea9d248917186710fec69823967f6b6046a4fb534e840749926
|
7
|
+
data.tar.gz: fa130aef1350de44e036708661d9be5223250c20cf12ca71364d677b40c1bcd76cc7fcb0e00b5d0c2258e1b713e799bd9498e3856eb599eeb9f2ca5fdf7480cb
|
data/.gitignore
CHANGED
data/lib/plate/cli.rb
CHANGED
@@ -59,7 +59,7 @@ module Plate
|
|
59
59
|
def build_html(output, compiler)
|
60
60
|
body = compiler.body
|
61
61
|
meta = compiler.meta
|
62
|
-
title = meta
|
62
|
+
title = meta['title']
|
63
63
|
data = JSON.dump(compiler.meta)
|
64
64
|
head = compiler.fonts
|
65
65
|
|
@@ -74,7 +74,7 @@ module Plate
|
|
74
74
|
|
75
75
|
def build_css(output, compiler, vendor)
|
76
76
|
meta = compiler.meta
|
77
|
-
bootstrap =
|
77
|
+
bootstrap = meta['bootstrap'] || {}
|
78
78
|
|
79
79
|
path = File.join(output, 'assets', 'css', 'app.css')
|
80
80
|
build(path, binding)
|
data/lib/plate/compiler.rb
CHANGED
@@ -7,6 +7,7 @@ module Plate
|
|
7
7
|
def initialize
|
8
8
|
@parser = Parser.new
|
9
9
|
self.repeating = false
|
10
|
+
self.meta = {}
|
10
11
|
end
|
11
12
|
|
12
13
|
def compile(code)
|
@@ -16,7 +17,7 @@ module Plate
|
|
16
17
|
end
|
17
18
|
|
18
19
|
def fonts
|
19
|
-
return '' if meta
|
20
|
+
return '' if meta['fonts'].nil?
|
20
21
|
meta['fonts'].map { |font|
|
21
22
|
"<link href=\"http://fonts.googleapis.com/css?family=#{CGI.escape(font)}\" rel=\"stylesheet\">"
|
22
23
|
}.join("")
|
@@ -89,7 +90,8 @@ module Plate
|
|
89
90
|
when /spin(\-\d+\.*\d*)?/
|
90
91
|
s = value.gsub(/spin\-?/, '')
|
91
92
|
s = 1.5 if s.empty?
|
92
|
-
"
|
93
|
+
animation = "animation: spin #{s}s linear infinite"
|
94
|
+
"style=\"-webkit-#{animation}; #{animation}\""
|
93
95
|
when 'inherit'
|
94
96
|
'style="color: inherit"'
|
95
97
|
else
|
@@ -127,7 +129,7 @@ module Plate
|
|
127
129
|
class FrontMatterNode
|
128
130
|
def compile(compiler, parent = nil)
|
129
131
|
meta = YAML.load(yaml)
|
130
|
-
compiler.meta = meta
|
132
|
+
compiler.meta = meta || {}
|
131
133
|
''
|
132
134
|
end
|
133
135
|
end
|
data/lib/plate/version.rb
CHANGED
data/lib/plate-lang.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "plate"
|
@@ -7,6 +7,11 @@ pre.prettyprint {
|
|
7
7
|
border-color: #ccc;
|
8
8
|
}
|
9
9
|
|
10
|
+
@-webkit-keyframes spin {
|
11
|
+
0% { -webkit-transform: rotate(0deg); }
|
12
|
+
100% { -webkit-transform: rotate(359deg); }
|
13
|
+
}
|
14
|
+
|
10
15
|
@keyframes spin {
|
11
16
|
0% { transform: rotate(0deg); }
|
12
17
|
100% { transform: rotate(359deg); }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plate-lang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tnantoka
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -131,6 +131,7 @@ files:
|
|
131
131
|
- bower.json
|
132
132
|
- circle.yml
|
133
133
|
- exe/plate
|
134
|
+
- lib/plate-lang.rb
|
134
135
|
- lib/plate.rb
|
135
136
|
- lib/plate/cli.rb
|
136
137
|
- lib/plate/compiler.rb
|