hugo-theme-stack-stars/layouts/partials/comments/provider/disqus.html
Jimmy Cai 84dd80959a
fix: make Disqus / Utterances follow the global color scheme (#111)
* fix: make Disqus / Utterances follow the global color scheme

* fix: check if DISQUS exists before executing DISQUS.reset

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/107
2021-01-01 13:32:19 +01:00

22 lines
No EOL
497 B
HTML

<div class="disqus-container">
{{ template "_internal/disqus.html" . }}
</div>
<style>
.disqus-container {
background-color: var(--card-background);
border-radius: var(--card-border-radius);
box-shadow: var(--shadow-l1);
padding: var(--card-padding);
}
</style>
<script>
window.addEventListener('onColorSchemeChange', (e) => {
if (DISQUS) {
DISQUS.reset({
reload: true
});
}
})
</script>