diff --git a/README.md b/README.md
index 303ce1a..ab85609 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,8 @@ summaryLength = 70 # number of words for article summaries
highlightBgColor = "#34363b"; # card and circle navigation background color for discrete card mode
enableSearch = true # enable search page
+ searchbarEverywhere = true # if the searchbar should be shown in every page; requires enableSearch
+ searchMenuLink = false # add a search link to the navigation menu; requires enableSearch
# enable comments support with commento using the script from your server
commento = "https://example.com/js/commento.js"
diff --git a/assets/scss/style.scss b/assets/scss/style.scss
index 939dfbf..467608f 100644
--- a/assets/scss/style.scss
+++ b/assets/scss/style.scss
@@ -341,6 +341,7 @@ ul.list {
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
+ margin: 12px 0;
.nerdlink {
display: inline-block;
cursor: pointer;
@@ -359,3 +360,13 @@ ul.list {
outline: none;
}
}
+
+.titleAndSearchContainer {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ .search {
+ &, #searchbar {font-size: 1em;}
+ }
+}
diff --git a/layouts/_default/search.html b/layouts/_default/search.html
index c746082..8b16c4b 100644
--- a/layouts/_default/search.html
+++ b/layouts/_default/search.html
@@ -2,10 +2,7 @@
-
+{{- partial "searchbar.html" . -}}
{{- partial "js_paginator.html" . -}}
@@ -43,9 +40,5 @@
performSearch(searchTerm);
}
}
- function newSearch() {
- location.href = baseUrl+`?q=${searchbar.value}`;
- }
- searchbar.onkeyup = (ev) => {if (ev.keyCode == 13) newSearch()};
{{ end }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 34c5ea3..c686daf 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,27 +1,35 @@
{{- partial "inject/header-before.html" . -}}
-
-
-
-
{{ .Site.Title | default "Ficurinia" }}
-
+
+
+
+
+
{{ .Site.Title | default "Ficurinia" }}
+
+
+ {{ if and (.Site.Params.searchbarEverywhere | default true) (and (.Site.Params.enableSearch | default true) (not (eq .Title "Search"))) }}
+ {{- partial "searchbar.html" . -}}
+
+ {{ end }}
{{ if .Site.Params.showRss | default true }}
diff --git a/layouts/partials/searchbar.html b/layouts/partials/searchbar.html
new file mode 100644
index 0000000..666f542
--- /dev/null
+++ b/layouts/partials/searchbar.html
@@ -0,0 +1,12 @@
+
+