htmlcom 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/htmlcom.rb +36 -5
- data.tar.gz.sig +0 -0
- metadata +6 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 051a8d3c8105db43624946aec56f5f2de83a6e438871d0e385de622d89e3a36d
|
4
|
+
data.tar.gz: d3004c795f704b7098433b515eb0b62bd3f235c1fc5e142773da8c5569789d97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4fbbdecb3b4352ee3c9bd7de0d5ef438532df04a1d15056de6e025ed4e2de6e2809814bb529235bae4ccf8de112443ad2f08aadcb6ac6649138a2fcb0201df2
|
7
|
+
data.tar.gz: 76ffa8e53e4ea333c64fbf32213c77cd1dc4638c6efb75f5301d7455ae23dfe6e26492c38092adda6cb29dc5656dea0ed0e1878c3143f8ae38500292faddcb83
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/htmlcom.rb
CHANGED
@@ -14,7 +14,7 @@ module HtmlCom
|
|
14
14
|
|
15
15
|
class Accordion
|
16
16
|
|
17
|
-
attr_reader :to_html, :to_css, :to_js
|
17
|
+
attr_reader :to_html, :to_css, :to_js, :to_tags
|
18
18
|
|
19
19
|
def initialize(xml, debug: false)
|
20
20
|
|
@@ -23,12 +23,43 @@ module HtmlCom
|
|
23
23
|
# transform the accordion XML to tags XML
|
24
24
|
tags = Nokogiri::XSLT(xsl()).transform(Nokogiri::XML(xml))\
|
25
25
|
.to_xhtml(indent: 0)
|
26
|
+
|
27
|
+
@to_tags = tags # used for debugging the structure
|
28
|
+
|
26
29
|
jmb = JsMenuBuilder.new(tags, debug: debug)
|
27
|
-
|
28
|
-
|
30
|
+
|
31
|
+
pg = if Rexle.new(xml).root.attributes[:navbar] then
|
32
|
+
|
33
|
+
a = jmb.to_h.keys.sort.map {|key, _| [key, '#' + key.downcase]}
|
34
|
+
|
35
|
+
navbar = JsMenuBuilder.new(:sticky_navbar, {sticky_navbar: a,
|
36
|
+
debug: debug})
|
37
|
+
|
38
|
+
@to_css = navbar.to_css + "\n" + jmb.to_css
|
39
|
+
@to_js = navbar.to_js + "\n" + jmb.to_js
|
40
|
+
|
41
|
+
|
42
|
+
jmb.to_webpage do |css, html, js|
|
43
|
+
|
44
|
+
[
|
45
|
+
navbar.to_css + "\n" + css,
|
46
|
+
navbar.to_html + "\n" + html,
|
47
|
+
navbar.to_js + "\n" + js
|
48
|
+
]
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
else
|
53
|
+
|
54
|
+
@to_css = jmb.to_css
|
55
|
+
@to_js = jmb.to_js
|
56
|
+
|
57
|
+
jmb.to_webpage
|
58
|
+
|
59
|
+
end
|
29
60
|
|
30
|
-
# apply the AJAX
|
31
|
-
@to_html = JsAjaxWizard.new(
|
61
|
+
# apply the AJAX
|
62
|
+
@to_html = JsAjaxWizard.new(pg).to_html
|
32
63
|
|
33
64
|
end
|
34
65
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: htmlcom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
WiRgzz3/21eCm7N/8s5UGa7uDJXDDxf/i/QsEUJn1VcorDbODN3DbcPYph26bgQm
|
36
36
|
vY6P53Z8DPcEft++oI9aZl1n
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2020-
|
38
|
+
date: 2020-02-24 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: jsmenubuilder
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
version: '0.2'
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.
|
49
|
+
version: 0.3.1
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -56,7 +56,7 @@ dependencies:
|
|
56
56
|
version: '0.2'
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 0.
|
59
|
+
version: 0.3.1
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: jsajax_wizard
|
62
62
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,7 +106,7 @@ dependencies:
|
|
106
106
|
version: '1.10'
|
107
107
|
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 1.10.
|
109
|
+
version: 1.10.8
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -116,7 +116,7 @@ dependencies:
|
|
116
116
|
version: '1.10'
|
117
117
|
- - ">="
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: 1.10.
|
119
|
+
version: 1.10.8
|
120
120
|
description:
|
121
121
|
email: james@jamesrobertson.eu
|
122
122
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|