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:
authorJacques Supcik <jacques@supcik.net>2019-09-01 00:52:30 +0300
committerBen Schumacher <hanzei@mailbox.org>2019-09-01 00:52:30 +0300
commit5205eeac73cd2d4482dbcf6677a7cd636c62e8b3 (patch)
treed0eac182a6c5c1225b408a72e45d6afc6a1a8e7b /layouts
parent8b1684b6c27c51bde5c4bb058e40e288089eb129 (diff)
Add `timeRefresh` for periodic localtime update and allow for multilingual time format (#177)
Diffstat (limited to 'layouts')
-rw-r--r--layouts/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/index.html b/layouts/index.html
index 3de991a..209ba78 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -106,7 +106,7 @@
{{ .Content }}
</div>
{{ if .Site.Params.home.localTime }}
- <p>{{ i18n "index_currentTime" . }} <span id="time"></span>.</p>
+ <p>{{ i18n "index_currentTime" . }} <span id="time" data-time-zone="{{ .Site.Params.home.timeZone }}" data-time-format="{{ .Site.Params.home.timeFormat }}"></span>.</p>
{{ end }}
{{ with .Site.Params.email }}
<h3 class="subtitle is-3 has-text-centered top-pad">
@@ -135,7 +135,7 @@
{{ $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" | resources.ExecuteAsTemplate "js/initMoment.tmp.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>
{{ end }}