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

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <jimmehcai@gmail.com>2020-09-17 20:47:03 +0300
committerJimmy Cai <jimmehcai@gmail.com>2020-09-17 20:47:03 +0300
commit845834baa6841d79ff737ef810a0270d02d21856 (patch)
tree4f5f69a138f784266b678593e4fdc213c1c468e7 /layouts
parent841508f491a8e1010efa1645312b721d67f55a3f (diff)
refactor(footer): add footer/include.html
To include HTML code for style and script
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html4
-rw-r--r--layouts/partials/footer/components/custom-font.html (renamed from layouts/partials/footer/style.html)0
-rw-r--r--layouts/partials/footer/components/script.html (renamed from layouts/partials/footer/script.html)4
-rw-r--r--layouts/partials/footer/include.html3
4 files changed, 6 insertions, 5 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index bf3d511..1151e4e 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -9,8 +9,6 @@
</main>
{{- block "right-sidebar" . -}}{{ end }}
</div>
- {{ partial "footer/script.html" . }}
- {{ partial "footer/style.html" . }}
- {{ partial "footer/custom.html" . }}
+ {{ partial "footer/include.html" . }}
</body>
</html>
diff --git a/layouts/partials/footer/style.html b/layouts/partials/footer/components/custom-font.html
index 8e2ff37..8e2ff37 100644
--- a/layouts/partials/footer/style.html
+++ b/layouts/partials/footer/components/custom-font.html
diff --git a/layouts/partials/footer/script.html b/layouts/partials/footer/components/script.html
index dbcaf48..08e357b 100644
--- a/layouts/partials/footer/script.html
+++ b/layouts/partials/footer/components/script.html
@@ -1,7 +1,7 @@
<script src="https://cdn.jsdelivr.net/npm/node-vibrant@3.1.5/dist/vibrant.min.js"
integrity="sha256-5NovOZc4iwiAWTYIFiIM7DxKUXKWvpVEuMEPLzcm5/g=" crossorigin="anonymous"></script>
-{{ $opts := dict "minify" hugo.IsProduction }}
-{{ $script := resources.Get "ts/main.ts" | js.Build $opts }}
+{{- $opts := dict "minify" hugo.IsProduction -}}
+{{- $script := resources.Get "ts/main.ts" | js.Build $opts -}}
<script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script> \ No newline at end of file
diff --git a/layouts/partials/footer/include.html b/layouts/partials/footer/include.html
new file mode 100644
index 0000000..4b50a88
--- /dev/null
+++ b/layouts/partials/footer/include.html
@@ -0,0 +1,3 @@
+{{ partialCached "footer/components/script.html" . }}
+{{ partialCached "footer/components/custom-font.html" . }}
+{{ partial "footer/custom.html" . }} \ No newline at end of file