Skip to content

Commit

Permalink
test layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Katy Anton committed Apr 7, 2024
1 parent 14a7f84 commit 34a8cd5
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions _includes/sub_navigation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{% assign spages = site.pages | where:"document","OWASP Top Ten Proactive Controls 2024"| sort: "order" }
{% assign getnext = false %}
{% assign getprevious = true %}
{% for cs in spages %}
{% if getnext %}
{% assign next = cs %}
{% break %}
{% endif %}
{% if cs.url == page.url %}
{% assign getnext = true %}
{% assign getprevious = false %}
{% endif %}
{% if getprevious %}
{% assign previous = cs %}
{% endif %}
{% endfor %}


<nav role="navigation" aria-label="navigate page">
<ol>
{% if previous %}
{% if dev_file.size == 0 %}
{% assign href = site.github.url | append: previous.url | replace: "www2.", "" | replace: ".html", "" | replace: 'http://', 'https://' %}
{% else %}
{% assign href = previous.url %}
{% endif %}
<li class='page previous'><a href="{{ href }}"><span style="font-size: 3em; color: lightgray; vertical-align:middle;">
<i class="fas fa-angle-left"></i>
</span>{{ previous.title }}</a></li>
{% endif %}
{% if next %}
{% if dev_file.size == 0 %}
{% assign href = site.github.url | append: next.url | replace: "www2.", "" | replace: ".html", "" | replace: 'http://', 'https://' %}
{% else %}
{% assign href = next.url %}
{% endif %}
<li class='page next'><a href="{{ href }}">{{ next.title }}<span style="font-size: 3em; color: lightgray; vertical-align:middle;">
<i class="fas fa-angle-right"></i>
</span></a></li>
{% endif %}
</ol>
</nav>

0 comments on commit 34a8cd5

Please sign in to comment.