Skip to content

Conversation

@jackieyyang
Copy link

@jackieyyang jackieyyang commented Apr 9, 2025

Fix #654

  • add displayThemeToggle and displayLanguageSwitch parameters in params.navbar
  • when displayThemeToggle is true, hide footer and sidebar theme toggle and only show navbar toggle
  • when displayLanguageSwitch is true, hide footer and sidebar language switch button and only show navbar language switch button
  • language switch icon will change to translate when showing in navbar

@jackieyyang jackieyyang closed this Apr 9, 2025
@netlify
Copy link

netlify bot commented Apr 9, 2025

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit 4b50df9
🔍 Latest deploy log https://app.netlify.com/sites/hugo-hextra/deploys/67f75693809d450008ff2a7a
😎 Deploy Preview https://deploy-preview-662--hugo-hextra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jackieyyang jackieyyang changed the title feat: add options for theme toggle and language switching to the navbar #654 feat: add options for theme toggle and language switching to the navbar Apr 9, 2025
@jackieyyang jackieyyang reopened this Apr 9, 2025
@jackieyyang
Copy link
Author

The tailwind dynamic rendering doesn't work every time.
image

Use a different solution solves this problem.
image

The final effect is as follows.
image

@lizhuohua
Copy link

Hi, this PR is really useful. What’s the status? Do you think we can get it merged before the v0.10 release?

@imfing
Copy link
Owner

imfing commented Aug 14, 2025

Hi, this PR is really useful. What’s the status? Do you think we can get it merged before the v0.10 release?

Hi, I do plan to implement this, but I’d like to take a different approach — componentizing the theme toggle and language switch (kinda similar to #534) instead of controlling their positions via fixed flags. This will require a bit more work.

besides, language switches on the navbar can also be handled via navbar dropdown menu (implemented in #695)

@jackieyyang
Copy link
Author

Looking forward to your implement, sound good for implementing them in component.

@lizhuohua
Copy link

Hi, I do plan to implement this, but I’d like to take a different approach — componentizing the theme toggle and language switch (kinda similar to #534) instead of controlling their positions via fixed flags. This will require a bit more work.

besides, language switches on the navbar can also be handled via navbar dropdown menu (implemented in #695)

Got it, thanks for the update! Looking forward to seeing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allows customization of i18n and theme switch buttons positions

3 participants