forked from Anduin2017/HowToCook
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bot] AutoMerging: merge all upstream's changes:
* https://github.com/Anduin2017/HowToCook: [ci skip] Automatic file changes/fix Add footer for page. Update mkdocs_template.yml Feature: add template of comment system (Anduin2017#1192) 修复标点和格式错误 (Anduin2017#1193)
- Loading branch information
Showing
4 changed files
with
60 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{% extends "base.html" %} {% block disqus %} | ||
<script src="https://giscus.app/client.js" | ||
data-repo="Anduin2017/HowToCook" | ||
data-repo-id="MDEwOlJlcG9zaXRvcnkyNDM5NTA0MDg=" | ||
data-category="Show and tell" | ||
data-category-id="DIC_kwDODopjSM4CBNA6" | ||
data-mapping="pathname" | ||
data-strict="0" | ||
data-reactions-enabled="1" | ||
data-emit-metadata="0" | ||
data-input-position="top" | ||
data-theme="dark_tritanopia" | ||
data-lang="zh-CN" | ||
crossorigin="anonymous" | ||
async> | ||
</script> | ||
|
||
|
||
<script> | ||
var giscus = document.querySelector("script[src*=giscus]") | ||
|
||
/* Set palette on initial load */ | ||
var palette = __get("__palette") | ||
if (palette && typeof palette.color === "object") { | ||
var theme = palette.color.scheme === "default" ? "light" : "dark" | ||
giscus.setAttribute("data-theme", theme) | ||
} | ||
|
||
/* Register event handlers after documented loaded */ | ||
document.addEventListener("DOMContentLoaded", function () { | ||
var ref = document.querySelector("[data-md-component=palette]") | ||
ref.addEventListener("change", function () { | ||
var palette = __get("__palette") | ||
if (palette && typeof palette.color === "object") { | ||
var theme = palette.color.scheme === "default" ? "light" : "dark" | ||
|
||
/* Instruct Giscus to change theme */ | ||
var frame = document.querySelector(".giscus-frame") | ||
frame.contentWindow.postMessage( | ||
{giscus: {setConfig: {theme}}}, | ||
"https://giscus.app" | ||
) | ||
} | ||
}) | ||
}) | ||
</script> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters