From cdb71a83d22f0ef1d5c572a5acaf85ba7f6883ff Mon Sep 17 00:00:00 2001 From: razonyang Date: Fri, 5 Aug 2022 23:06:49 +0800 Subject: [PATCH] feat: add the search form widget --- .../layouts/partials/hooks/sidebar-begin.html | 1 + layouts/partials/sidebar/search-form.html | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 exampleSite/layouts/partials/hooks/sidebar-begin.html create mode 100644 layouts/partials/sidebar/search-form.html diff --git a/exampleSite/layouts/partials/hooks/sidebar-begin.html b/exampleSite/layouts/partials/hooks/sidebar-begin.html new file mode 100644 index 000000000..49d804713 --- /dev/null +++ b/exampleSite/layouts/partials/hooks/sidebar-begin.html @@ -0,0 +1 @@ +{{- partial "sidebar/search-form" . }} diff --git a/layouts/partials/sidebar/search-form.html b/layouts/partials/sidebar/search-form.html new file mode 100644 index 000000000..a7ba22efd --- /dev/null +++ b/layouts/partials/sidebar/search-form.html @@ -0,0 +1,15 @@ +{{- $page := .Site.GetPage "search" -}} +{{- if $page }} +
+
+
+
+ + +
+
+
+
+{{- end }}