Refactor tabs implementation (#3268)
* Refactor tabs implementation * tidy head.html * test jquery-ui tabs * Initial tabs code refactor * test liquid parsing * test liquid stack * move into tabs.html * test jekyll tabs * construct array * test cleaner way * add example content * test split hack * fix md * add site.emptyArray * set good defaults * fix CSS * cleanup li * fix a href * fix content tabs * add space to default * remove a href underline * rename docs/tab-test.md to docs/tab-example.md * fix skip toc check * add assignees * add comment to reference example * add documentation to example * escape md * move demo to top, pretty it up * add word * tweak wording
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{% comment %} See /docs/tabs-example.md for usage example. {% endcomment %}
|
||||
{% assign tab_set_id = tab_set_name | default: "tabset" | slugify %}
|
||||
<div id="{{tab_set_id}}">
|
||||
<ul>
|
||||
{% for name in tab_names %}
|
||||
<li><a href="#{{tab_set_id}}-{{forloop.index0}}">{{ name | strip }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% for content in tab_contents %}
|
||||
<div id="{{tab_set_id}}-{{forloop.index0}}">
|
||||
{{ content | markdownify }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<script>$(function(){$("#{{tab_set_id}}").tabs();});</script>
|
||||
Reference in New Issue
Block a user