2020-02-24 10:00:39 +01:00
|
|
|
{{- $scratch := newScratch -}}
|
|
|
|
{{- .Scratch.Set "scratch" $scratch -}}
|
2020-03-02 10:03:35 +01:00
|
|
|
{{- if eq hugo.Environment "production" -}}
|
2020-02-24 10:00:39 +01:00
|
|
|
{{- $scratch.Set "CDN" .Site.Params.cdn -}}
|
2020-03-09 13:25:55 +01:00
|
|
|
{{- $scratch.Set "fingerprint" .Site.Params.fingerprint -}}
|
2020-02-14 14:09:21 +01:00
|
|
|
{{- end -}}
|
|
|
|
|
2020-03-16 14:35:16 +01:00
|
|
|
{{- $scratch.Set "major-version" "0.2.X" -}}
|
|
|
|
{{- $scratch.Set "version" "0.2.0" -}}
|
|
|
|
|
|
|
|
{{- /* LoveIt theme version detection */ -}}
|
|
|
|
{{- if not .Site.Params.version -}}
|
|
|
|
{{- errorf "\n\nYou haven't configured the LoveIt version param correctly yet. See https://hugoloveit.com/theme-documentation-basics/#basic-configuration \n你还没有正确配置 LoveIt 的版本参数 参考 https://hugoloveit.com/zh-cn/theme-documentation-basics/#basic-configuration \n" -}}
|
|
|
|
{{- else if ne .Site.Params.version ($scratch.Get "major-version") -}}
|
|
|
|
{{- errorf (printf "\n\n%s -> %s:\nYou have an incompatible update. See https://github.com/dillonzq/LoveIt/releases \n你进行了一次不兼容的更新 参考 https://github.com/dillonzq/LoveIt/releases \n" .Site.Params.version ($scratch.Get "major-version")) -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
2019-02-03 12:30:44 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="{{ .Site.LanguageCode }}">
|
2019-08-04 15:53:35 +02:00
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
2020-02-13 18:30:33 +01:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<meta name="robots" content="noodp" />
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
2020-01-31 15:53:04 +01:00
|
|
|
<title>
|
|
|
|
{{- block "title" . }}{{ .Site.Title }}{{ end -}}
|
|
|
|
</title>
|
2020-02-13 18:30:33 +01:00
|
|
|
<meta name="Description" content="{{ .Params.description | default .Site.Params.description }}">
|
|
|
|
|
|
|
|
{{- partial "head/meta.html" . -}}
|
|
|
|
{{- partial "head/link.html" . -}}
|
|
|
|
{{- partial "head/seo.html" . -}}
|
2019-08-04 15:53:35 +02:00
|
|
|
</head>
|
2019-08-21 22:01:02 +02:00
|
|
|
<body>
|
2020-02-03 11:38:10 +01:00
|
|
|
{{- /* Check theme isDark before body rendering */ -}}
|
2020-04-15 09:46:50 +02:00
|
|
|
{{- $theme := .Site.Params.defaultTheme -}}
|
|
|
|
<script type="text/javascript">(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('{{ .Site.Params.defaultTheme }}' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : '{{ .Site.Params.defaultTheme }}' === 'dark')) && document.body.classList.add('dark');</script>
|
|
|
|
|
|
|
|
<div id="mask"></div>
|
2020-02-03 11:38:10 +01:00
|
|
|
|
|
|
|
{{- /* Body wrapper */ -}}
|
2019-08-04 15:53:35 +02:00
|
|
|
<div class="wrapper">
|
2020-01-31 11:46:28 +01:00
|
|
|
{{- partial "header.html" . -}}
|
2019-08-04 15:53:35 +02:00
|
|
|
<main class="main">
|
|
|
|
<div class="container">
|
2020-01-31 11:46:28 +01:00
|
|
|
{{- block "content" . }}{{ end -}}
|
2019-08-04 15:53:35 +02:00
|
|
|
</div>
|
|
|
|
</main>
|
2020-01-31 11:46:28 +01:00
|
|
|
{{- partial "footer.html" . -}}
|
2019-08-04 15:53:35 +02:00
|
|
|
</div>
|
2020-02-03 11:38:10 +01:00
|
|
|
|
2020-03-16 19:03:36 +01:00
|
|
|
<div id="fixed-buttons" class="animated faster">
|
2020-03-16 08:01:51 +01:00
|
|
|
{{- /* top button */ -}}
|
2020-04-15 09:46:50 +02:00
|
|
|
<a href="#" id="back-to-top" class="fixed-button" title="{{ T `backToTop` }}">
|
2020-03-16 08:01:51 +01:00
|
|
|
<i class="fas fa-arrow-up fa-fw"></i>
|
|
|
|
</a>
|
2020-03-16 19:03:36 +01:00
|
|
|
|
|
|
|
{{- /* comment button */ -}}
|
2020-04-15 09:46:50 +02:00
|
|
|
<a href="#" id="view-comments" class="fixed-button" title="{{ T `viewComments` }}">
|
2020-03-16 19:03:36 +01:00
|
|
|
<i class="fas fa-comment fa-fw"></i>
|
|
|
|
</a>
|
2020-03-16 08:01:51 +01:00
|
|
|
</div>
|
2020-02-03 11:38:10 +01:00
|
|
|
|
2020-02-27 13:14:40 +01:00
|
|
|
{{- /* Load JavaScript scripts and CSS */ -}}
|
|
|
|
{{- partial "assets.html" . -}}
|
2019-08-04 15:53:35 +02:00
|
|
|
</body>
|
2020-02-06 17:10:00 +01:00
|
|
|
</html>
|