<div class="seriesContext">
    <a>
        {% assign pages = site.pages | sort:"weight"  %}
        {% for pg in pages %}
        {% if pg.series == "ACME series" %}
        {% if pg.weight > page.weight %}
        <a href="{{pg.url | remove: '/'}}"><button type="button" class="btn btn-primary">Next: {{pg.title}}</button></a>
        {% break %}
        {% endif %}
        {% endif %}
        {% endfor %}
    </a>
    &nbsp;
    <div class="btn-group">
        <button type="button" data-toggle="dropdown" class="btn btn-primary dropdown-toggle">Jump to: <span class="caret"></span></button>
        <ol class="dropdown-menu">
            {% for pg in pages %}
            {% if pg.series == "ACME series" %}
            {% if pg.url == page.url %}
            <li class="active"> → {{pg.weight}}. {{pg.title}}</li>
            {% else %}
            <li>
                <a href="{{pg.url | remove: '/'}}">{{pg.title}}</a>
            </li>
            {% endif %}
            {% endif %}
            {% endfor %}
        </ol>
    </div>
</div>

{% comment %} Copyright 2021 DLR {% endcomment %}
