-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from stckme/SupportDocDataAttributes
Support doc - Data Attributes
- Loading branch information
Showing
7 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.16.0 | ||
current_version = 0.17.0 | ||
commit = True | ||
tag = True | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<div data-show-gap="true" data-type="imageStrip"><figure><picture><source srcset="https://placekitten.com/200/301" type="image"/><source srcset="https://placekitten.com/200/301" type="image"/><img src="https://placekitten.com/200/301" alt="Sleepy Kitten"width="300" height="400"/></picture><figcaption>Cute Kitty</figcaption></figure><figure><picture><source srcset="https://placekitten.com/200/301" type="image"/><source srcset="https://placekitten.com/200/301" type="image"/><img src="https://placekitten.com/200/301" alt="Happy Kitten"width="300" height="400"/></picture><figcaption>New Kitty</figcaption></figure></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"type": "doc", | ||
"attrs": {"data": {"show-gap": "true", "type": "imageStrip"}}, | ||
"content": [ | ||
{ | ||
"type": "image", | ||
"attrs": { | ||
"src": { "image": "https://placekitten.com/200/301", "fallback": "https://placekitten.com/200/301" }, | ||
"alt": "Sleepy Kitten", | ||
"caption": "Cute Kitty", | ||
"height": 400, | ||
"width": 300 | ||
} | ||
}, | ||
{ | ||
"type": "image", | ||
"attrs": { | ||
"src": { "image": "https://placekitten.com/200/301", "fallback": "https://placekitten.com/200/301" }, | ||
"alt": "Happy Kitten", | ||
"caption": "New Kitty", | ||
"height": 400, | ||
"width": 300 | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
{%- if node.attrs and node.attrs.data -%} | ||
<div{% for attr, value in node.attrs.data.items() %} data-{{attr}}="{{value}}"{% endfor %}> | ||
{%- endif -%} | ||
{%- for item in node.content -%} | ||
{%- with template=item.type + '.html', node=item -%} | ||
{%- include template -%} | ||
{%- endwith -%} | ||
{%- endfor -%} | ||
{%- if node.attrs and node.attrs.data -%} | ||
</div> | ||
{%- endif -%} |