anatomy 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/anatomy/base.ay +5 -0
- data/lib/anatomy/data.ay +4 -1
- data/lib/anatomy/renderers/html.ay +2 -1
- data/lib/anatomy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea287c4ca9d5cf1a661f527abdce69c03699641f
|
4
|
+
data.tar.gz: e0ad0e3c7b9d51c696a2801d497d74c74d3dbe9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51121a52a93c3231a8fb703e980046f9a30c36ab7da93f58594fb20f927c83983975cf4862068198b7e2dba05850991b3fd0d83d59b49095c03a4a53593daf50
|
7
|
+
data.tar.gz: 537c70611b8f0e4b05b90ecb627f9779606aa1de9a69f6170b3ae1580590f8773a9edbd05612edc01de0b75279550d490b4753b4be367276e008e000831a7430
|
data/lib/anatomy/base.ay
CHANGED
@@ -29,6 +29,11 @@ def(table-of-contents):
|
|
29
29
|
[part]:
|
30
30
|
part style properties << .toc)
|
31
31
|
|
32
|
+
def(mobile-optimized):
|
33
|
+
data MetaBlock new(
|
34
|
+
[part]:
|
35
|
+
part mobile-optimized? = true)
|
36
|
+
|
32
37
|
def(omit-children-from-table-of-contents):
|
33
38
|
data ResolveElement new(
|
34
39
|
[part]:
|
data/lib/anatomy/data.ay
CHANGED
@@ -71,7 +71,10 @@ data(
|
|
71
71
|
@template = nil
|
72
72
|
|
73
73
|
-- omit children from table of contents
|
74
|
-
@omit-children-from-table-of-contents? = false
|
74
|
+
@omit-children-from-table-of-contents? = false
|
75
|
+
|
76
|
+
-- whether or not the part will handle mobile device sizes elegantly
|
77
|
+
@mobile-optimized? = false))
|
75
78
|
|
76
79
|
def(Part set-tag(name, target = .self, display = nil)):
|
77
80
|
@tags[name] = Tag new(self, name, target, display)
|
@@ -276,7 +276,8 @@ def(render(part, out = ".")):
|
|
276
276
|
<script(type = "text/javascript", src = "public/tags.js") {}
|
277
277
|
<script(type = "text/javascript", src = "public/main.js") {}
|
278
278
|
|
279
|
-
|
279
|
+
when(part mobile-optimized?):
|
280
|
+
<meta(name = "viewport", content = "width=device-width, initial-scale=1")
|
280
281
|
|
281
282
|
all-css-additions(part) collect [addition]:
|
282
283
|
<link(type = "text/css", rel = "stylesheet", href = addition)
|
data/lib/anatomy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anatomy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Suraci
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
version_requirements: !ruby/object:Gem::Requirement
|