From 0aa7a35ee0535a0ba5bdde7ed1a6c4fa12b3008d Mon Sep 17 00:00:00 2001 From: Reorx Date: Wed, 1 Jun 2022 16:55:45 +0800 Subject: [PATCH] add .comment-box class, comment system use id; remove unused comments_script.html --- assets/css/common/post-single.css | 4 ++-- layouts/partials/comments_script.html | 5 ----- layouts/partials/disqus.html | 2 +- layouts/partials/page_footer.html | 4 ---- layouts/partials/static_comments.html | 0 layouts/partials/telegram_widget.html | 10 +++++----- 6 files changed, 8 insertions(+), 17 deletions(-) delete mode 100644 layouts/partials/comments_script.html create mode 100644 layouts/partials/static_comments.html diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css index 2cf4035..b5fc3b3 100644 --- a/assets/css/common/post-single.css +++ b/assets/css/common/post-single.css @@ -539,8 +539,8 @@ h6:hover .anchor { box-shadow: 0 2px 0 var(--twitter-color); } -.disqus-container, -.telegram-widget-container { +/* comments */ +.comments-box { margin: calc(var(--content-gap) * 2) 0; background-color: var(--code-bg); border-radius: 10px; diff --git a/layouts/partials/comments_script.html b/layouts/partials/comments_script.html deleted file mode 100644 index 8663497..0000000 --- a/layouts/partials/comments_script.html +++ /dev/null @@ -1,5 +0,0 @@ -{{- /* You can add your own layouts/comments_script.html to override this file */ -}} - -{{- with site.Params.commentSystem.disqus -}} - {{ partial "disqus_script.html" . }} -{{- end -}} diff --git a/layouts/partials/disqus.html b/layouts/partials/disqus.html index e6b9b33..d1e80f8 100644 --- a/layouts/partials/disqus.html +++ b/layouts/partials/disqus.html @@ -1,4 +1,4 @@ -
+
diff --git a/layouts/partials/page_footer.html b/layouts/partials/page_footer.html index 1ad0e41..3c55704 100644 --- a/layouts/partials/page_footer.html +++ b/layouts/partials/page_footer.html @@ -128,7 +128,3 @@ mediumZoom('.post-content img:not([no-zoom])'); {{- end }} - -{{- if not (.Param "noComments") }} - {{- partial "comments_script.html" . }} -{{ end }} diff --git a/layouts/partials/static_comments.html b/layouts/partials/static_comments.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/telegram_widget.html b/layouts/partials/telegram_widget.html index 1f614c7..786f19a 100644 --- a/layouts/partials/telegram_widget.html +++ b/layouts/partials/telegram_widget.html @@ -1,4 +1,6 @@ -
+
+
+
@@ -33,9 +36,6 @@ if (!toggleThemeCallbacks) { return; } - if (document.getElementsByClassName('telegram-widget-container').length === 0) { - return; - } toggleThemeCallbacks.push((isDark) => { // console.log('window toggle-theme for telegram widget')