2020-10-04 10:23:08 -04:00
|
|
|
<script src="https://utteranc.es/client.js"
|
|
|
|
repo="{{ .Site.Params.comments.utterances.repo }}"
|
|
|
|
issue-term="{{ .Site.Params.comments.utterances.issueTerm }}"
|
|
|
|
theme="{{ .Site.Params.comments.utterances.theme }}"
|
|
|
|
{{ with .Site.Params.comments.utterances.label }}
|
|
|
|
label="{{ . }}"
|
|
|
|
{{ end }}
|
|
|
|
crossorigin="anonymous"
|
|
|
|
async>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.utterances {
|
|
|
|
max-width: unset;
|
|
|
|
}
|
2021-01-01 07:32:19 -05:00
|
|
|
</style>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
window.addEventListener('onColorSchemeChange', (e) => {
|
|
|
|
let utterances = document.querySelector('.utterances iframe');
|
|
|
|
if (utterances) {
|
|
|
|
utterances.contentWindow.postMessage(
|
|
|
|
{
|
|
|
|
type: 'set-theme',
|
|
|
|
theme: `github-${e.detail}`
|
|
|
|
},
|
|
|
|
'https://utteranc.es'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
</script>
|