mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-25 05:44:06 -06:00
replace hyvor with giscus
This commit is contained in:
parent
cc4a64e737
commit
bb93fdfffa
@ -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);
|
||||
|
||||
@ -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" .}}
|
||||
|
||||
18
layouts/partials/comments.html
Normal file
18
layouts/partials/comments.html
Normal 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>
|
||||
@ -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>
|
||||
Loading…
Reference in New Issue
Block a user