From bbc48e75bf035f98270a28ea6dcb4c54b441605b Mon Sep 17 00:00:00 2001 From: squidfunk Date: Thu, 2 Mar 2017 15:55:22 +0100 Subject: [PATCH] Fixed missing link in tabs navigation on deeply nested items --- material/partials/tabs-item.html | 28 ++++++++++++++---------- src/partials/tabs-item.html | 37 ++++++++++++++++++++------------ 2 files changed, 40 insertions(+), 25 deletions(-) diff --git a/material/partials/tabs-item.html b/material/partials/tabs-item.html index aef42d77e..686b5a59b 100644 --- a/material/partials/tabs-item.html +++ b/material/partials/tabs-item.html @@ -11,15 +11,21 @@ {% endif %} {% elif nav_item.children and nav_item.children | length > 0 %} -
  • - {% if nav_item.active %} - - {{ nav_item.title }} - - {% else %} - - {{ nav_item.title }} - - {% endif %} -
  • + {% set title = title | default(nav_item.title) %} + {% if (nav_item.children | first).children | length > 0 %} + {% set nav_item = nav_item.children | first %} + {% include "partials/tabs-item.html" %} + {% else %} +
  • + {% if nav_item.active %} + + {{ title }} + + {% else %} + + {{ title }} + + {% endif %} +
  • + {% endif %} {% endif %} diff --git a/src/partials/tabs-item.html b/src/partials/tabs-item.html index acfb04ede..60759edd3 100644 --- a/src/partials/tabs-item.html +++ b/src/partials/tabs-item.html @@ -38,18 +38,27 @@ {% elif nav_item.children and nav_item.children | length > 0 %} -
  • - {% if nav_item.active %} - - {{ nav_item.title }} - - {% else %} - - {{ nav_item.title }} - - {% endif %} -
  • + {% set title = title | default(nav_item.title) %} + + + {% if (nav_item.children | first).children | length > 0 %} + {% set nav_item = nav_item.children | first %} + {% include "partials/tabs-item.html" %} + + + {% else %} +
  • + {% if nav_item.active %} + + {{ title }} + + {% else %} + + {{ title }} + + {% endif %} +
  • + {% endif %} {% endif %}