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

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-02-03 13:38:10 +0300
committerDillon <dillonzq@outlook.com>2020-02-03 13:38:10 +0300
commit52c7ad29a60cc4ee6c51217d11bb4877ef0cf88a (patch)
tree4bf578ddcdbf78b8543bf33d948feceac2b7f5e8 /layouts/_default/baseof.html
parent8aba2262906628f38f114a9947783bc6c7fd7495 (diff)
chore(style): update code style and add an i18n word
Diffstat (limited to 'layouts/_default/baseof.html')
-rw-r--r--layouts/_default/baseof.html11
1 files changed, 10 insertions, 1 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index a174f96..249ab81 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,6 +1,8 @@
+{{- /* LoveIt theme version detection */ -}}
{{- if ne .Site.Params.version "0.1.X" -}}
{{- errorf "\n\nThere are two possible situations that led to this error:\n 1. You haven't copied the config.toml yet. See https://github.com/dillonzq/LoveIt#installation \n 2. You have an incompatible update. See https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n\n有两种可能的情况会导致这个错误发生:\n 1. 你还没有复制 config.toml 参考 https://github.com/dillonzq/LoveIt#installation \n 2. 你进行了一次不兼容的更新 参考 https://github.com//dillonzq/LoveIt/blob/master/CHANGELOG.md \n" -}}
{{- end -}}
+
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
@@ -12,10 +14,13 @@
{{- partial "head.html" . -}}
</head>
<body>
+ {{- /* Check theme isDark before body rendering */ -}}
<script>
window.isDark = (window.localStorage && window.localStorage.getItem('theme')) === 'dark';
window.isDark && document.body.classList.add('dark-theme');
</script>
+
+ {{- /* Body wrapper */ -}}
<div class="wrapper">
{{- partial "header.html" . -}}
<main class="main">
@@ -24,10 +29,14 @@
</div>
</main>
{{- partial "footer.html" . -}}
- {{- partial "scripts.html" . -}}
</div>
+
+ {{- /* Dynamic to top button */ -}}
<a href="#" class="dynamic-to-top" id="dynamic-to-top" data-scroll>
<span>&nbsp;</span>
</a>
+
+ {{- /* Load scripts */ -}}
+ {{- partial "scripts.html" . -}}
</body>
</html> \ No newline at end of file