GameTheory
Android Expert
So I developed a theme for a website on the Hugo framework. It has a light and dark mode. The theme is done, except for this one piece of the the puzzle...
There is a comments widget served up from a CDN which comes with a bunch of initial themes you can set (ie. light, dark, etc).
Here is the code for the widget that is inserted into your html page...
Now when I click a toggle the website theme switches from light to dark. What I need is to be able to change the "theme" element in the widget above to "github-dark" so that it matches the theme. I need to be able to go from light to dark and dark to light.
Is there any way to do this with some javascript or perhaps some golang?
There is a comments widget served up from a CDN which comes with a bunch of initial themes you can set (ie. light, dark, etc).
Here is the code for the widget that is inserted into your html page...
HTML:
<script src="https://utteranc.es/client.js"
repo="{{ site.Params.comments }}"
issue-term="title"
theme="github-light"
crossorigin="anonymous"
async>
</script>
Now when I click a toggle the website theme switches from light to dark. What I need is to be able to change the "theme" element in the widget above to "github-dark" so that it matches the theme. I need to be able to go from light to dark and dark to light.
Is there any way to do this with some javascript or perhaps some golang?