-
-
Notifications
You must be signed in to change notification settings - Fork 681
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
114 additions
and
91 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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<is-land on:visible import="/js/seven-minute-tabs.js"> | ||
<seven-minute-tabs persist sync class="tabs-flush"> | ||
{% renderFile "./src/_includes/syntax-chooser-tablist.11ty.js", {id: "rendercontent"} %} | ||
<div id="rendercontent-liquid" role="tabpanel"> | ||
|
||
{% raw %} | ||
```liquid | ||
--- | ||
myData: | ||
key: value | ||
--- | ||
{% renderFile "./_includes/blogpost.md", myData, "njk" %} | ||
``` | ||
{% endraw %} | ||
|
||
</div> | ||
<div id="rendercontent-njk" role="tabpanel"> | ||
|
||
{% raw %} | ||
```jinja2 | ||
--- | ||
myData: | ||
key: value | ||
--- | ||
{% renderFile "./_includes/blogpost.md", myData, "njk" %} | ||
``` | ||
{% endraw %} | ||
|
||
</div> | ||
<div id="rendercontent-js" role="tabpanel"> | ||
|
||
{% raw %} | ||
```js | ||
export const data = { | ||
myData: { | ||
myKey: "myValue", | ||
}, | ||
}; | ||
export async function render(data) { | ||
return await this.renderFile("./includes/blogpost.md", data.myData, "njk"); | ||
}; | ||
``` | ||
{% endraw %} | ||
|
||
</div> | ||
<div id="rendercontent-cjs" role="tabpanel"> | ||
|
||
{% raw %} | ||
```js | ||
module.exports.data = { | ||
myData: { | ||
myKey: "myValue", | ||
}, | ||
}; | ||
module.exports.render = async function (data) { | ||
return await this.renderFile("./includes/blogpost.md", data.myData, "njk"); | ||
}; | ||
``` | ||
{% endraw %} | ||
|
||
</div> | ||
</seven-minute-tabs> | ||
</is-land> |
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 was deleted.
Oops, something went wrong.
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
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