Fix tabs & improve topbar items

This commit is contained in:
Cotes Chung 2021-08-03 22:55:35 +08:00
parent 46d80cbf9a
commit 72ba1f7849
2 changed files with 7 additions and 11 deletions

View file

@ -42,7 +42,7 @@
<i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i> <i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i>
{% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %} {% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
<span>{{ site.data.locales[lang].tabs.[tab_name] | default: tab_name | upcase }}</span> <span>{{ site.data.locales[lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
</a> </a>
</li> <!-- .nav-item --> </li> <!-- .nav-item -->
{% endfor %} {% endfor %}

View file

@ -31,16 +31,12 @@
<span>{{ page.title }}</span> <span>{{ page.title }}</span>
{% endif %} {% endif %}
{% else %} {% elsif page.layout == 'category' or page.layout == 'tag' %}
{% unless page.layout == 'post' %}
<span> <span>
<a href="{{ item | relative_url }}"> <a href="{{ item | relative_url }}">
{{ site.data.locales[lang].tabs[item] | default: page.title }} {{ site.data.locales[lang].tabs[item] | default: page.title }}
</a> </a>
</span> </span>
{% endunless %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}