Closed f-hollow closed 2 months ago
This issue is a request to add tabs for code snippets, like this.
Requirements:
```c ...
Found two existing shortcodes
Code Toggle is implemented in the Hugo docs theme. This shortcode converts given code to YAML, JSON, and TOML formats, then creates a code block with respective tabs.
YAML
JSON
TOML
Tabs is implemented in the Learn theme. This is exactly what we need.
Some files containing the code for tabs are:
assets/css/tabs.css
assets/js/jquery-3.3.1.min.js
assets/js/tabs.js
layouts/shortcodes/tab.html
layouts/shortcodes/tabs.html
Tried both below, but they seem to lack css and javascript files, because I get several code snippets rendered one after another and no tabs.
@horw Feel free to take this issue.
This issue is a request to add tabs for code snippets, like this.
Requirements:
What I tried
Found two existing shortcodes
Code toggles #
Code Toggle is implemented in the Hugo docs theme. This shortcode converts given code to
YAML
,JSON
, andTOML
formats, then creates a code block with respective tabs.Tabs #
Tabs is implemented in the Learn theme. This is exactly what we need.
Some files containing the code for tabs are:
assets/css/tabs.css
assets/js/jquery-3.3.1.min.js
assets/js/tabs.js
layouts/shortcodes/tab.html
layouts/shortcodes/tabs.html
Other resources
Tried both below, but they seem to lack css and javascript files, because I get several code snippets rendered one after another and no tabs.