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:
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/comment.html30
-rw-r--r--layouts/partials/extended_head.html4
-rw-r--r--layouts/partials/head.html12
-rw-r--r--layouts/partials/mobile-header.html4
-rw-r--r--layouts/partials/sidebar.html4
5 files changed, 44 insertions, 10 deletions
diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html
index 35b6360..8514492 100644
--- a/layouts/partials/comment.html
+++ b/layouts/partials/comment.html
@@ -1,9 +1,29 @@
{{ if .Site.Params.disqusShortname }}
-<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>
+<div id="disqus_thread"></div>
+<script>
+ /**
+ * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT
+ * THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR
+ * PLATFORM OR CMS.
+ *
+ * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT:
+ * https://disqus.com/admin/universalcode/#configuration-variables
+ */
+ var disqus_config = function () {
+ // Replace PAGE_URL with your page's canonical URL variable
+ this.page.url = '{{ .Permalink }}';
+
+ // Replace PAGE_IDENTIFIER with your page's unique identifier variable
+ this.page.identifier = '{{ .Permalink }}';
+ };
+ (function() {
+ var d = document, s = d.createElement('script');
+ s.src = 'https://{{.Site.Params.disqusShortname}}.disqus.com/embed.js';
+ s.setAttribute('data-timestamp', +new Date());
+ (d.head || d.body).appendChild(s);
+ })();
+</script>
+<noscript> Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow"> comments powered by Disqus. </a> </noscript>
{{ end }}
{{ if .Site.Params.enableGitalk }}
diff --git a/layouts/partials/extended_head.html b/layouts/partials/extended_head.html
new file mode 100644
index 0000000..5fea31d
--- /dev/null
+++ b/layouts/partials/extended_head.html
@@ -0,0 +1,4 @@
+<!--
+If you want to include any custom html just before </head>, put it in /layouts/partials/extended_head.html
+Do not put anything in this file - it's only here so that hugo won't throw an error if /layouts/partials/extended_head.html doesn't exist.
+--> \ No newline at end of file
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index b5825bb..8b5c310 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -59,7 +59,14 @@
loadCSS("https://fonts.googleapis.com/css?family=Fira+Mono|Material+Icons");
</script>
-
+{{ if .Site.Params.cloudflareToken }}
+<!-- Cloudflare Web Analytics -->
+<script defer
+ src='https://static.cloudflareinsights.com/beacon.min.js'
+ data-cf-beacon='{"token": {{ .Site.Params.cloudflareToken }}'>
+</script>
+<!-- End Cloudflare Web Analytics -->
+{{ end }}
{{ if or (.Params.enableLaTeX) (.Site.Params.enableLaTeX) }}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.css" integrity="sha384-RZU/ijkSsFbcmivfdRBQDtwuwVqK7GMOw6IMvKyeWL2K5UAlyp6WonmB8m7Jd0Hn" crossorigin="anonymous">
@@ -125,4 +132,7 @@
{{ end }}
+<!-- head custom -->
+{{- partial "extended_head.html" . }}
+
</head>
diff --git a/layouts/partials/mobile-header.html b/layouts/partials/mobile-header.html
index 61a582c..ad59cda 100644
--- a/layouts/partials/mobile-header.html
+++ b/layouts/partials/mobile-header.html
@@ -48,7 +48,7 @@
menu
</i>
</button>
- <a id="navTitle" class="navbar-brand" href="{{.Site.BaseURL}}">
+ <a id="navTitle" class="navbar-brand" href="{{ "" | absLangURL }}">
{{.Site.Title}}
</a>
{{ if not .Site.Params.disableDarkMode }}
@@ -62,7 +62,7 @@
</nav>
<div class="single-column-header-container" id="pageHead"
v-bind:style="{ transform: 'translateZ(0px) translateY('+.3*scrollY+'px)', opacity: 1-navOpacity }">
- <a href="{{.Site.BaseURL}}">
+ <a href="{{ "" | absLangURL }}">
<div class="single-column-header-title">{{.Site.Title}}</div>
{{ with .Site.Params.subtitle }}
<div class="single-column-header-subtitle">{{.}}</div>
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index fe52094..153c56f 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -1,8 +1,8 @@
<div id="sideContainer" class="side-container">
{{ if eq .Title .Site.Title}}
- <a class="a-block nav-head active" href="{{.Site.BaseURL}}">
+ <a class="a-block nav-head active" href="{{ "" | absLangURL }}">
{{ else }}
- <a class="a-block nav-head false" href="{{.Site.BaseURL}}">
+ <a class="a-block nav-head false" href="{{ "" | absLangURL }}">
{{ end }}
<div class="nav-title">
{{.Site.Title}}