summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2018-05-01 10:59:19 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2018-05-01 10:59:19 +0200
commit351187585adb2187b7f79e1d97b887febb236d51 (patch)
tree951fd19e0cd2284d680955b7da7eb36270dd5e50 /themes
parent50a4e701cd5791b5400ca4c8b438b17baee351b0 (diff)
downloadwww-andreasbaumann-cc-351187585adb2187b7f79e1d97b887febb236d51.tar.gz
www-andreasbaumann-cc-351187585adb2187b7f79e1d97b887febb236d51.tar.bz2
fixed conditional search jquery code to be used on /search only
Diffstat (limited to 'themes')
-rw-r--r--themes/new_theme/layouts/partials/menu.html2
-rw-r--r--themes/new_theme/layouts/partials/widgets/elasticlunr_search.html2
2 files changed, 3 insertions, 1 deletions
diff --git a/themes/new_theme/layouts/partials/menu.html b/themes/new_theme/layouts/partials/menu.html
index fbeb352..df9c403 100644
--- a/themes/new_theme/layouts/partials/menu.html
+++ b/themes/new_theme/layouts/partials/menu.html
@@ -3,7 +3,7 @@
{{- if .Site.Menus.main }}
{{- $currentNode := . }}
{{- range sort .Site.Menus.main }}
- {{ if ( not ( eq .Name "Data Protection And Privacy" ) ) }}
+ {{- if ( not ( eq .Name "Data Protection And Privacy" ) ) }}
<li class="menu__item {{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}menu__item--active{{end}}"><a class="menu__link" href="{{ .URL }}">{{ .Name | upper }}</a></li>
{{- end }}
{{- end }}
diff --git a/themes/new_theme/layouts/partials/widgets/elasticlunr_search.html b/themes/new_theme/layouts/partials/widgets/elasticlunr_search.html
index c364156..9fa5b34 100644
--- a/themes/new_theme/layouts/partials/widgets/elasticlunr_search.html
+++ b/themes/new_theme/layouts/partials/widgets/elasticlunr_search.html
@@ -9,6 +9,7 @@
<input class="widget-search__submit" type="submit" value="Search">
</form>
</div>
+{{- if ( eq .URL "/search/" ) }}
<script language="Javascript">
$( window ).load( function( ) {
var paramsString = window.location.search;
@@ -20,5 +21,6 @@
} );
</script>
{{- end }}
+{{- end }}