_includes/header.html in jenstep_theme-0.1.2 vs _includes/header.html in jenstep_theme-0.1.3

- old
+ new

@@ -15,15 +15,27 @@ </svg> </span> </label> <div class="trigger"> - {%- for path in page_paths -%} - {%- assign my_page = site.pages | where: "path", path | first -%} - {%- if my_page.title -%} - <a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a> - {%- endif -%} - {%- endfor -%} + <ul> + {% assign links = site.data.navigation %} + {% for link in links %} + {% if link.sublinks %} + <li class="dropdown"> + <a href="{{ site.url }}{{ site.baseurl }}{{ link.url }}">{{ link.title }}</a> + <div class="dropdown-content"> + {% for sublink in link.sublinks %} + <a href="{{ site.url }}{{ site.baseurl }}{{ sublink.url }}">{{ sublink.title }}</a> + {% endfor %} + </div> + </li> + {% else %} + <li> + <a href="{{ site.url }}{{ site.baseurl }}{{ link.url }}">{{ link.title }}</a> + {% endif %} + {% endfor %} + </ul> </div> </nav> {%- endif -%} </div> </header>