From 928dfc83fdee0c9f0e792177de051fc1a0c58510 Mon Sep 17 00:00:00 2001
From: weru <fromweru@gmail.com>
Date: Mon, 07 Dec 2020 11:45:27 +0000
Subject: [PATCH] update template
---
layouts/partials/scripts.html | 6 +++---
layouts/partials/search.html | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 9cf3787..fc0e03a 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -4,8 +4,8 @@
{{- $funcPath := "js/functions.js" }}
{{- $functions := resources.Get $funcPath | resources.ExecuteAsTemplate $funcPath . }}
-{{- $lunrPath := "js/fuse.js" }}
-{{- $lunr := resources.Get $lunrPath | resources.ExecuteAsTemplate $lunrPath . }}
+{{- $fusePath := "js/fuse.js" }}
+{{- $fuse := resources.Get $fusePath | resources.ExecuteAsTemplate $fusePath . }}
{{- $searchPath := "js/search.js" }}
{{- $search := resources.Get $searchPath | resources.ExecuteAsTemplate $searchPath . }}
@@ -14,6 +14,6 @@
{{- $main := resources.Get $mainScriptPath | resources.ExecuteAsTemplate $mainScriptPath . }}
{{- $bundle := slice $variables $functions $main | resources.Concat "js/bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
-{{- $bundle2 := slice $lunr $search | resources.Concat "js/search.js" | resources.Minify | resources.Fingerprint "sha512" }}
+{{- $bundle2 := slice $fuse $search | resources.Concat "js/search.js" | resources.Minify | resources.Fingerprint "sha512" }}
<script src="{{ $bundle.Permalink }}"></script>
<script src="{{ $bundle2.Permalink }}" async defer></script>
diff --git a/layouts/partials/search.html b/layouts/partials/search.html
index a16194c..bcc56d2 100644
--- a/layouts/partials/search.html
+++ b/layouts/partials/search.html
@@ -4,7 +4,9 @@
{{- partial "sprite" (dict "icon" "search") }}
</label>
<input type="search" class="search_field" placeholder='{{ T "search_field_placeholder" }}' id="find" autocomplete="off">
- <div class="search_results"></div>
+ {{- if ne .Params.searchPage true }}
+ <div class="search_results results"></div>
+ {{- end }}
</div>
{{ end }}
--
Gitblit v1.10.0