mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-06 08:43:40 +00:00
Ensure utterances theme's is toggled when site theme is toggled
This commit is contained in:
@@ -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'
|
||||
|
||||
theme='github-light'
|
||||
crossorigin='anonymous' async>
|
||||
<div class='comments'><script>
|
||||
|
||||
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>
|
||||
|
@@ -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'
|
||||
|
||||
theme='github-light'
|
||||
crossorigin='anonymous' async>
|
||||
<div class='comments'><script>
|
||||
|
||||
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>
|
||||
|
@@ -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'
|
||||
|
||||
theme='github-light'
|
||||
crossorigin='anonymous' async>
|
||||
<div class='comments'><script>
|
||||
|
||||
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>
|
||||
|
@@ -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'
|
||||
|
||||
theme='github-light'
|
||||
crossorigin='anonymous' async>
|
||||
<div class='comments'><script>
|
||||
|
||||
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>
|
||||
|
@@ -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'
|
||||
|
||||
theme='github-light'
|
||||
crossorigin='anonymous' async>
|
||||
<div class='comments'><script>
|
||||
|
||||
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>
|
||||
|
Reference in New Issue
Block a user