From efb0b592a0072ce69be4b8afdfc859d5ae5dbe1b Mon Sep 17 00:00:00 2001 From: Track3 Date: Sun, 30 Dec 2018 11:06:38 +0800 Subject: [PATCH] Put comments into a partial * Also removed unnecessary Disqus style (didn't regenerate resources) --- assets/scss/style.scss | 11 ----------- layouts/_default/single.html | 6 +++--- layouts/partials/comments.html | 3 +++ layouts/posts/single.html | 6 ++---- 4 files changed, 8 insertions(+), 18 deletions(-) create mode 100644 layouts/partials/comments.html diff --git a/assets/scss/style.scss b/assets/scss/style.scss index 6606273..bcf4533 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -651,19 +651,8 @@ hr.post-end { } } -// Disqus -#disqus { - margin-top: 2.5em; -} - -.dsq-brlink { - display: block; - text-align: center; -} - // Media Queries // - @media (min-width: 800px) { .site-main { margin-top: 3em; diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 53d566d..dafac9f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,9 +8,9 @@
{{ .Content }}
- {{- if and .Params.comments .Site.DisqusShortname }} -
- {{ template "_internal/disqus.html" . }} + {{- if .Params.comments }} +
+ {{ partial "comments.html" . }}
{{- end }} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html new file mode 100644 index 0000000..b17632a --- /dev/null +++ b/layouts/partials/comments.html @@ -0,0 +1,3 @@ +{{- if .Site.DisqusShortname }} +{{ template "_internal/disqus.html" . }} +{{- end }} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index c84c50c..a748b95 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -50,11 +50,9 @@ {{- end }}
- {{- if .Site.DisqusShortname }} -
- {{ template "_internal/disqus.html" . }} +
+ {{ partial "comments.html" . }}
- {{- end }} {{ end }}