From 79f277c8fe2226fdeeda040000bbe9f6b12b7984 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 27 Jan 2017 23:54:52 +0100 Subject: [PATCH] Activate root tab when there'e an active page on the root level --- material/partials/tabs-item.html | 2 +- src/partials/tabs-item.html | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/material/partials/tabs-item.html b/material/partials/tabs-item.html index fb6872cef..d90bc767f 100644 --- a/material/partials/tabs-item.html +++ b/material/partials/tabs-item.html @@ -4,7 +4,7 @@ {{ nav_item.title }} {% elif nav_item.url == base_url %} - + {{ nav_item.title }} {% endif %} diff --git a/src/partials/tabs-item.html b/src/partials/tabs-item.html index 62f7fdfe5..3239595a3 100644 --- a/src/partials/tabs-item.html +++ b/src/partials/tabs-item.html @@ -33,14 +33,22 @@ {{ nav_item.title }} - - + {% elif nav_item.url == base_url %} + + + {% for nav_item_ in nav %} + {{nav_item_.children | length}} + {% if nav_item_.url == page.url and + nav_item_.children | length == 0 %} + md-tabs__link--active + {% endif %} + {% endfor %}"> {{ nav_item.title }} {% endif %}