katalyst-content 3.1.1 → 3.1.2
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 +4 -4
- data/app/assets/stylesheets/katalyst/content/frontend/frontend.css +2 -6
- data/app/components/katalyst/content/editor/base_component.rb +1 -1
- data/app/controllers/katalyst/content/items_controller.rb +3 -3
- data/app/helpers/katalyst/content/table_helper.rb +2 -2
- data/app/models/concerns/katalyst/content/container.rb +1 -1
- data/app/models/concerns/katalyst/content/has_tree.rb +2 -2
- data/app/models/concerns/katalyst/content/version.rb +1 -1
- data/app/models/katalyst/content/layout.rb +5 -0
- data/app/models/katalyst/content/tables/importer.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5e38cbf36ab348007822df1209895dd018187732543a5e30a415b45c6c76eea2
|
|
4
|
+
data.tar.gz: 1594f99bc385122dec95d1193579de7f7405981233fdff7d304f8628295883fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5881d775194f04bb5ac2b53b7585281661c5633306cbf91dbae7c08853ee1e5eba22c92366c65152836543c3c01bbd0952610c77330a2630d0f9cd4c776a9842
|
|
7
|
+
data.tar.gz: 425ca40e2cd4b354e792e09a25dc6ec3cd0a99a4725ee5ce862f7ff9886d4d07fe161882be1a5c209dc5137cd09ef1b2412769a9883c7482a93f83e16fb8866b
|
|
@@ -34,22 +34,18 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.content-item [data-content-theme] {
|
|
37
|
+
background: var(--background, unset);
|
|
38
|
+
color: var(--text-color);
|
|
37
39
|
padding-inline: var(--content-inline-gutter);
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
[data-content-theme="light"] {
|
|
41
|
-
background: var(--background, var(--background-color));
|
|
42
|
-
color: var(--text-color);
|
|
43
|
-
|
|
44
43
|
--text-color: var(--color-dark, black);
|
|
45
44
|
--background: var(--color-light, black);
|
|
46
45
|
--link-color: var(--color-dark, black);
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
[data-content-theme="dark"] {
|
|
50
|
-
background: var(--background, var(--background-color));
|
|
51
|
-
color: var(--text-color);
|
|
52
|
-
|
|
53
49
|
--text-color: var(--color-light, white);
|
|
54
50
|
--background: var(--color-dark, black);
|
|
55
51
|
--link-color: var(--color-light, white);
|
|
@@ -50,7 +50,7 @@ module Katalyst
|
|
|
50
50
|
|
|
51
51
|
def item_params_type
|
|
52
52
|
requested_type = params.require(:item).fetch(:type, "")
|
|
53
|
-
if (type
|
|
53
|
+
if (type = Katalyst::Content.config.items.find { |t| t == requested_type })
|
|
54
54
|
type.safe_constantize
|
|
55
55
|
else
|
|
56
56
|
Item
|
|
@@ -70,9 +70,9 @@ module Katalyst
|
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
def set_item
|
|
73
|
-
@item = Item.find(params
|
|
73
|
+
@item = Item.find(params.expect(:id))
|
|
74
74
|
@container = @item.container
|
|
75
|
-
@editor
|
|
75
|
+
@editor = Katalyst::Content::EditorComponent.new(container:, item:)
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
def set_editor_variant
|
|
@@ -53,7 +53,7 @@ module Katalyst
|
|
|
53
53
|
|
|
54
54
|
return unless @node
|
|
55
55
|
|
|
56
|
-
@heading_rows
|
|
56
|
+
@heading_rows = @table.heading_rows.clamp(0..css("tr").length)
|
|
57
57
|
@heading_columns = @table.heading_columns.clamp(0..)
|
|
58
58
|
end
|
|
59
59
|
|
|
@@ -94,7 +94,7 @@ module Katalyst
|
|
|
94
94
|
# e.g. colspan=2 rowspan=3 would occupy 6 cells
|
|
95
95
|
row_range(cell, y).each do |ty|
|
|
96
96
|
col_range(cell, x).each do |tx|
|
|
97
|
-
matrix[ty]
|
|
97
|
+
matrix[ty] ||= []
|
|
98
98
|
matrix[ty][tx] = cell.text
|
|
99
99
|
end
|
|
100
100
|
end
|
|
@@ -57,7 +57,7 @@ module Katalyst
|
|
|
57
57
|
|
|
58
58
|
# Add node to the top of builder stacks
|
|
59
59
|
def push(node)
|
|
60
|
-
self.depth
|
|
60
|
+
self.depth += 1
|
|
61
61
|
self.current = node
|
|
62
62
|
self.children = node.children = []
|
|
63
63
|
node
|
|
@@ -65,7 +65,7 @@ module Katalyst
|
|
|
65
65
|
|
|
66
66
|
# Remove current from builder stack
|
|
67
67
|
def pop
|
|
68
|
-
previous
|
|
68
|
+
previous = current
|
|
69
69
|
self.depth -= 1
|
|
70
70
|
if depth.zero?
|
|
71
71
|
self.current = nil
|
|
@@ -77,7 +77,7 @@ module Katalyst
|
|
|
77
77
|
|
|
78
78
|
def header_row_caption?
|
|
79
79
|
!at_css("caption") &&
|
|
80
|
-
(tr
|
|
80
|
+
(tr = at_css("thead > tr:first-child"))&.elements&.one? &&
|
|
81
81
|
(colspan = tr.elements.first.attributes["colspan"]&.value) &&
|
|
82
82
|
colspan.to_i > 1
|
|
83
83
|
end
|
|
@@ -130,10 +130,10 @@ module Katalyst
|
|
|
130
130
|
|
|
131
131
|
# Promotes the first row to a caption if it only has one cell.
|
|
132
132
|
def promote_header_row_caption!
|
|
133
|
-
tr
|
|
134
|
-
cell
|
|
133
|
+
tr = at_css("thead > tr:first-child")
|
|
134
|
+
cell = tr.elements.first
|
|
135
135
|
tr.remove
|
|
136
|
-
thead
|
|
136
|
+
thead = at_css("thead")
|
|
137
137
|
thead.before("<caption></caption>")
|
|
138
138
|
thead.remove if thead.elements.empty?
|
|
139
139
|
at_css("caption").inner_html = cell.inner_html.strip
|
|
@@ -141,7 +141,7 @@ module Katalyst
|
|
|
141
141
|
|
|
142
142
|
# Set heading from caption and remove the caption from the table.
|
|
143
143
|
def set_heading!
|
|
144
|
-
caption
|
|
144
|
+
caption = at_css("caption")
|
|
145
145
|
table.heading = caption.text.strip
|
|
146
146
|
table.heading_style = "default"
|
|
147
147
|
caption.remove
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: katalyst-content
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.1.
|
|
4
|
+
version: 3.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Katalyst Interactive
|
|
@@ -228,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
228
228
|
- !ruby/object:Gem::Version
|
|
229
229
|
version: '0'
|
|
230
230
|
requirements: []
|
|
231
|
-
rubygems_version: 4.0.
|
|
231
|
+
rubygems_version: 4.0.10
|
|
232
232
|
specification_version: 4
|
|
233
233
|
summary: Rich content page builder and editor
|
|
234
234
|
test_files: []
|