Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/AmazingRise/hugo-theme-diary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramazingrise <8315221+AmazingRise@users.noreply.github.com>2020-05-24 15:29:00 +0300
committeramazingrise <8315221+AmazingRise@users.noreply.github.com>2020-05-24 15:29:00 +0300
commitb4c734f9d845231025817c5fe661b940dae81ec2 (patch)
tree338b312f410fff9066e79aa27e99a95aa977ce8e
parente705be3d786cef0855bfdb1afbc8705627078e61 (diff)
Fix disqus issue under Vue app.
-rw-r--r--i18n/en.yaml4
-rw-r--r--i18n/fr.yaml4
-rw-r--r--i18n/zh-hant.yaml4
-rw-r--r--i18n/zh.yaml4
-rw-r--r--layouts/partials/comment.html8
-rw-r--r--layouts/partials/head.html4
-rw-r--r--layouts/partials/journal.html1
7 files changed, 18 insertions, 11 deletions
diff --git a/i18n/en.yaml b/i18n/en.yaml
index a37e54c..812b69c 100644
--- a/i18n/en.yaml
+++ b/i18n/en.yaml
@@ -14,8 +14,8 @@
translation: No older posts.
- id: comments_disabled
translation: Comments Disabled.
-- id: livere_comments_activate_js
- translation: Please activate JavaScript to use Livere Comment.
+- id: comments_activate_js
+ translation: Please activate JavaScript to view comments.
- id: hugo_theme
translation: Hugo Theme
- id: ported_from
diff --git a/i18n/fr.yaml b/i18n/fr.yaml
index c3990a6..cd2b862 100644
--- a/i18n/fr.yaml
+++ b/i18n/fr.yaml
@@ -14,8 +14,8 @@
translation: Pas de post plus ancien.
- id: comments_disabled
translation: Commentaires Désactivés.
-- id: livere_comments_activate_js
- translation: Veuillez activer JavaScript pour utiliser le système de commentaires Livere.
+- id: comments_activate_js
+ translation: Veuillez activer JavaScript pour utiliser le système de commentaires.
- id: hugo_theme
translation: Theme Hugo
- id: ported_from
diff --git a/i18n/zh-hant.yaml b/i18n/zh-hant.yaml
index 44bb93f..b745bd4 100644
--- a/i18n/zh-hant.yaml
+++ b/i18n/zh-hant.yaml
@@ -14,8 +14,8 @@
translation: 這是最舊的文章了。
- id: comments_disabled
translation: 此篇文章的評論功能已經停用。
-- id: livere_comments_activate_js
- translation: 請開啓 JavaScript 以便使用 Livere 評論服務。
+- id: comments_activate_js
+ translation: 請開啓 JavaScript 以便使用評論服務。
- id: hugo_theme
translation: Hugo Theme
- id: ported_from
diff --git a/i18n/zh.yaml b/i18n/zh.yaml
index afc9a7a..7bad92f 100644
--- a/i18n/zh.yaml
+++ b/i18n/zh.yaml
@@ -14,8 +14,8 @@
translation: 这是最旧的文章了。
- id: comments_disabled
translation: 此篇文章的评论功能已经停用。
-- id: livere_comments_activate_js
- translation: 请开启 JavaScript 以便使用 Livere 评论服务。
+- id: comments_activate_js
+ translation: 请开启 JavaScript 以便使用评论服务。
- id: hugo_theme
translation: Hugo Theme
- id: ported_from
diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html
index 6f4d4fa..d73a9a0 100644
--- a/layouts/partials/comment.html
+++ b/layouts/partials/comment.html
@@ -1,7 +1,9 @@
{{ if .Site.Params.disqusShortname }}
-<div class="post-comment-wrapper">
-{{ template "_internal/disqus.html" . }}
+<div class="comments">
+ <vue-disqus shortname="{{.Site.Params.disqusShortname}}"></vue-disqus>
</div>
+<noscript><noscript>{{ i18n "comments_activate_js" }}</noscript></noscript>
+<a href="https://disqus.com/" class="dsq-brlink">Comments powered by <span class="logo-disqus">Disqus</span></a>
{{ end }}
{{ if .Site.Params.enableGitalk }}
@@ -15,6 +17,6 @@
{{ if .Site.Params.livereId }}
<div id="lv-container" data-id="city" data-uid={{.Site.Params.livereId}}>
- <noscript>{{ i18n "livere_comments_activate_js" }}</noscript>
+ <noscript>{{ i18n "comments_activate_js" }}</noscript>
</div>
{{ end }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 7c5df49..773bff3 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -97,4 +97,8 @@ $(
<script src='https://unpkg.com/valine@1.4.14/dist/Valine.min.js'></script>
{{ end }}
+{{ if .Site.Params.disqusShortname }}
+<script src="https://cdn.jsdelivr.net/npm/vue-disqus@3/dist/vue-disqus.js"></script>
+{{ end }}
+
</head> \ No newline at end of file
diff --git a/layouts/partials/journal.html b/layouts/partials/journal.html
index be8f224..2f89c96 100644
--- a/layouts/partials/journal.html
+++ b/layouts/partials/journal.html
@@ -90,6 +90,7 @@ app = new Vue({
this.handleScroll();
this.handleResize();
this.mounted = true;
+
{{ if and (.Site.Params.enableValine) (.IsPage) }}
new Valine({
el: '#vcomments',