chore(style): update code style and add an i18n word
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
{{- if eq (getenv "HUGO_ENV") "production" | and .IsPage | and (ne .Params.comment false) -}}
|
||||
<!-- Disqus Comment System-->
|
||||
{{- /* Disqus Comment System */ -}}
|
||||
{{- if .Site.Params.disqus.shortname -}}
|
||||
<div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
// Don't ever inject Disqus on localhost--it creates unwanted
|
||||
// discussions from "localhost:1313" on your Disqus account...
|
||||
// discussions from "localhost" on your Disqus account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
|
||||
var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;
|
||||
var disqus_shortname = "{{ .Site.Params.disqus.shortname }}";
|
||||
dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";
|
||||
@@ -16,10 +15,9 @@
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
<a href="https://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||
{{- end -}}
|
||||
|
||||
<!-- gitalk Comment System-->
|
||||
{{- /* Gitalk Comment System */ -}}
|
||||
{{- if .Site.Params.gitalk.owner -}}
|
||||
<div id="gitalk-container"></div>
|
||||
{{- if .Site.Params.cdn.gitalk_css -}}
|
||||
@@ -35,22 +33,28 @@
|
||||
<script src="{{ $res.RelPermalink }}"></script>
|
||||
{{- end -}}
|
||||
<script type="text/javascript">
|
||||
var gitalk = new Gitalk({
|
||||
id: "{{ .Date }}",
|
||||
title: "{{ .Title }}",
|
||||
clientID: "{{ .Site.Params.gitalk.clientId }}",
|
||||
clientSecret: "{{ .Site.Params.gitalk.clientSecret }}",
|
||||
repo: "{{ .Site.Params.gitalk.repo }}",
|
||||
owner: "{{ .Site.Params.gitalk.owner }}",
|
||||
admin: ["{{ .Site.Params.gitalk.owner }}"],
|
||||
body: decodeURI(location.href)
|
||||
});
|
||||
gitalk.render("gitalk-container");
|
||||
(function () {
|
||||
// Don't ever inject Gitalk on localhost--it creates unwanted
|
||||
// discussions from "localhost" on your Gitalk account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
var gitalk = new Gitalk({
|
||||
id: "{{ .Date }}",
|
||||
title: "{{ .Title }}",
|
||||
clientID: "{{ .Site.Params.gitalk.clientId }}",
|
||||
clientSecret: "{{ .Site.Params.gitalk.clientSecret }}",
|
||||
repo: "{{ .Site.Params.gitalk.repo }}",
|
||||
owner: "{{ .Site.Params.gitalk.owner }}",
|
||||
admin: ["{{ .Site.Params.gitalk.owner }}"],
|
||||
body: decodeURI(location.href)
|
||||
});
|
||||
gitalk.render("gitalk-container");
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://github.com/gitalk/gitalk">comments powered by gitalk.</a></noscript>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://github.com/gitalk/gitalk">comments powered by Gitalk.</a></noscript>
|
||||
{{- end -}}
|
||||
|
||||
<!-- valine -->
|
||||
{{- /* Valine Comment System */ -}}
|
||||
{{- if .Site.Params.valine.enable -}}
|
||||
<div id="vcomments"></div>
|
||||
{{- if .Site.Params.cdn.valine_js -}}
|
||||
@@ -60,23 +64,30 @@
|
||||
<script src="{{ $res.RelPermalink }}"></script>
|
||||
{{- end -}}
|
||||
<script type="text/javascript">
|
||||
new Valine({
|
||||
el: "#vcomments",
|
||||
appId: "{{ .Site.Params.valine.appId }}",
|
||||
appKey: "{{ .Site.Params.valine.appKey }}",
|
||||
meta: ["nick", "mail"],
|
||||
notify: "{{ .Site.Params.valine.notify }}",
|
||||
verify: "{{ .Site.Params.valine.verify }}",
|
||||
avatar: "{{ .Site.Params.valine.avatar }}",
|
||||
placeholder: "{{ .Site.Params.valine.placeholder }}",
|
||||
visitor: "{{ .Site.Params.valine.visitor }}",
|
||||
recordIP: "{{ .Site.Params.valine.recordIP }}",
|
||||
lang: "{{ T `valineLang` }}",
|
||||
});
|
||||
(function () {
|
||||
// Don't ever inject Valine on localhost--it creates unwanted
|
||||
// discussions from "localhost" on your Valine account...
|
||||
if (window.location.hostname == "localhost")
|
||||
return;
|
||||
new Valine({
|
||||
el: "#vcomments",
|
||||
appId: "{{ .Site.Params.valine.appId }}",
|
||||
appKey: "{{ .Site.Params.valine.appKey }}",
|
||||
meta: ["nick", "mail"],
|
||||
notify: "{{ .Site.Params.valine.notify }}",
|
||||
verify: "{{ .Site.Params.valine.verify }}",
|
||||
avatar: "{{ .Site.Params.valine.avatar }}",
|
||||
placeholder: "{{ .Site.Params.valine.placeholder }}",
|
||||
visitor: "{{ .Site.Params.valine.visitor }}",
|
||||
recordIP: "{{ .Site.Params.valine.recordIP }}",
|
||||
lang: "{{ T `valineLang` }}",
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://valine.js.org/">comments powered by Valine.</a></noscript>
|
||||
{{- end -}}
|
||||
|
||||
<!-- facebook comment -->
|
||||
{{- /* Facebook Comment System */ -}}
|
||||
{{- if .Site.Params.facebook.enable -}}
|
||||
<div id="fb-root"></div>
|
||||
<script
|
||||
@@ -91,5 +102,6 @@
|
||||
data-width="{{ .Site.Params.facebook.width }}"
|
||||
data-numposts="{{ .Site.Params.facebook.numPosts }}"
|
||||
></div>
|
||||
<noscript>Please enable JavaScript to view the <a href="https://developers.facebook.com/docs/plugins/comments/">comments powered by Facebook.</a></noscript>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user