_includes/nav.html in jekyll-theme-prologue-0.3.2 vs _includes/nav.html in jekyll-theme-prologue-0.3.3
- old
+ new
@@ -11,18 +11,25 @@
{%- assign _pages = _pages | sort: 'order' -%}
{%- for _page in _pages -%}
{%- assign _title = _page.title | default: _page.layout -%}
{%- assign _slug = _title | slugify -%}
{%- assign _icon = _page.icon | default: 'fa-link' -%}
+ {%- if _page.icon-style == 'regular' -%}
+ {%- assign _class = 'icon-r' -%}
+ {%- elsif _page.icon-style == 'brands' -%}
+ {%- assign _class = 'icon-b' -%}
+ {%- else -%}
+ {%- assign _class = 'icon' -%}
+ {%- endif -%}
{%- comment -%}<!-- page.url (no underscore) is the url of the current page-->{%- endcomment -%}
{%- if _page.url == page.url -%}
<li><a href="#" id="{{- _slug -}}" class="active">
- <span class="icon {{ _icon }}">{{- _title -}}</span>
+ <span class="{{ _class }} {{ _icon }}">{{- _title -}}</span>
</a></li>
{%- elsif _page.url -%}
<li><a href="{{- _page.url | absolute_url -}}" id="{{- _slug -}}-link">
- <span class="icon {{ _icon }}">{{- _title -}}</span>
+ <span class="{{ _class }} {{ _icon }}">{{- _title -}}</span>
</a></li>
{%- else -%}
<li><a href="{{- '/' | absolute_url -}}" id="broken-link"><span class="icon fa-unlink">[broken link]</span></a></li>
{%- endif -%}
{%- endfor -%}
@@ -32,10 +39,17 @@
{%- unless _sections == null -%}
{%- for _sect in _sections -%}
{%- assign _title = _sect.title | default: _sect.layout | default: 'Untitled' -%}
{%- assign _slug = _title | slugify -%}
{%- assign _icon = _sect.icon | default: 'fa-file' -%}
- <li><a href="#{{- _slug -}}" id="{{- _slug -}}-link" class="scrolly"><span class="icon {{ _icon }}">{{- _title -}}</span></a></li>
+ {%- if _sect.icon-style == 'regular' -%}
+ {%- assign _class = 'icon-r' -%}
+ {%- elsif _sect.icon-style == 'brands' -%}
+ {%- assign _class = 'icon-b' -%}
+ {%- else -%}
+ {%- assign _class = 'icon' -%}
+ {%- endif -%}
+ <li><a href="#{{- _slug -}}" id="{{- _slug -}}-link" class="scrolly"><span class="{{ _class }} {{ _icon }}">{{- _title -}}</span></a></li>
{%- endfor -%}
{%- endunless -%}
</ul>
</nav>
\ No newline at end of file