Sha256: c91dc95faddcf72401d8055a65c59dcdd1fe4d61d6257908e28a117ecfde70ce

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

{%- 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 -%}
              <text class="curNav">{{ item.title }}</text>
          {%- else -%}
              <a href="{{ itemurl }}">{{ item.title }}</a>
          {%- endif - -%}
          
        {%- else -%}
          {{ item.title }}
        {%- endif -%}
        </li>
      {%-endfor-%}
    </ul>
</nav>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-zeta-0.4.0 _includes/navbar.html