You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 lines
707 B

<div id="goto-anything" class="<%= @popup_class %>" phx-window-keydown="hotkey" phx-hook="GotoAnything">
<form action="#">
<input id="query"
type="text"
placeholder="Search for anything..."
autocomplete="off"
phx-keydown="search"
phx-debounce="100">
</form>
<div class="results">
<%= if Enum.empty?(@results) do %>
<div class="card result">
<strong>No results..</strong>
<div>yet</div>
</div>
<% else %>
<%= for note <- @results do %>
<div class="card result">
<strong><%= note.title %></strong>
<div>
<%= live_redirect "Go to Note", to: Routes.note_show_path(@socket, :show, note.id) %>
</div>
</div>
<% end %>
<% end %>
</div>
</div>