summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-07-27 09:56:57 +0800
committerEltrac <hi@guhub.cn>2025-07-27 09:56:57 +0800
commitf43a1c8a171b0535ecadd0ecc926073aa9873802 (patch)
tree47104e15888ee43255ba1a229b6d699247d87dbc
parentb64e0b67a1a425bb79055c1e42b12f5807836d66 (diff)
feat: add tooltip to stats page link icon
-rw-r--r--i18n/en.yml1
-rw-r--r--i18n/zh.yml1
-rw-r--r--layouts/_partials/home/home-nav.html3
3 files changed, 4 insertions, 1 deletions
diff --git a/i18n/en.yml b/i18n/en.yml
index c574fdb5..12ea2ed1 100644
--- a/i18n/en.yml
+++ b/i18n/en.yml
@@ -24,3 +24,4 @@ termPage:
cards: 'Cards about this topic'
books: "Books I've read about this topic"
RSS: RSS
+statsTooltip: Insights
diff --git a/i18n/zh.yml b/i18n/zh.yml
index df0e5c05..7d3fd5c5 100644
--- a/i18n/zh.yml
+++ b/i18n/zh.yml
@@ -25,3 +25,4 @@ termPage:
cards: '相关卡片'
books: '我读过的相关书籍'
RSS: 订阅
+statsTooltip: 洞察
diff --git a/layouts/_partials/home/home-nav.html b/layouts/_partials/home/home-nav.html
index 2d8e539d..24d75221 100644
--- a/layouts/_partials/home/home-nav.html
+++ b/layouts/_partials/home/home-nav.html
@@ -24,7 +24,8 @@
</li>
<li class="absolute right-0 dark:invert">
<a href="{{ .Site.LanguagePrefix }}/stats"
- class="opacity-50 transition-opacity duration-300 hover:opacity-100
+ data-tooltip="{{ T "statsTooltip" }}"
+ class="block opacity-50 transition-opacity duration-300 hover:opacity-100
{{ if eq "/stats/" $.Page.RelPermalink }} opacity-100 font-bolder{{ end }}"
data-umami-event="📈 Click stats page link">
<img src="/img/graph.svg" class="opacity-50 h-8 w-8" />