katalyst-content 0.2.2 → 1.0.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6a70b3f0781f419ffa9df75a608865a3e69d4e030df242474974379928cabdc
|
4
|
+
data.tar.gz: cd0f95f7f8ff3d4b29e889dad3dde799b507a95820b12b7f782a602b49cf9ef9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25b9b0794259db617629e901c24183d1a87bb0838b0a44ad123ec36702651c7aeb3c1cc6b5d39298fe08f3bc0bcba0f7440655689f86fffffb0ae5f7a5b44c3c
|
7
|
+
data.tar.gz: 282368127af2d0066744bcc44d2f3cfb25885f2d411420ac6c7d44f28d77424380905d7e8905854f7be2ae322e3b7e3feffe68c4eb5f85a9583e03522f7ea2d9
|
@@ -42,7 +42,7 @@ export default class Item {
|
|
42
42
|
* @returns {number} logical nesting depth of node in container
|
43
43
|
*/
|
44
44
|
get depth() {
|
45
|
-
return parseInt(this.node.dataset[`contentDepth`]);
|
45
|
+
return parseInt(this.node.dataset[`contentDepth`]) || 0;
|
46
46
|
}
|
47
47
|
|
48
48
|
get #depthInput() {
|
@@ -3,9 +3,18 @@
|
|
3
3
|
module Katalyst
|
4
4
|
module Content
|
5
5
|
module FrontendHelper
|
6
|
+
# Render all items from a content version as HTML
|
7
|
+
# @param version [Katalyst::Content::Version] The content version to render
|
8
|
+
# @return [ActiveSupport::SafeBuffer,String,nil] Content as HTML
|
9
|
+
# Example usage:
|
10
|
+
# <%= render_content(version) %>
|
6
11
|
def render_content(version)
|
7
|
-
|
8
|
-
|
12
|
+
capture do
|
13
|
+
cache version do
|
14
|
+
without_partial_path_prefix do
|
15
|
+
concat render partial: version.tree.select(&:visible?)
|
16
|
+
end
|
17
|
+
end
|
9
18
|
end
|
10
19
|
end
|
11
20
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katalyst-content
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katalyst Interactive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_storage_validations
|