Sha256: 9b2c02031939f75ccdee8bba089f37a3f7de0eae97ebbaa3c7593866b6b08e75

Contents?: true

Size: 1.15 KB

Versions: 11

Compression:

Stored size: 1.15 KB

Contents

{% assign about = site.posts | find: "layout", "about" %}

<nav class="navbar navbar-expand-lg d-print-block" role="navigation" aria-label="{{ site.i18n.menu.title }}">
  <a class="navbar-brand" href="?#">
    {% if about.logo.path %}
      <img src="{{ about.logo.path | thumbnail: nil, 30 | uri_escape }}" height="30" alt="{{ about.logo.description | default: about.title }}" />
    {% else %}
      {{ about.title }}
    {% endif %}
  </a>

  {% comment %}
    TODO: Add CSS-only hamburger menu.
  {% endcomment %}
  <ul class="navbar-nav d-print-none">
    {%- for item in site.i18n.menu.items -%}
      {% comment %}
        This makes it hard to just cache the whole navbar, but we prefer
        to mark the active item in code rather than with JS.
      {% endcomment %}

      <li class="nav-item">
        <a class="nav-link{% if page.url == item.url %} active{% endif %}" href="{{ item.url }}">
          {{ item.text }}

          {%- if page.url == item.url -%}
            <span class="sr-only">
              {{ site.i18n.menu.active | default: '(current)' }}
            </span>
          {%- endif %}
        </a>
      </li>
    {%- endfor -%}
  </ul>
</nav>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sutty-jekyll-theme-0.3.6 _includes/navbar.html
sutty-jekyll-theme-0.3.5 _includes/navbar.html
sutty-jekyll-theme-0.3.4 _includes/navbar.html
sutty-jekyll-theme-0.3.3 _includes/navbar.html
sutty-jekyll-theme-0.3.2 _includes/navbar.html
sutty-jekyll-theme-0.3.1 _includes/navbar.html
sutty-jekyll-theme-0.3.0 _includes/navbar.html
sutty-jekyll-theme-0.2.7 _includes/navbar.html
sutty-jekyll-theme-0.2.6 _includes/navbar.html
sutty-jekyll-theme-0.2.5 _includes/navbar.html
sutty-jekyll-theme-0.2.4 _includes/navbar.html