diff --git a/app/views/entries/_filters.html.erb b/app/views/entries/_filters.html.erb
index 570e5a2..bf729ac 100644
--- a/app/views/entries/_filters.html.erb
+++ b/app/views/entries/_filters.html.erb
@@ -1,5 +1,5 @@
- <% base_params = { q: @query.presence, category: @category.presence, language: @language_code.presence, starts_with: @starts_with.presence }.compact %>
+ <% base_params = { q: @query, category: @category.presence, language: @language_code.presence, starts_with: @starts_with.presence }.compact %>
<% all_category_params = base_params.except(:category) %>
<%= link_to "All",
entries_path(all_category_params),
@@ -13,7 +13,7 @@
<% end %>
-
+
<% all_language_params = base_params.except(:language, :starts_with, :page) %>
<%= link_to "All Languages",
entries_path(all_language_params),
diff --git a/app/views/entries/index.html.erb b/app/views/entries/index.html.erb
index c08a06f..11ae5ec 100644
--- a/app/views/entries/index.html.erb
+++ b/app/views/entries/index.html.erb
@@ -29,24 +29,32 @@
- <% if @query.present? %>
-
- <%= link_to "×",
- entries_path(category: @category.presence, language: @language_code.presence, starts_with: @starts_with.presence),
- class: "text-slate-400 hover:text-slate-600 text-2xl leading-none",
- aria: { label: "Clear search" },
- data: { turbo_stream: true } %>
-
- <% end %>
+
+
+
<%= form.text_field :q,
value: @query,
placeholder: "Search words, phrases, or biblical terms...",
class: "block w-full pl-11 pr-10 mt-2 mb-2 py-4 bg-white border border-slate-200 rounded-2xl shadow-sm focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition",
- oninput: "this.form.requestSubmit()" %>
+ oninput: "const clearBtn=this.form.querySelector('[data-clear-search]'); if(clearBtn){clearBtn.classList.toggle('hidden', this.value.length===0);} this.form.requestSubmit();" %>
<% end %>
-
+
+
+
<%= render "entries/filters" %>
@@ -57,3 +65,19 @@
+
+