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:
Andrew Chen
2017-05-04 13:52:59 -07:00
committed by GitHub
parent 204aad82b1
commit 105942fdb4
7 changed files with 147 additions and 24 deletions
+15
View File
@@ -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>