summaryrefslogtreecommitdiffstats
path: root/docs/theme/ExampleTabs.jinja
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-03 07:47:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-03 07:47:33 +0000
commit39bf3544d4064a528a85c21a9069a9cae364a6c1 (patch)
treeaa318bfe1e7816ba9492aff0cdd2454d278f5836 /docs/theme/ExampleTabs.jinja
parentAdding upstream version 0.45+dfsg. (diff)
downloadjinjax-39bf3544d4064a528a85c21a9069a9cae364a6c1.tar.xz
jinjax-39bf3544d4064a528a85c21a9069a9cae364a6c1.zip
Adding upstream version 0.46.upstream/0.46
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/theme/ExampleTabs.jinja')
-rw-r--r--docs/theme/ExampleTabs.jinja27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/theme/ExampleTabs.jinja b/docs/theme/ExampleTabs.jinja
new file mode 100644
index 0000000..0853ec5
--- /dev/null
+++ b/docs/theme/ExampleTabs.jinja
@@ -0,0 +1,27 @@
+{#def prefix, panels={} #}
+
+<div {{ attrs.render(
+ class="cd-example-tabs not-prose",
+ data_component="ExampleTabs",
+) }}>
+ <TabGroup class="example-tabgroup">
+ <TabList class="example-tablist" data-md-skip>
+ {%- for text in panels.keys() %}
+ <Tab
+ class="example-tab"
+ target={{ "ex-%s-%s" % (prefix, loop.index) }}
+ selected={{ loop.index == 1 }}
+ >{{ text }}</Tab>
+ {%- endfor %}
+ </TabList>
+ {%- for name in panels.values() %}
+ <TabPanel
+ class="example-tabpanel"
+ id={{ "ex-%s-%s" % (prefix, loop.index) }}
+ hidden={{ loop.index != 1 }}
+ >
+ {{ catalog.irender(name) }}
+ </TabPanel>
+ {%- endfor %}
+ </TabGroup>
+</div>