Skip to content

Commit

Permalink
Obsoletes navbarlink with relative_url filter (daattali#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
abelcheung authored and daattali committed Jun 23, 2019
1 parent 308c449 commit aca0827
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 31 deletions.
28 changes: 13 additions & 15 deletions _includes/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,31 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{% if site.title-img %}
{%- if site.title-img -%}
<a class="navbar-brand navbar-brand-logo" href="{{ '' | absolute_url }}"><img src="{{ site.title-img }}"/></a>
{% else %}
{%- else -%}
<a class="navbar-brand" href="{{ '' | absolute_url }}">{{ site.title }}</a>
{% endif %}
{%- endif -%}
</div>

<div class="collapse navbar-collapse" id="main-navbar">
<ul class="nav navbar-nav navbar-right">
{% for link in site.navbar-links %}
{% if link[1].first %}
{%- for link in site.navbar-links -%}
{%- if link[1].first %}
<li class="navlinks-container">
<a class="navlinks-parent" href="javascript:void(0)">{{ link[0] }}</a>
<div class="navlinks-children">
{% for childlink in link[1] %}
{% for linkparts in childlink %}
{% include navbarlink.html link=linkparts %}
{% endfor %}
{% endfor %}
{%- for childlink in link[1] -%}
{%- for linkparts in childlink %}
<a href="{{ linkparts[1] | relative_url }}">{{ linkparts[0] }}</a>
{%- endfor -%}
{%- endfor %}
</div>
</li>
{% else %}
<li>
{% include navbarlink.html link=link %}
</li>
{% endif %}
{% endfor %}
<li><a href="{{ link[1] | relative_url }}">{{ link[0] }}</a></li>
{%- endif -%}
{%- endfor -%}
</ul>
</div>

Expand Down
16 changes: 0 additions & 16 deletions _includes/navbarlink.html

This file was deleted.

0 comments on commit aca0827

Please sign in to comment.