htmlcom 0.2.2 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 051a8d3c8105db43624946aec56f5f2de83a6e438871d0e385de622d89e3a36d
4
- data.tar.gz: d3004c795f704b7098433b515eb0b62bd3f235c1fc5e142773da8c5569789d97
3
+ metadata.gz: 78857b5b1409a4daf21dae7af2bf0dcc74c3aa0e668966c1fe4f360c2056b8e7
4
+ data.tar.gz: 999fdf955851dee02c6e404e3d63ec1d8c342e26fe72992cfce1c63761918b79
5
5
  SHA512:
6
- metadata.gz: c4fbbdecb3b4352ee3c9bd7de0d5ef438532df04a1d15056de6e025ed4e2de6e2809814bb529235bae4ccf8de112443ad2f08aadcb6ac6649138a2fcb0201df2
7
- data.tar.gz: 76ffa8e53e4ea333c64fbf32213c77cd1dc4638c6efb75f5301d7455ae23dfe6e26492c38092adda6cb29dc5656dea0ed0e1878c3143f8ae38500292faddcb83
6
+ metadata.gz: 07b170319e00f4cabb698f42f8ba6a005e4c5c4f074a9e71e76742dc40849d731df008e96f73676716499a66cdc11801ecf367df3553a57b46e698443f5e4189
7
+ data.tar.gz: 79b610a3280e750d1aa537cf05b45d4d3bf9bbca4c8eef2e0c203577cac28c0c531db657e9174bf53cdb1e60120fdaff75bfee484ac8125277da7abd4ae86cc5
@@ -1,2 +1,2 @@
1
- �^B1~DH�D���5q��nj��Μ��M��JCo��0�ڜ��9�2�x�O��@@.�
2
- 3��ZilQE��0Z}0�JWu��x@��
1
+ 4�ئ���D5A��ģ��\
2
+ xV��_��y�׉U�%>=�.����)4C�x�L�'s�Zb9Zq��v؉��4)�2����?"aT��b.0�t?>� ��Ba��OsN؊�N���jPE�5�� ��J
data.tar.gz.sig CHANGED
Binary file
@@ -8,6 +8,7 @@ require 'nokogiri'
8
8
  require 'xml_to_sliml'
9
9
  require 'jsajax_wizard'
10
10
  require 'jsmenubuilder'
11
+ require 'jstreebuilder'
11
12
 
12
13
 
13
14
  module HtmlCom
