hugo-WonderMod
hugo-WonderMod copied to clipboard
Hide lang switch separator if only a single lang is used
What does this PR change? What problem does it solve?
A language switch separator is displayed even if a website has a single language only. This fixes it by checking for AllTranslations size before adding the <ul class="lang-switch"> element.
Before:
After:
Note that I have absolutely no experience with Golang, hopefully the is up to the standards.
PR Checklist
- [x] I have enabled maintainer edits for this PR.
- [x] I have verified that the code works as described/as intended.
- [x] This change does not include any CDN resources/links.
- [x] This change does not include any unrelated scripts such as bash and python scripts.