auroral-ui / hexo-theme-aurora

🏳️‍🌈 Futuristic auroral Hexo theme.
https://blog.bennyxguo.com
MIT License
1.41k stars 217 forks source link

[Feature] Change the navigation bar generation #414

Open CrSjimo opened 1 year ago

CrSjimo commented 1 year ago

In source code /src/components/Header/src/Navigation.vue:

<span class="relative z-50" v-if="locale">
  {{ route.i18n[locale] }}
</span>
<span class="relative z-50" v-else>{{ route.name }}</span>

In the v-if="locale" branch, there should be an extra if-branch to check whether the name of a custom menu is set but the i18n of it is not set. In this case, the name should be set to the content of <span> as a fallback, otherwise the content would be blank.

Also, if the name is the same in all languages, it could be OK to just set one name instead of repeating it in i18n.

bennyxguo commented 12 months ago

Good point, I will check on this one.