@@ -86,6 +87,10 @@ xsl= %q(
86
87
  <xsl:attribute name='title'>
87
88
  <xsl:value-of select='@title'/>
88
89
  </xsl:attribute>
90
+
91
+ <xsl:attribute name='class'>
92
+ <xsl:value-of select='@class'/>
93
+ </xsl:attribute>
89
94
 
90
95
  <xsl:element name="input">
91
96
  <xsl:attribute name="type">hidden</xsl:attribute>
@@ -121,8 +126,8 @@ xsl= %q(
121
126
 
122
127
  attr_accessor :title, :content
123
128
 
124
- def initialize(title, content: '', callback: nil)
125
- @title, @content, @callback = title, content, callback
129
+ def initialize(title, content: '', callback: nil, debug: false)
130
+ @title, @content, @callback, @debug = title, content, callback, debug
126
131
  end
127
132
 
128
133
  def content=(s)
@@ -151,13 +156,16 @@ xsl= %q(
151
156
  # current options for type:
152
157
  # :tabs, :full_page_tabs
153
158
 
154
- def initialize(type=:tabs, headings: [], xml: nil)
159
+ def initialize(type=:tabs, headings: [], xml: nil, debug: false)
155
160
 
156
- @type = type
161
+ @type, @debug = type, debug
157
162
  @build = JsMenuBuilder.new(type, headings: headings)
163
+
164
+ @active_tab = 1
158
165
 
159
166
  @tab = headings.map do |heading|
160
- Tab.new heading, content: "<h3>#{heading}</h3>", callback: self
167
+ Tab.new heading, content: "<h3>#{heading}</h3>",
168
+ callback: self, debug: debug
161
169
  end
162
170
 
163
171
  if xml then
@@ -195,17 +203,30 @@ xsl= %q(
195
203
  tabs = @tab.map do |tab|
196
204
  tab.title ? tab.to_a : nil
197
205
  end.compact.to_h
198
-
199
- @build = JsMenuBuilder.new(@type, tabs: tabs, active: @active_tab)
206
+
207
+ if @debug then
208
+ puts 'inside ping; tabs: ' + tabs.inspect
209
+ puts '@active_tab: ' + @active_tab.inspect
210
+ end
211
+
212
+ @build = JsMenuBuilder.new(@type, tabs: tabs,
213
+ active: @active_tab, debug: @debug)
200
214
 
201
215
  end
202
216
 
203
217
  alias refresh ping
218
+
219
+ def to_css()
220
+ @build.to_css
221
+ end
204
222
 
205
223
  def to_html()
206
224
  @build.to_html
207
225
  end
208
226
 
227
+ def to_js()
228
+ @build.to_js
229
+ end
209
230
 
210
231
  # not yet working properly
211
232
  def to_bangtag()
@@ -219,5 +240,45 @@ xsl= %q(
219
240
 
220
241
  end
221
242
 
243
+ class Tree
244
+
245
+ def initialize(s, debug: false, hn: 2)
246
+ jtb = JsTreeBuilder.new(:sidebar, {src: s, hn: hn, debug: debug})
247
+ @html = jtb.to_webpage
248
+ end
249
+
250
+ def to_webpage()
251
+ @html
252
+ end
253
+
254
+ end
255
+
256
+ class Menu
257
+
258
+ # current options
259
+ # :vertical_menu, :fixed_menu, sticky_nav, breadcrumb
260
+ #
261
+ def initialize(type=:vertical_menu, links, debug: false)
262
+ @jtb = JsMenuBuilder.new(type, {items: links, debug: debug})
263
+ end
264
+
265
+ def to_css()
266
+ @jtb.to_css
267
+ end
268
+
269
+ def to_html()
270
+ @jtb.to_html
271
+ end
272
+
273
+ def to_js()
274
+ @jtb.to_js
275
+ end
276
+
277
+ def to_webpage()
278
+ @jtb.to_webpage
279
+ end
280
+
281
+ end
282
+
222
283
 
223
284
  end
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.2
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -11,34 +11,54 @@ cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
14
- YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTkwNzEyMTkwOTA2WhcN
15
- MjAwNzExMTkwOTA2WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
- cnRzb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qm+xa0+wM6XS9eGzY+bz+7UCPJ58HXsnYa9k5EnWLIYpdXkGCf0iULCn
35
- WiRgzz3/21eCm7N/8s5UGa7uDJXDDxf/i/QsEUJn1VcorDbODN3DbcPYph26bgQm
36
- vY6P53Z8DPcEft++oI9aZl1n
28
+ BgkqhkiG9w0BAQsFAAOCAYEAAoxegKwCmU/XAf+rPvvgIXNHaHXNUrvz0UY35Fld
29
+ UAUAT5VtRdMl1fOsF20D1ZvB8EvgcO5R9sZOh2zdyjCmn/XT6VIyQXMZ3pBEFoCX
30
+ JyShDdKobcYKlMrb9Nr9+Mn4J4vfOQcB2NFYwonaDLPQ9AjXwit7rhuOsbDAPnHt
31
+ WXQfhCZCk5CoVQeDAuzpnCJm55chl07x+VQYBDedjbHCevrleL6REiRQ0LhkEpPi
32
+ 6beXYDQ6kQfSx368fAS8NLwNuozMTcRgRUl7xqP0+ul8nSJZLLWIXmsrs6cyHnw9
33
+ HwdPlwmYQHY1xkBxGI9yW8rB4FrO3JUOgLgDnMZ57q9iNKMS9uIqXaWEm0MQLY6m
34
+ 0KaSzHUAYca+U2kPPE5/bYl/PRm6PEwzKh9gvxP9DfOsvMo5zx6nIwTk7q9OBGVh
35
+ Y7ogWFuR7xV5C2r4jFG/ETJJx68h+Dq4axa5mkEdMQz1iBbVr7SAq4Uoad0IbYtV
36
+ 9JH57w1VS3ePSOlwBmm2yWGh
37
37
  -----END CERTIFICATE-----
38
- date: 2020-02-24 00:00:00.000000000 Z
38
+ date: 2021-01-20 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: jsmenubuilder
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '0.3'
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: 0.3.4
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '0.3'
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 0.3.4
60
+ - !ruby/object:Gem::Dependency
61
+ name: jstreebuilder
42
62
  requirement: !ruby/object:Gem::Requirement
43
63
  requirements:
44
64
  - - "~>"
@@ -46,7 +66,7 @@ dependencies:
46
66
  version: '0.2'
47
67
  - - ">="
48
68
  - !ruby/object:Gem::Version
49
- version: 0.3.1
69
+ version: 0.2.4
50
70
  type: :runtime
51
71
  prerelease: false
52
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -56,27 +76,27 @@ dependencies:
56
76
  version: '0.2'
57
77
  - - ">="
58
78
  - !ruby/object:Gem::Version
59
- version: 0.3.1
79
+ version: 0.2.4
60
80
  - !ruby/object:Gem::Dependency
61
81
  name: jsajax_wizard
62
82
  requirement: !ruby/object:Gem::Requirement
63
83
  requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- version: 0.3.0
67
84
  - - "~>"
68
85
  - !ruby/object:Gem::Version
69
86
  version: '0.3'
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 0.3.1
70
90
  type: :runtime
71
91
  prerelease: false
72
92
  version_requirements: !ruby/object:Gem::Requirement
73
93
  requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: 0.3.0
77
94
  - - "~>"
78
95
  - !ruby/object:Gem::Version
79
96
  version: '0.3'
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: 0.3.1
80
100
  - !ruby/object:Gem::Dependency
81
101
  name: xml_to_sliml
82
102
  requirement: !ruby/object:Gem::Requirement
@@ -86,7 +106,7 @@ dependencies:
86
106
  version: '0.1'
87
107
  - - ">="
88
108
  - !ruby/object:Gem::Version
89
- version: 0.1.1
109
+ version: 0.1.2
90
110
  type: :runtime
91
111
  prerelease: false
92
112
  version_requirements: !ruby/object:Gem::Requirement
@@ -96,27 +116,27 @@ dependencies:
96
116
  version: '0.1'
97
117
  - - ">="
98
118
  - !ruby/object:Gem::Version
99
- version: 0.1.1
119
+ version: 0.1.2
100
120
  - !ruby/object:Gem::Dependency
101
121
  name: nokogiri
102
122
  requirement: !ruby/object:Gem::Requirement
103
123
  requirements:
104
124
  - - "~>"
105
125
  - !ruby/object:Gem::Version
106
- version: '1.10'
126
+ version: '1.11'
107
127
  - - ">="
108
128
  - !ruby/object:Gem::Version
109
- version: 1.10.8
129
+ version: 1.11.1
110
130
  type: :runtime
111
131
  prerelease: false
112
132
  version_requirements: !ruby/object:Gem::Requirement
113
133
  requirements:
114
134
  - - "~>"
115
135
  - !ruby/object:Gem::Version
116
- version: '1.10'
136
+ version: '1.11'
117
137
  - - ">="
118
138
  - !ruby/object:Gem::Version
119
- version: 1.10.8
139
+ version: 1.11.1
120
140
  description:
121
141
  email: james@jamesrobertson.eu
122
142
  executables: []
@@ -143,7 +163,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
163
  - !ruby/object:Gem::Version
144
164
  version: '0'
145
165
  requirements: []
146
- rubygems_version: 3.0.3
166
+ rubyforge_project:
167
+ rubygems_version: 2.7.10
147
168
  signing_key:
148
169
  specification_version: 4
149
170
  summary: Generates HTML components and is designed for rendering dynamic web pages
metadata.gz.sig CHANGED
Binary file