Improved tab highlighting experience.

This commit is contained in:
Cotes Chung 2020-02-09 02:57:45 +08:00
parent a0179b2efe
commit 0953cf123c
2 changed files with 5 additions and 2 deletions

View file

@ -113,6 +113,7 @@ defaults:
scope: scope:
path: tags path: tags
values: values:
tab_active: Tags
location: Tag location: Tag
breadcrumb: breadcrumb:
- -
@ -125,6 +126,7 @@ defaults:
scope: scope:
path: categories path: categories
values: values:
tab_active: Categories
location: Category location: Category
breadcrumb: breadcrumb:
- -

View file

@ -41,8 +41,9 @@
{% endif %} {% endif %}
<li class="nav-item d-flex justify-content-center <li class="nav-item d-flex justify-content-center
{% if item.url == page_urls.last or {% if item.url == page_urls.last
item.name == "Home" and page.layout == "home" %}active{% endif %}"> or item.name == page.tab_active
or item.name == "Home" and page.layout == "home" %}active{% endif %}">
<a href="{{ ref }}" class="nav-link d-flex justify-content-center align-items-center w-100"> <a href="{{ ref }}" class="nav-link d-flex justify-content-center align-items-center w-100">
<i class="fa-fw {{ item.icon }} ml-3 mr-3 unloaded"></i> <i class="fa-fw {{ item.icon }} ml-3 mr-3 unloaded"></i>
<span>{{ item.name | upcase }}</span> <span>{{ item.name | upcase }}</span>