# Pull Request Template
## Description
Implemented search results page functionality. Now you can press "Enter"
to search by term and display results in a results page. Also now you
can link to /hc/{account}/en/search?query=XXXXXX to view search results
for XXXXXX query.
fixes: https://github.com/chatwoot/chatwoot/issues/10945
## Screenshots
Classic layout search results:
<img width="3840" height="2160" alt="classic-results"
src="https://github.com/user-attachments/assets/3bbb3272-33ca-4eb4-b80a-76ed77442088"
/>
Classic layout pagination:
<img width="3840" height="2160" alt="classic-page-two"
src="https://github.com/user-attachments/assets/062b09d3-7c58-4d3b-8611-b94375e7db51"
/>
Classic layout empty search:
<img width="3840" height="2160" alt="no-results"
src="https://github.com/user-attachments/assets/c5e3f47a-cd9a-4e14-ae92-ccba00c89e98"
/>
Documentation layout search results:
<img width="3840" height="2160" alt="documentation-results"
src="https://github.com/user-attachments/assets/9e45d8d9-c975-4589-b6c6-3bc7bb3c588e"
/>
Documentation layout dark theme:
<img width="3840" height="2160" alt="documentation-dark"
src="https://github.com/user-attachments/assets/cdb6ed63-4241-4b32-9f79-7d92ed479fc8"
/>
Plain embedded dark layout:
<img width="3840" height="2160" alt="plain-embedded-dark"
src="https://github.com/user-attachments/assets/7deb02b9-9f24-48fb-8979-a2ecd7002c05"
/>
---------
Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Vinay Keerthi <11478411+stonecharioteer@users.noreply.github.com>
42 lines
1.6 KiB
ERB
42 lines
1.6 KiB
ERB
<meta charset="utf-8">
|
|
<meta name="viewport" content="initial-scale=1">
|
|
<meta name="turbo-cache-control" content="no-cache">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<%= vite_client_tag %>
|
|
<%= vite_javascript_tag 'portal' %>
|
|
<style>
|
|
.appearance-menu[data-current-theme="system"] .check-mark-icon:is(.light-theme, .dark-theme),
|
|
.appearance-menu[data-current-theme="dark"] .check-mark-icon:is(.light-theme, .system-theme),
|
|
.appearance-menu[data-current-theme="light"] .check-mark-icon:is(.dark-theme, .system-theme) {
|
|
display: none;
|
|
}
|
|
</style>
|
|
<%= csrf_meta_tags %>
|
|
<% if content_for?(:head) %>
|
|
<%= yield(:head) %>
|
|
<% else %>
|
|
<title><%= @portal.display_title %></title>
|
|
<% end %>
|
|
|
|
<% if @portal.logo.present? %>
|
|
<link rel="icon" href="<%= url_for(@portal.logo) %>">
|
|
<% end %>
|
|
|
|
<% unless @theme_from_params.blank? %>
|
|
<%# this adds the theme from params, ensuring that there a localstorage value set %>
|
|
<%# this will further trigger the next script to ensure color mode is toggled without a FOUC %>
|
|
<script>localStorage.theme = '<%= @theme_from_params %>';</script>
|
|
<% end %>
|
|
|
|
<script>
|
|
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
|
// we can use document.body here but that would mean pushing this script inside the body
|
|
// since the body is not created yet. This is done to avoid FOUC, at a tiny cost of Time to Interactive
|
|
document.documentElement.classList.add('dark')
|
|
} else {
|
|
document.documentElement.classList.remove('dark')
|
|
document.documentElement.classList.add('light')
|
|
}
|
|
</script>
|