From 72ba1f7849e1038da02fd963a24580af2532602d Mon Sep 17 00:00:00 2001
From: Cotes Chung <11371340+cotes2020@users.noreply.github.com>
Date: Tue, 3 Aug 2021 22:55:35 +0800
Subject: [PATCH] Fix tabs & improve topbar items
---
_includes/sidebar.html | 2 +-
_includes/topbar.html | 16 ++++++----------
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/_includes/sidebar.html b/_includes/sidebar.html
index b32d717..c3a116a 100644
--- a/_includes/sidebar.html
+++ b/_includes/sidebar.html
@@ -42,7 +42,7 @@
{% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
- {{ site.data.locales[lang].tabs.[tab_name] | default: tab_name | upcase }}
+ {{ site.data.locales[lang].tabs.[tab_name] | default: tab.title | upcase }}
{% endfor %}
diff --git a/_includes/topbar.html b/_includes/topbar.html
index 6ecc176..051b12b 100644
--- a/_includes/topbar.html
+++ b/_includes/topbar.html
@@ -31,16 +31,12 @@
{{ page.title }}
{% endif %}
- {% else %}
-
- {% unless page.layout == 'post' %}
-
-
- {{ site.data.locales[lang].tabs[item] | default: page.title }}
-
-
- {% endunless %}
-
+ {% elsif page.layout == 'category' or page.layout == 'tag' %}
+
+
+ {{ site.data.locales[lang].tabs[item] | default: page.title }}
+
+
{% endif %}
{% endfor %}