Ensure utterances theme's is toggled when site theme is toggled

This commit is contained in:
Dave Gallant
2023-03-25 14:04:50 -04:00
parent 18c5a8c814
commit 210a55934d
57 changed files with 826 additions and 329 deletions

View File

@@ -40,7 +40,6 @@ params:
utterances:
enable: true
issueTerm: "pathname"
theme: github-light
github:
username: davegallant
repository: davegallant.github.io

View File

@@ -206,12 +206,21 @@ Let&rsquo;s try to run it.</p>
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -166,12 +166,21 @@ Containers have much less overhead in terms of boot time and storage allocation.
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -257,12 +257,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -126,12 +126,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -203,12 +203,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -201,12 +201,21 @@ As of 2021/11, it is still defaulting to the 1.19 channel, so I overrode it to 1
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -146,12 +146,21 @@ Encrypting your shared volumes should also be done, since unfortunately <a href=
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -166,12 +166,21 @@ When setting up the machine, I mostly went with all of the defaults. Configurati
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -184,12 +184,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -107,12 +107,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -3,14 +3,27 @@ function setTheme(mode) {
if (mode === "dark") {
document.getElementById("darkModeStyle").disabled=false;
document.getElementById("dark-mode-toggle").innerHTML = "<i data-feather=\"sun\"></i>";
feather.replace()
feather.replace();
setUtterancesTheme("github-dark");
} else if (mode === "light") {
document.getElementById("darkModeStyle").disabled=true;
document.getElementById("dark-mode-toggle").innerHTML = "<i data-feather=\"moon\"></i>";
feather.replace()
feather.replace();
setUtterancesTheme("github-light");
}
}
function setUtterancesTheme (theme) {
if (document.querySelector('.utterances-frame')) {
const message = {
type: 'set-theme',
theme: theme
};
const iframe = document.querySelector('.utterances-frame');
iframe.contentWindow.postMessage(message, 'https://utteranc.es');
}
}
function toggleTheme() {
if (localStorage.getItem("theme-storage") === "light") {
setTheme("dark");

View File

@@ -98,12 +98,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -110,12 +110,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -116,12 +116,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -102,12 +102,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -259,12 +259,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -102,12 +102,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -102,12 +102,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -102,12 +102,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -100,12 +100,21 @@
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'><script src='https://utteranc.es/client.js'
repo='davegallant/davegallant.github.io'
issue-term='pathname'
<div class='comments'><script>
theme='github-light'
crossorigin='anonymous' async>
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', 'davegallant\/davegallant.github.io');
s.setAttribute('issue-term', 'pathname');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>
</div>
</div>

View File

@@ -5,7 +5,7 @@
{{- if and ( $utterancesEnabled ) ( not .Params.disable_comments) -}}
<section id='comments' class='comments'>
<div class='container sep-before'>
<div class='comments-area'>
<div class='comments'>
{{- if $utterancesEnabled -}}
{{ partial "comments/utterances" . }}
{{- end -}}

View File

@@ -2,18 +2,22 @@
{{- $issueTerm := .Page.Site.Params.comments.utterances.issueTerm -}}
{{- $label := .Page.Site.Params.comments.utterances.label -}}
{{- $theme := .Page.Site.Params.comments.utterances.theme -}}
{{- $username := .Page.Site.Params.comments.utterances.github.username -}}
{{- $repository := .Page.Site.Params.comments.utterances.github.repository -}}
<script src='{{ $scriptSrc }}'
repo='{{ print $username "/" $repository }}'
issue-term='{{ $issueTerm }}'
{{ if $label -}}
label='{{ $label }}'
{{- end }}
{{ if $theme -}}
theme='{{ $theme }}'
{{- end }}
crossorigin='anonymous' async>
<script>
// load utteranc comment
var getTheme = window.localStorage && window.localStorage.getItem("theme-storage");
getTheme = getTheme == null ? 'light' : getTheme;
let theme = getTheme === 'dark' ? 'github-dark' : 'github-light';
let s = document.createElement('script');
s.src = 'https://utteranc.es/client.js';
s.setAttribute('repo', '{{ print $username "/" $repository }}');
s.setAttribute('issue-term', '{{ $issueTerm }}');
s.setAttribute('theme', theme);
s.setAttribute('crossorigin', 'anonymous');
s.setAttribute('async', '');
document.querySelector('div.comments').innerHTML = '';
document.querySelector('div.comments').appendChild(s);
</script>

View File

@@ -3,14 +3,27 @@ function setTheme(mode) {
if (mode === "dark") {
document.getElementById("darkModeStyle").disabled=false;
document.getElementById("dark-mode-toggle").innerHTML = "<i data-feather=\"sun\"></i>";
feather.replace()
feather.replace();
setUtterancesTheme("github-dark");
} else if (mode === "light") {
document.getElementById("darkModeStyle").disabled=true;
document.getElementById("dark-mode-toggle").innerHTML = "<i data-feather=\"moon\"></i>";
feather.replace()
feather.replace();
setUtterancesTheme("github-light");
}
}
function setUtterancesTheme (theme) {
if (document.querySelector('.utterances-frame')) {
const message = {
type: 'set-theme',
theme: theme
};
const iframe = document.querySelector('.utterances-frame');
iframe.contentWindow.postMessage(message, 'https://utteranc.es');
}
}
function toggleTheme() {
if (localStorage.getItem("theme-storage") === "light") {
setTheme("dark");