mirror of
https://github.com/danog/sass-site.git
synced 2024-11-30 04:29:17 +01:00
19 lines
729 B
Plaintext
19 lines
729 B
Plaintext
<ul>
|
|
{%- if parent_href -%}
|
|
<li class="overview">
|
|
<a href="{{ parent_href }}" {% if url == parent_href %}class="selected"{% endif %}>Overview</a>
|
|
</li>
|
|
{%- endif -%}
|
|
{%- for section in toc -%}
|
|
{%- assign link = section | getDocTocData -%}
|
|
{%- assign children = section[':children'] -%}
|
|
{%- assign is_open = url == '' and link.expanded -%}
|
|
<li>
|
|
<a href="{{ link.href }}" class="{% if children %}section {% endif %}{% if url | startsWith: link.href %}open selected{% elsif is_open %}open{% endif %}">{{ link.text }}</a>
|
|
{%- if children -%}
|
|
{% render 'documentation_toc', url: url, toc: children, parent_href: link.href %}
|
|
{%- endif -%}
|
|
</li>
|
|
{%- endfor -%}
|
|
</ul>
|