From 9bcda6af0877dd7f1bbb62324dd42f32754853cb Mon Sep 17 00:00:00 2001 From: occheung Date: Wed, 2 Jun 2021 14:31:04 +0800 Subject: [PATCH] fix top element color --- templates/_base.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/_base.html b/templates/_base.html index c2a7f7d..784182d 100644 --- a/templates/_base.html +++ b/templates/_base.html @@ -71,8 +71,8 @@ {% for section in section.subsections %} {% set subsection = get_section(path=section) %} - {% set root_current_path = current_path | split(pat='/') | first %} - {% set root_section_path = subsection.path | split(pat='/') | first %} + {% set root_current_path = current_path | trim_start_matches(pat='/') | split(pat='/') | first %} + {% set root_section_path = subsection.path | trim_start_matches(pat='/') | split(pat='/') | first %} {% if subsection.pages|length > 0 and subsection.title != 'Other' %}