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
path: root/assets
diff options
context:
space:
mode:
authorHanzei <hanzei@mailbox.org>2018-07-18 18:40:58 +0300
committerHanzei <hanzei@mailbox.org>2018-07-18 18:41:04 +0300
commitebd3b152f4902dbdd0d33578ce5f8fd9aa59931f (patch)
tree3f612098ba873a64e22b4642df20161ace6ab93c /assets
parentb7f6532d0420c501930495b1be1e15f4325b40ca (diff)
Fix timezone
Diffstat (limited to 'assets')
-rw-r--r--assets/js/index.js7
-rw-r--r--assets/js/initMoment.js4
2 files changed, 4 insertions, 7 deletions
diff --git a/assets/js/index.js b/assets/js/index.js
index 03ab427..08ef756 100644
--- a/assets/js/index.js
+++ b/assets/js/index.js
@@ -22,10 +22,3 @@ $(document).keypress(function(e) {
$('.modal.is-active').removeClass('is-active');
}
});
-
-{{ if and .Site.Params.localTime .Page.IsHome }}
-$(document).ready(function() {
- var time = moment().tz("{{ .Site.Params.timeZone }}").format("h:mm A");
- $('#time').html(time);
-})
-{{ end }}
diff --git a/assets/js/initMoment.js b/assets/js/initMoment.js
new file mode 100644
index 0000000..0e8c95d
--- /dev/null
+++ b/assets/js/initMoment.js
@@ -0,0 +1,4 @@
+$(document).ready(function() {
+ var time = moment().tz("{{ .Site.Params.timeZone }}").format("h:mm A");
+ $('#time').html(time);
+})