Sha256: 3d935e6087c98907d4d763b4b161944ba90550fdd5575f77de2e0b42a78bfa17

Contents?: true

Size: 1.29 KB

Versions: 8

Compression:

Stored size: 1.29 KB

Contents

{% assign segs = site.data.course.segments %}
{% for s in segs %}
  {% if s == include.segment %}
    {% assign segnum = forloop.index0 %}
    {% break %}
  {% endif %}
{% endfor %}

{% assign p = segnum | minus: 1 %}
{% assign n = segnum | plus: 1 %}
{% if p != -1 %}{% assign prev = segs[p] %}{% endif %}
{% assign next = segs[n] %}

<section class="center-align">
  <div class="middle-align">
    {% if prev %}
      {% if include.icon %}
        {{ site.data.syllabus[prev].title }}
      {% endif %}
      <a href="/segment/{{ prev }}" class="material-symbols-outlined md-48">navigate_before</a>
    {% else %}
      <span class="material-symbols-outlined md-48 md-disabled">navigate_before</span>
    {% endif %}

    {% if include.icon %}
      <a href="/segment/{{ include.segment }}" class="material-symbols-outlined">calendar_today</a>
    {% else %}
      <a href="/segment/{{ include.segment }}"><h3>{{ site.data.syllabus[include.segment].title }}</h3></a>
    {% endif %}

    {% if next %}
      <a href="/segment/{{ next }}" class="material-symbols-outlined md-48">navigate_next</a>
      {% if include.icon %}
        {{ site.data.syllabus[next].title }}
      {% endif %}
    {% else %}
      <span class="material-symbols-outlined md-48 md-disabled">navigate_next</span>
    {% endif %}
  </div>
</section>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
askclass-course-theme-0.6.0 _includes/segment/nav.html
askclass-course-theme-0.5.2 _includes/segment/nav.html
askclass-course-theme-0.5.1 _includes/segment/nav.html
askclass-course-theme-0.5.0 _includes/segment/nav.html
askclass-course-theme-0.4.0 _includes/segment/nav.html
askclass-course-theme-0.3.0 _includes/segment/nav.html
askclass-course-theme-0.2.0 _includes/segment/nav.html
askclass-course-theme-0.1.0 _includes/segment/nav.html