From 830cabab1f638052a8c4ac39eb86370da5a676eb Mon Sep 17 00:00:00 2001
From: Jieiku
Date: Sun, 14 Aug 2022 12:41:15 -0700
Subject: Alternate Search Libraries Tinysearch and Stork
---
templates/macros/head.html | 58 +++++++++++++++++++++++++++++++++++-----------
1 file changed, 44 insertions(+), 14 deletions(-)
(limited to 'templates/macros/head.html')
diff --git a/templates/macros/head.html b/templates/macros/head.html
index 0fbae7c..c3b217c 100644
--- a/templates/macros/head.html
+++ b/templates/macros/head.html
@@ -1,3 +1,4 @@
+{#- Theme Switcher Button to toggle between dark/light #}
{%- macro theme() %}
{%- if config.extra.js_theme %}
{%- if config.extra.js_themeButton or config.extra.js_bundle %}
@@ -70,19 +71,35 @@
{%- endif %}
{%- endif %}
-{%- if config.build_search_index and config.extra.js_bundle %}
+{%- if config.extra.js_bundle and config.build_search_index or config.extra.js_bundle and config.extra.search_library %}
{%- if config.extra.js_search_facade %}
- {# dont load the index #}
+ {#- dont load the index #}
+ {%- elif config.extra.search_library == "tinysearch" or config.extra.search_library == "stork" %}
+ {#- dont load the index #}
{%- elif config.extra.js_search_index %}
{%- endif %}
- {%- if config.extra.js_bundle %}
-
+
+ {%- if not config.extra.js_search_facade %}
+
+ {%- if config.extra.js_switcher %}
+
+ {%- else %}
+
+ {%- endif %}
+
+ {%- elif config.extra.search_library == "tinysearch" %}
+
+ {%- elif config.extra.search_library == "stork" %}
+
+ {%- else %}
+
{%- endif %}
-{%- elif config.build_search_index %}
+
+{%- elif config.build_search_index or config.extra.search_library %}
{#- no bundle #}
@@ -90,8 +107,8 @@
{%- if config.extra.js_prestyle %}
{%- endif %}
-
{%- endif %}
+
{%- if config.extra.js_theme %}
{%- if config.extra.js_themeButton %}
@@ -109,26 +126,39 @@
{%- endif %}
{%- if config.extra.js_search_facade %}
+ {%- if config.extra.search_library %}
+ {%- if config.extra.search_library == "tinysearch" %}
+
+ {%- elif config.extra.search_library == "stork" %}
+
+ {%- endif %}
+ {%- endif %}
{%- endif %}
- {%- if config.extra.js_search_facade %}
-
+ {%- if config.extra.js_search_facade or config.extra.search_library %}
+ {#- dont load the index/search #}
{%- elif config.extra.js_search_index %}
{%- endif %}
+
{%- if config.extra.js_search_facade %}
- {# dont load the index/search #}
- {%- elif config.extra.js_search %}{%- for i in config.extra.js_search %}
-
- {%- endfor %}{%- endif %}
+ {#- dont load the index/search #}
+ {%- else %}
+ {%- if config.extra.search_library == "tinysearch" %}
+
+ {%- elif config.extra.search_library == "stork" %}
+
+ {%- else %}
+
+
+ {%- endif %}
+ {%- endif %}
{%- elif config.extra.js_bundle %}
{#- no search #}
-
-
{%- else %}
{#- no bundle or search #}
--
cgit v1.3.1