replace hyvor with giscus

This commit is contained in:
Matthew Wong 2022-08-01 19:05:38 -04:00
parent cc4a64e737
commit bb93fdfffa
4 changed files with 22 additions and 13 deletions

View File

@ -1,6 +1,6 @@
// const userPref = window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'
const userPref = 'light'
const currentTheme = localStorage.getItem('theme') ?? userPref
const userPref = window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'
// const currentTheme = localStorage.getItem('theme') ?? userPref
const currentTheme = userPref;
if (currentTheme) {
document.documentElement.setAttribute('saved-theme', currentTheme);

View File

@ -21,7 +21,7 @@
{{partial "textprocessing.html" . }}
</article>
{{ if in .Page.RelPermalink "/posts/" }}
{{partial "hyvor.html" .}}
{{partial "comments.html" .}}
{{ end }}
{{partial "footer.html" .}}
{{partial "popover.html" .}}

View File

@ -0,0 +1,18 @@
<div style="margin-top: 10px">
<script src="https://giscus.app/client.js"
data-repo="fleetingnotes/fleeting-notes-quartz"
data-repo-id="R_kgDOHKigvA"
data-category="Announcements"
data-category-id="DIC_kwDOHKigvM4CQjum"
data-mapping="pathname"
data-strict="1"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="top"
data-theme="preferred_color_scheme"
data-lang="en"
data-loading="lazy"
crossorigin="anonymous"
async>
</script>
</div>

View File

@ -1,9 +0,0 @@
<div id="hyvor-talk-view"></div>
<script type="text/javascript">
var HYVOR_TALK_WEBSITE = 7458;
var HYVOR_TALK_CONFIG = {
url: false,
id: false
};
</script>
<script async type="text/javascript" src="//talk.hyvor.com/web-api/embed.js"></script>