Skip to content

Commit

Permalink
fix buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
stmorse committed Sep 4, 2024
1 parent dc3961c commit 44e1ea1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,30 @@
{% assign prev_page = null %}
{% assign next_page = null %}
{% assign found = false %}
{% assign keepgoing = true %}

{% for parent in site.data.navigation %}
{% if parent.children %}
{{ parent.title }}...
{% if parent.children and keepgoing %}
has children...
{% for child in parent.children %}
child {{ child.title }}...
{% if child.url %}
has url,
{% if found %}
found true,
{% assign next_page = child %}
so nextpage is {{ next_page.title }} and break...
{% assign keepgoing = false %}
{% break %}
{% endif %}

{% if child.url == page.url %}
its this page,
{% assign found = true %}
{% else %}
{% assign prev_page = child %}
its not this page so make {{ prev_page.title }}
{% endif %}
{% endif %}
{% endfor %}
Expand Down

0 comments on commit 44e1ea1

Please sign in to comment.