Sha256: 2c0fe04d5ac3fc23b501b6ad519ef2cd870c3381cb4d3fc29db5fe3bba6ec2e7
Contents?: true
Size: 1.21 KB
Versions: 1
Compression:
Stored size: 1.21 KB
Contents
{% if site.navigation_header %} <nav class="nav nav--header"> <button class="button button--nav" aria-label="Nav toggle"> {% include icon.html id="nav" %} </button> <ul class="list list--nav"> {% for item in site.navigation_header %} {% if item[1] contains '://' %} {% assign url = item[1] %} {% else %} {% assign url = item[1] | relative_url %} {% endif %} <li class="item item--nav{% if item[1] == page.url %} item--current{% endif %}"> <a href="{{ url }}" title="Page - {{ item[0] }}">{{ item[0] }}</a> </li> {% endfor %} </ul> </nav> {% else %} {% include nav-default.html %} {% endif %} <script type="text/javascript"> const applyToggle = (list, button, breakpoint) => { const navList = document.querySelector(list) if (document.body.clientWidth < breakpoint) { const navHeight = navList.clientHeight const navButton = document.querySelector(button) navList.style.maxHeight = '0px' navButton.onclick = () => { if (navList.style.maxHeight == '0px') { navList.style.maxHeight = `${navHeight}px` } else { navList.style.maxHeight = '0px' } } } } applyToggle('.list--nav', '.button', 640) </script>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alembic-jekyll-theme-2.1.0 | _includes/nav-header.html |