glib-web 0.4.25 → 0.4.27

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a78169ee4aa218427c3afb3fdb50fd77280f627
4
- data.tar.gz: d86539782b4e6c0a50cbba7e5ac5b39565e9feb5
3
+ metadata.gz: 44639912030ec23501b527e5651a8e1879b2dd51
4
+ data.tar.gz: d1bbe493988c3eced3d79c45c7a5b3ca34e5045a
5
5
  SHA512:
6
- metadata.gz: 495d37ef44d6fbad0a970f0f3b3bf35effe81b5ceb866c5eeb1606d179f217f747365d1987caaf910d83c0f26cec6d50ee147bfdcfe0581df583dd367e154d6b
7
- data.tar.gz: e8942b48722e047778a7bbb8ed9d84734b14ad048700efc05edf835e1770bbeb08e4e63ebe4e43e1212363f16748c51e93167a49332b06d6373f80872e0b4647
6
+ metadata.gz: d49e6085c885f9d9c8bc614768bc0a74fb3e4bbaae7af6ca5e5567236e4fc2082ef29184e180b8de0e191462c696d00020791e26d9bf23388f317035c56ed3a6
7
+ data.tar.gz: 9af04d4d3ee2048b00291af57e4206eef65641543985bdd47ce32dac79a42e14d2e4e88aea8933a90bfb32061a016c13f616a27c9d542c2c329ee267d7955300
@@ -15,6 +15,11 @@ module Glib
15
15
  end
16
16
  end
17
17
 
18
+ def chips(block)
19
+ json.chips do
20
+ block.call page.menu_builder
21
+ end
22
+ end
18
23
  end
19
24
 
20
25
  class Thumbnail < AbstractTemplate
@@ -24,19 +29,18 @@ module Glib
24
29
  string :imageUrl
25
30
  action :onClick
26
31
 
27
- # # NOTE: Experimental. Still deciding whether this needs to be a full blown panel or
32
+ # # NOTE: Experimental. Still deciding whether this needs to be a full blown panel or
28
33
  # # an array of badges (with relevant properties, e.g. text, color, etc)
29
34
  # views :accessoryViews
30
-
31
- def chips(block)
32
- json.chips do
33
- block.call page.menu_builder
34
- end
35
- end
36
35
  end
37
36
 
38
37
  class Featured < Thumbnail
39
38
  end
39
+
40
+ class Custom < Thumbnail
41
+ string :template
42
+ hash :data
43
+ end
40
44
  end
41
45
 
42
46
  class Section < AbstractBuilder
@@ -7,29 +7,31 @@ module Glib
7
7
 
8
8
  class MenuItem < JsonUiElement
9
9
  end
10
-
10
+
11
11
  class Button < MenuItem
12
12
  string :text
13
13
  icon :icon
14
14
  action :onClick
15
15
  bool :disabled
16
- color :color
16
+ # color :color
17
+ # backgroundColor :color
18
+ singleton_array :styleClass, :styleClasses
17
19
 
18
20
  def created
19
21
  json.type 'button'
20
22
  end
21
23
  end
22
-
24
+
23
25
  class Divider < MenuItem
24
26
  # Override
25
27
  def created
26
28
  json.type 'divider'
27
29
  end
28
30
  end
29
-
31
+
30
32
  class Label < MenuItem
31
33
  string :text
32
-
34
+
33
35
  # Override
34
36
  def created
35
37
  json.type 'label'
@@ -2,9 +2,9 @@ json.title 'Panels'
2
2
 
3
3
  json_ui_page json do |page|
4
4
  render "#{@path_prefix}/nav_menu", json: json, page: page
5
-
5
+
6
6
  page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
- scroll.h1 text: 'Horizontal panel'
7
+ scroll.h1 text: 'Basic'
8
8
  scroll.panels_horizontal backgroundColor: '#b3bac2', childViews: ->(panel) do
9
9
  panel.button text: '1'
10
10
  panel.button text: '2'
@@ -12,7 +12,7 @@ json_ui_page json do |page|
12
12
  end
13
13
 
14
14
  scroll.label text: "\n"
15
- scroll.h1 text: 'Horizontal panel with equal filling'
15
+ scroll.h1 text: 'Equal filling'
16
16
  scroll.panels_horizontal backgroundColor: '#b3bac2', width: 300, distribution: 'fillEqually', childViews: ->(panel) do
17
17
  panel.button text: '1'
18
18
  panel.button text: '2', height: 50
@@ -20,7 +20,7 @@ json_ui_page json do |page|
20
20
  end
21
21
 
22
22
  scroll.label text: "\n"
