{% if template.isHomepage %} {% if homepage %}
{{ homepage|raw }}
{% endif %} {% else %} {# Display each section, in order. The "root" element comes first in this loop, and can be detected using the "loop.first" variable as seen below. #} {% for section in sections %} {% set sectionElement = loop.first ? 'div' : 'section' %} <{{ sectionElement }} id="kssref-{{ section.referenceURI }}" class="kss-section kss-section--depth-{{ section.depth }} {% if template.isItem %}is-fullscreen{% endif %}">
{% set headerElement = (section.depth > 6) ? 'h6' : 'h' ~ section.depth %} <{{ headerElement }} class="kss-title kss-title--level-{{ section.depth }}"> {{ section.header }} {% if section.source.filename %}
Source: {{ section.source.filename }}, line {{ section.source.line }}
{% endif %} {% if section.example %}

{% if not template.isItem %} Toggle full screen Open in new window {% endif %} Toggle example guides Toggle HTML markup

{% endif %} {% if section.description %}
{{ section.description|raw }}
{% endif %} {% for parameter in section.parameters %} {% if loop.first %}
Parameters:
{% endif %} {% endfor %}
{% if section.example %}
Example{% if section.modifiers is not empty %}s{% endif %}
{% if section.modifiers is not empty %}
Default styling
{% endif %}
{{ section.example|raw }}
{% for modifier in section.modifiers %}
{{ modifier.name }}
{{ modifier.description|raw }}
{{ modifier.markup|raw }}
{% endfor %}
{% if section.markup %}
{% if section.markupFile %} Markup: {{ section.markupFile }} {% else %} Markup {% endif %}
{{ section.markup|escape('html') }}
{% endif %} {% endif %} {% endfor %} {% endif %}