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

github.com/h-enk/doks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2022-06-25 14:54:54 +0300
committerJames Elliott <james-d-elliott@users.noreply.github.com>2022-06-25 14:54:54 +0300
commit76d7db7b4c3514cebfd1631a2fdb29234b400221 (patch)
tree821421e8a5d89ccb0376352a9f762d63f2d5ea8a
parentb532c69bd769353490e412e22d790e484aeb91dc (diff)
feat: handle homepage for search sections show
-rw-r--r--layouts/partials/footer/script-footer.html2
-rw-r--r--layouts/partials/header/header.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/footer/script-footer.html b/layouts/partials/footer/script-footer.html
index 1a571d1..7240b00 100644
--- a/layouts/partials/footer/script-footer.html
+++ b/layouts/partials/footer/script-footer.html
@@ -40,7 +40,7 @@
{{ $flexSearch := resources.Get "js/vendor/flexsearch/dist/flexsearch.bundle.js" -}}
{{ $slice = $slice | append $flexSearch -}}
{{ if and (isset .Site.Params.options "searchsectionsshow") (not (eq .Site.Params.options.searchSectionsShow "ALL")) -}}
- {{ $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) -}}
+ {{ $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) (and .IsHome (in .Site.Params.options.searchSectionsShow "HomePage")) -}}
{{ end -}}
{{ end -}}
diff --git a/layouts/partials/header/header.html b/layouts/partials/header/header.html
index 77c24de..d6e0f6e 100644
--- a/layouts/partials/header/header.html
+++ b/layouts/partials/header/header.html
@@ -80,7 +80,7 @@
{{- $showFlexSearch := .Site.Params.options.flexSearch }}
{{- if $showFlexSearch }}
{{- if and (isset .Site.Params.options "searchsectionsshow") (not (eq .Site.Params.options.searchSectionsShow "ALL")) }}
- {{- $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) }}
+ {{- $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) (and .IsHome (in .Site.Params.options.searchSectionsShow "HomePage")) }}
{{- end }}
{{- end }}