wjh18 / hugo-liftoff

Minimal blog/portfolio theme with a focus on content creation and SEO best practices. An ideal choice for technical users jump-starting a personal brand.
https://hugo-liftoff.netlify.app
MIT License
93 stars 27 forks source link

Disqus embed color scheme breaks on toggle #15

Closed wjh18 closed 1 year ago

wjh18 commented 1 year ago

Describe the bug Disqus auto-detects a site's color scheme and displays the embed with the appropriate contrast. When the color scheme is manually toggled via the theme's light/dark mode switcher, the Disqus embed is not toggled with it to the opposite color scheme and is difficult to read.

To Reproduce Steps to reproduce the behavior:

  1. Load a post with Disqus comments. The embed should look good.
  2. Toggle the color scheme to the opposite one without reloading the page.
  3. The embed should now have multiple elements with insufficient contrast.
  4. Reload the page and the color scheme that was just not working should show sufficient contrast.

Expected behavior The body of the iframe embed has a class light or dark which controls the color scheme. Target this element with JS and toggle the class when the dark/light mode switch is toggled by a user.

wjh18 commented 1 year ago

Fixed in above merge