Sha256: d537c29633ea80c8f00221b88a1bf03649bbc8f7b02df2444d47f8586eaa9943

Contents?: true

Size: 1.2 KB

Versions: 4

Compression:

Stored size: 1.2 KB

Contents

{% unless page.hideNavBar %}
{%- if site.title.size > 0  %}
<h1> <a href="{{ '/' | relative_url }}"> {{ site.title }} </a></h1>
{%- endif -%}
{%- capture currentUrl -%}{{ page.url | relative_url}}{%- endcapture %}
<nav>
    <ul class="navul">
      
      {%-for item in site.theme_config.menu %}
        <li class="navli">
        {%- if item.url -%}
          {%- capture itemurl -%}{{ item.url | relative_url}}{%- endcapture -%}
          
        {%- assign iscurrent= false %}
        {%- if currentUrl == itemurl -%}
              {%- assign iscurrent= true %}
        {%- else -%}
              {%- for subpath in item.subpath %}
                 {%- if currentUrl contains subpath %}
                 {%- assign iscurrent= true %}
                 {%- break %}
                {%- endif  %}
              {%- endfor %}
        {%- endif %}

          {%- if iscurrent  == true -%}
              <a href="{{ itemurl }}" class="curNav">{{ item.title }}</a>
          {%- else -%}
              <a href="{{ itemurl }}" class="nav">{{ item.title }}</a>
          {%- endif - -%}
          
        {%- else -%}
          {{ item.title }}
        {%- endif -%}
        </li>
      {%-endfor-%}
    </ul>
</nav>
{% endunless %}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jekyll-zeta-0.9.5.1 _includes/navbar.html
jekyll-zeta-0.9.5 _includes/navbar.html
jekyll-zeta-0.9.4.4 _includes/navbar.html
jekyll-zeta-0.9.4.3 _includes/navbar.html