+ {% endif %} + {% if template.isHomepage %} + {% if homepage %} +
+ {{ homepage|safe }} +
+ {% 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 = 'div' if loop.first else 'section' %} + <{{ sectionElement }} id="kssref-{{ section.referenceURI }}" class="kss-section kss-section--depth-{{ section.depth }} {% if template.isItem %}is-fullscreen{% endif %}"> + {% if not template.isItem %} +
+ {% set headerElement = 'h6' if (section.depth > 6) else 'h' ~ section.depth %} + <{{ headerElement }} class="kss-title kss-title--level-{{ section.depth }}"> + + + {{ section.referenceNumber }} + + {{ '#permalink' if hasNumericReferences else section.reference }} + + + {{ section.header }} + + + + {% if section.example %} +

+ {% if not template.isItem %} + + Open in new window + + + + + + + + + + {% endif %} +

+ {% endif %} + + {% if section.description %} +
+ {{ section.description|safe }} +
+ {% endif %} + + {% if section.colors %} +
    + {% for color in section.colors %} +
  • +
    +
    +
    + {% if color.name %} +
    var({{ color.name }})
    + {% endif %} +
    {{ color.color }}
    + {% if color.description %} +
    {{ color.description }}
    + {% endif %} +
    +
    +
  • + {% endfor %} +
+ {% endif %} + + {% for parameter in section.parameters %} + {% if loop.first %} +
Parameters:
+
    + {% endif %} +
  • +
    {{ parameter.name }}
    +
    + {{ parameter.description|safe }} + {% if parameter.defaultValue %} +
    + Defaults to: {{ parameter.defaultValue }} +
    + {% endif %} +
    +
  • + {% if loop.last %} +
+ {% endif %} + {% endfor %} +
+ {% endif %} + + {% if section.example %} +
+ {% if not template.isItem %} +
+ Example{% if section.modifiers %}s{% endif %} +
+ + + {% if section.modifiers %} +
+ Default styling +
+ {% endif %} + {% endif %} + +
+ {{ section.example|safe }} + +
+ + {% for modifier in section.modifiers %} +
+ {{ modifier.name }} +
+
+ {{ modifier.description|safe }} +
+
+ {{ modifier.markup|safe }} + +
+ {% endfor %} +
+ + {% if section.markup %} + {% if not template.isItem %} +
+ + {% if section.markupFile %} + Markup: {{ section.markupFile }} + {% else %} + Markup + {% endif %} + + {#
{{example}}
#} +
{{ section.example | escape }}
+ + +
+ {% endif %} + {% endif %} + {% endif %} + + {% if section.source.filename %} + {% if not template.isItem %} +
+ Source: {{ section.source.filename }}, line {{ section.source.line }} +
+ {% endif %} + {% endif %} + + {% endfor %} + {% endif %} + {% if not template.isItem %} +