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

github.com/vickylaixy/hugo-theme-introduction.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/index.html')
-rw-r--r--layouts/index.html24
1 files changed, 14 insertions, 10 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 209ba78..c3ae575 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -3,6 +3,7 @@
<head>
{{ partial "head/metadata.html" . }}
+ {{ if .Site.Params.plausible }}{{ partial "head/plausible.html" . }}{{ end }}
{{ partial "head/openGraph.html" . }}
{{ partial "head/favicons.html" . }}
{{ partial "head/css.html" . }}
@@ -20,7 +21,7 @@
<div class="container has-text-centered">
<!-- Title and tagline -->
<h1 class="bold-title {{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in one{{ end }}">
- {{ .Title }}
+ {{ .Title | markdownify }}
</h1>
<div class="subtitle is-3 {{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in two{{ end }}">
{{ .Content }}
@@ -67,7 +68,7 @@
<!-- Range through all sections in /home execept contact.md -->
<div class="section" id="{{ .File.TranslationBaseName }}">
<div class="container">
- <h2 class="title is-2 has-text-centered">{{ .Title }}</h2>
+ <h2 class="title is-2 has-text-centered">{{ .Title | markdownify }}</h2>
{{ if .Params.Image }}
<div class="columns">
<div class="column is-one-third has-text-centered">
@@ -101,12 +102,12 @@
{{ with .Resources.GetMatch "contact.md" }}
<div class="section" id="{{ .File.TranslationBaseName }}">
<div class="container has-text-centered">
- <h2 class="title is-2">{{ .Title }}</h2>
+ <h2 class="title is-2">{{ .Title | markdownify }}</h2>
<div class="markdown">
{{ .Content }}
</div>
{{ if .Site.Params.home.localTime }}
- <p>{{ i18n "index_currentTime" . }} <span id="time" data-time-zone="{{ .Site.Params.home.timeZone }}" data-time-format="{{ .Site.Params.home.timeFormat }}"></span>.</p>
+ <p>{{ i18n "index_currentTime" . }} <span id="time"></span>.</p>
{{ end }}
{{ with .Site.Params.email }}
<h3 class="subtitle is-3 has-text-centered top-pad">
@@ -132,12 +133,15 @@
{{ partial "js/owlCarousel.html" . }}
{{ if .Site.Params.home.localTime }}
- {{ $momentjs := resources.Get "vendor/momentjs/moment.min.js" }}
- {{ $momentTimezone := resources.Get "vendor/momentjs/moment-timezone.min.js" }}
- {{ $momentTimezoneWithData := resources.Get "vendor/momentjs/moment-timezone-with-data-2012-2022.min.js" }}
- {{ $initMomentjs := resources.Get "js/initMoment.js" }}
- {{ $bundleMoment := slice $momentjs $momentTimezone $momentTimezoneWithData $initMomentjs | resources.Concat "js/bundleMoment.js" | fingerprint }}
- <script src="{{ $bundleMoment.Permalink }}" integrity="{{ $bundleMoment.Data.Integrity }}"></script>
+ <script>
+ function update_localtime() {
+ const time = new Date().toLocaleTimeString('{{ .Site.Params.home.timeFormat }}', { timeZone: '{{ .Site.Params.home.timeZone }}', timeStyle: 'short' });
+ document.getElementById('time').innerHTML = time;
+ }
+ update_localtime();
+ // Updating every second to prevent seconds looking like stood still when timeStyle is ignored.
+ setInterval(update_localtime, 1000);
+ </script>
{{ end }}
</body>