23
- scroll.h1 text: 'Horizontal panel with equal spacing'
23
+ scroll.h1 text: 'Equal spacing'
24
24
  scroll.panels_horizontal backgroundColor: '#b3bac2', width: 300, distribution: 'spaceEqually', childViews: ->(panel) do
25
25
  panel.button text: '1'
26
26
  panel.button text: '2'
@@ -28,7 +28,7 @@ json_ui_page json do |page|
28
28
  end
29
29
 
30
30
  scroll.label text: "\n"
31
- scroll.h1 text: 'Horizontal panel (containing vertical panel)'
31
+ scroll.h1 text: 'Vertical panel combo'
32
32
  scroll.panels_horizontal distribution: 'spaceEqually', childViews: ->(panel) do
33
33
  panel.button text: '1'
34
34
  panel.panels_vertical childViews: ->(v) do
@@ -39,7 +39,7 @@ json_ui_page json do |page|
39
39
  end
40
40
 
41
41
  scroll.label text: "\n"
42
- scroll.h1 text: 'Horizontal panel with equal filling (containing vertical panel)'
42
+ scroll.h1 text: 'Vertical panel combo (equal filling)'
43
43
  scroll.panels_horizontal width: 'matchParent', distribution: 'fillEqually', childViews: ->(panel) do
44
44
  panel.button text: '1'
45
45
  panel.panels_vertical childViews: ->(v) do
@@ -50,7 +50,7 @@ json_ui_page json do |page|
50
50
  end
51
51
 
52
52
  scroll.label text: "\n"
53
- scroll.h1 text: 'Horizontal panel with equal spacing (containing vertical panel)'
53
+ scroll.h1 text: 'Vertical panel combo (equal spacing)'
54
54
  scroll.panels_horizontal width: 'matchParent', distribution: 'spaceEqually', childViews: ->(panel) do
55
55
  panel.button text: '1'
56
56
  panel.panels_vertical childViews: ->(v) do
@@ -61,7 +61,7 @@ json_ui_page json do |page|
61
61
  end
62
62
 
63
63
  scroll.label text: "\n"
64
- scroll.h1 text: 'Horizontal panel with spacers'
64
+ scroll.h1 text: 'Spacers'
65
65
  scroll.panels_horizontal width: 'matchParent', childViews: ->(panel) do
66
66
  panel.button text: '1'
67
67
  panel.spacer width: 10
@@ -70,5 +70,22 @@ json_ui_page json do |page|
70
70
  panel.button text: '3'
71
71
  end
72
72
 
73
+ scroll.label text: "\n"
74
+ scroll.h1 text: 'Alignments'
75
+ scroll.panels_horizontal align: 'top', childViews: ->(panel) do
76
+ panel.button text: 'Button'
77
+ panel.spacer width: 10
78
+ panel.label text: 'top'
79
+ end
80
+ scroll.panels_horizontal align: 'middle', childViews: ->(panel) do
81
+ panel.button text: 'Button'
82
+ panel.spacer width: 10
83
+ panel.label text: 'middle'
84
+ end
85
+ scroll.panels_horizontal align: 'bottom', childViews: ->(panel) do
86
+ panel.button text: 'Button'
87
+ panel.spacer width: 10
88
+ panel.label text: 'bottom'
89
+ end
73
90
  end
74
91
  end
@@ -2,7 +2,7 @@ json.title 'Panels'
2
2
 
3
3
  json_ui_page json do |page|
4
4
  render "#{@path_prefix}/nav_menu", json: json, page: page
5
-
5
+
6
6
  page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
7
 
8
8
  scroll.h1 text: '2 columns'
@@ -157,8 +157,8 @@ json_ui_page json do |page|
157
157
  content.left childViews: ->(left) do
158
158
  left.label text: 'a very very very very very very very very very very very very very very very very very very very very very very very very very very very very long text'
159
159
  end
160
- content.right childViews: ->(right) do
161
- right.panels_horizontal backgroundColor: '#b3bac2', distribution: 'spaceEqually', childViews: ->(h) do
160
+ content.right width: 120, backgroundColor: '#b3bac2', childViews: ->(right) do
161
+ right.panels_horizontal distribution: 'spaceEqually', childViews: ->(h) do
162
162
  h.label text: 'Label One'
163
163
  h.label text: 'Label Two'
164
164
  end
@@ -167,7 +167,7 @@ json_ui_page json do |page|
167
167
 
168
168
  scroll.label text: "\n"
169
169
  scroll.h1 text: 'Combo 2'
170
- scroll.panels_split content: ->(content) do
170
+ scroll.panels_split width: 200, backgroundColor: '#b3bac2', padding: { right: 10 }, content: ->(content) do
171
171
  content.left childViews: ->(left) do
172
172
  left.button text: 'Big'
173
173
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.25
4
+ version: 0.4.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''