Added dynamic non-JS submenu
* closes #6 Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
@ -3,7 +3,17 @@
|
||||
|
||||
{% include head.html %}
|
||||
|
||||
<body>
|
||||
{% assign showSubmenu = false %}
|
||||
{% for item in site.data.header-menu.items %}
|
||||
{% if item.items %}
|
||||
{% if page.url == item.link %}
|
||||
{% assign showSubmenu = true %}
|
||||
{% elsif page.parent_link == item.link %}
|
||||
{% assign showSubmenu = true %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<body class="{% if showSubmenu %}submenu{% endif %}">
|
||||
{% include header.html %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user