From 3df71601ae866aff9c2ae060ed1ac7407807fcc4 Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Wed, 3 Jun 2020 13:58:49 +0800 Subject: New comment area & opt out of font awesome --- layouts/_default/archives.html | 8 +++---- layouts/_default/list.html | 8 +++---- layouts/_default/single.html | 9 +++++--- layouts/_default/tag.html | 8 +++---- layouts/partials/comment-disqus.html | 33 +++++++++++++++------------- layouts/partials/comment-disqusjs.html | 24 +++++++++++++++++++++ layouts/partials/comment-utterances.html | 37 ++++++++++++++++++++++---------- layouts/partials/components.html | 4 ++-- layouts/partials/head.html | 1 - layouts/partials/post-meta.html | 6 +----- layouts/partials/scripts-end.html | 2 ++ layouts/robots.txt | 2 +- 12 files changed, 92 insertions(+), 50 deletions(-) create mode 100644 layouts/partials/comment-disqusjs.html (limited to 'layouts') diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index 14c3789..42216b4 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -25,12 +25,12 @@ diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b4d5afe..5118a49 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -24,12 +24,12 @@ diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 9795378..721671e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -24,8 +24,11 @@ {{ end }} -{{ if ne .Params.noComments true }} -{{ partial "comment-utterances.html" . }} +{{ if .Site.Params.disqusJSApi }} +{{ partial "comment-disqusjs.html" . }} +{{ else if .Site.Params.disqusShortname }} {{ partial "comment-disqus.html" . }} -{{ end }} +{{ else if .Site.Params.utterancesRepo }} +{{ partial "comment-utterances.html" . }} +{{ else }}{{ end }} {{ end }} \ No newline at end of file diff --git a/layouts/_default/tag.html b/layouts/_default/tag.html index b77b01d..fa5af3d 100644 --- a/layouts/_default/tag.html +++ b/layouts/_default/tag.html @@ -28,12 +28,12 @@ diff --git a/layouts/partials/comment-disqus.html b/layouts/partials/comment-disqus.html index 75b3f4c..909c0ed 100644 --- a/layouts/partials/comment-disqus.html +++ b/layouts/partials/comment-disqus.html @@ -1,18 +1,21 @@ -{{ with .Site.Params.disqusShortname }} -
-
+
+ +  查看评论 + + -
-{{ end }} \ No newline at end of file +
\ No newline at end of file diff --git a/layouts/partials/comment-disqusjs.html b/layouts/partials/comment-disqusjs.html new file mode 100644 index 0000000..5414aef --- /dev/null +++ b/layouts/partials/comment-disqusjs.html @@ -0,0 +1,24 @@ +
+ +  查看评论 + + + + +
\ No newline at end of file diff --git a/layouts/partials/comment-utterances.html b/layouts/partials/comment-utterances.html index ac1e723..f6766d5 100644 --- a/layouts/partials/comment-utterances.html +++ b/layouts/partials/comment-utterances.html @@ -1,11 +1,26 @@ -{{ with .Site.Params.utterancesRepo }} -
- -

{{ i18n "postCommentLoading" }}

-
-
- -
-{{ end }} \ No newline at end of file +
+ +  查看评论 + + +
\ No newline at end of file diff --git a/layouts/partials/components.html b/layouts/partials/components.html index 0fb4f6a..58f9c29 100644 --- a/layouts/partials/components.html +++ b/layouts/partials/components.html @@ -1,8 +1,8 @@
- +
- +
\ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 9ce9479..289c067 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -38,7 +38,6 @@ {{ else }} {{ end }} - {{ if .Params.playerURL }} {{ end }} diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html index 7d686ce..5176053 100644 --- a/layouts/partials/post-meta.html +++ b/layouts/partials/post-meta.html @@ -1,5 +1 @@ -{{ if .Site.Params.showWordCounter }} -{{ .WordCount }}{{ i18n "postMetaWordCount" }}{{ end }}{{ if .Site.Params.showReadTime }} -{{ .ReadingTime }}{{ i18n "postMetaReadingTime" }}{{ end }} -{{ if .Params.tags }}{{ range .Params.tags }}{{ . }} {{ end }}{{ else }}{{ i18n "postMetaNoTag" }}{{ end }} \ No newline at end of file + {{ .Date.Format "2006-01-02" }}{{ if .Site.Params.showWordCounter }} {{ .WordCount }}{{ i18n "postMetaWordCount" }}{{ end }}{{ if .Site.Params.showReadTime }} {{ .ReadingTime }}{{ i18n "postMetaReadingTime" }}{{ end }} {{ if .Params.tags }}{{ range .Params.tags }}{{ . }} {{ end }}{{ else }}{{ i18n "postMetaNoTag" }}{{ end }} \ No newline at end of file diff --git a/layouts/partials/scripts-end.html b/layouts/partials/scripts-end.html index d992095..fee6e18 100644 --- a/layouts/partials/scripts-end.html +++ b/layouts/partials/scripts-end.html @@ -1,5 +1,7 @@ + + {{ if .Site.Params.mainAssetsCDN }} {{ else }} diff --git a/layouts/robots.txt b/layouts/robots.txt index 02138ab..34dd235 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,3 +1,3 @@ User-agent: * -Sitemap: {{ "/sitemap.xml" | relURL }} +Sitemap: {{ "/sitemap.xml" | absURL }} -- cgit v1.2.3