From a086474bff6d009c161fe526bc783e99bdd38575 Mon Sep 17 00:00:00 2001 From: SouthFox Date: Sat, 20 May 2023 18:26:25 +0800 Subject: [PATCH] Revert "site/change comment service" This reverts commit ae5e71cdd3b44f047788da702951068be9e1349a. --- _headers | 2 +- giscus.json | 3 ++ .../layout/_partial/post/comment_footer.ejs | 28 +++++++++++-------- themes/freemind/source/css/style.css | 5 ---- utils.py | 2 +- 5 files changed, 21 insertions(+), 19 deletions(-) create mode 100644 giscus.json diff --git a/_headers b/_headers index ab3f2ef..498bef1 100644 --- a/_headers +++ b/_headers @@ -3,4 +3,4 @@ X-Content-Type-Options: nosniff Referrer-Policy: no-referrer Permissions-Policy: document-domain=() - Content-Security-Policy: script-src 'self' https://dodder.southfox.gay 'unsafe-inline'; frame-ancestors https://mantyke.icu; + Content-Security-Policy: script-src 'self' https://giscus.app; frame-ancestors https://mantyke.icu; diff --git a/giscus.json b/giscus.json new file mode 100644 index 0000000..1ab17b4 --- /dev/null +++ b/giscus.json @@ -0,0 +1,3 @@ +{ + "defaultCommentOrder": "newest" + } \ No newline at end of file diff --git a/themes/freemind/layout/_partial/post/comment_footer.ejs b/themes/freemind/layout/_partial/post/comment_footer.ejs index df18cf1..f944fa5 100644 --- a/themes/freemind/layout/_partial/post/comment_footer.ejs +++ b/themes/freemind/layout/_partial/post/comment_footer.ejs @@ -1,18 +1,22 @@ <% if (item.no_comment){ %> <% } else { %> +
如不想授权 Giscus 应用,也可以点击下方左上角数字直接跳转到 Github Discussions 进行评论。
<% if (theme.enable_comment) { %> -

评论

-
-
- - -
+ + <% } %> <% } %> diff --git a/themes/freemind/source/css/style.css b/themes/freemind/source/css/style.css index 3d92de4..d34e0d5 100644 --- a/themes/freemind/source/css/style.css +++ b/themes/freemind/source/css/style.css @@ -1391,8 +1391,3 @@ code { -webkit-animation: wrench 3.75s ease infinite; animation: wrench 3.75s ease infinite; } -#cusdis_thread { - background: #c6c6c6; - box-shadow: 0 0 0 5px, 11px 13px 0 4px black; - border: 2px solid #000000; -} diff --git a/utils.py b/utils.py index 0d1cd0e..00a33d9 100644 --- a/utils.py +++ b/utils.py @@ -159,7 +159,7 @@ if __name__ == '__main__': filelist = [] postlist = [] fontChar() - # addDiscussion() + addDiscussion() elif opt in ('-b', '--backupimg'): filelist = []