MkImageCompare
Node to show an Image comparison (using a slider).¶
Example: Regular¶
Bases: MkTemplate
Name | Children | Inherits |
---|---|---|
MkTemplate mknodes.templatenodes.mktemplate Node representing a jinja template. |
graph TD
93860742946240["mkimagecompare.MkImageCompare"]
93860738888176["mktemplate.MkTemplate"]
93860744077920["mkcontainer.MkContainer"]
93860744073616["mknode.MkNode"]
93860744080896["node.Node"]
140589822947552["builtins.object"]
93860738888176 --> 93860742946240
93860744077920 --> 93860738888176
93860744073616 --> 93860744077920
93860744080896 --> 93860744073616
140589822947552 --> 93860744080896
/home/runner/work/mknodes/mknodes/mknodes/basenodes/mkimagecompare/metadata.toml
[metadata]
icon = "mdi:image-off"
name = "MkImageCompare"
group = "image"
[[resources.js]]
link = "https://unpkg.com/img-comparison-slider@7/dist/index.js"
defer = true
[[resources.css]]
filename = "https://unpkg.com/img-comparison-slider@7/dist/styles.css"
[examples.regular]
title = "Regular"
jinja = """
{{ "https://picsum.photos/700" | MkImageCompare(after_image="https://picsum.photos/701") }}
"""
[output.html]
template = """
<img-comparison-slider>
<img src="{{ node.before_image }}" slot="first">
<img src="{{ node.after_image }}" slot="second">
</img-comparison-slider>
"""