
<nav class="sidebar">
  <div class="navlinks">
    {% set sortedSections = collection | sort(attribute='data.title') %}
    {% for section in sortedSections %}
    <a class="navlink" href="#{{ section.data.title }}">{{ section.data.title }}</a>
  {% endfor %}
  </div>
</nav>

<main tabindex="-1" id="main-content" class="main-content main-content-padding">
  <article class="">

    {% for item in navigation.items %}
      {% if page.url == item.url %}
        <h1 class="mb-heading">{{ item.text }}</h1>
      {% endif %}
    {% endfor %}

    {% set sortedSections = collection | sort(attribute='data.title') %}
    {% for section in sortedSections %}
      <section class="section" id="{{ section.data.title }}">
        <div class="section-header">
          <h4 class="section-title">{{ section.data.title }}</h2>
        </div>

        {% if section.data.type == 'block' %}
          {% set direction = 'y' %}
        {% else %}
          {% set direction = 'x' %}
        {% endif %}
        {{ section.templateContent | safe }}

      </section>
    {%- endfor -%}
  </article>
</main>



