clacks/lib/clacks_web/templates/frontend/search.html.eex

32 lines
880 B
Elixir
Raw Normal View History

2020-04-26 02:28:30 +00:00
<%= form_tag Routes.frontend_path(@conn, :search), method: :get, class: "search-form" do %>
<input type="text" name="q" id="q" placeholder="Search Query" value="<%= @q %>">
<%= submit "Search" %>
<% end %>
2020-04-26 20:15:20 +00:00
<%= if length(@actor_results) > 0 do %>
<hr>
<%= for actor <- @actor_results do %>
<div class="actor">
<h2 class="actor-nickname">
<a href="<%= local_actor_link(actor) %>">
<%= actor.data["preferredUsername"] %>
</a>
</h2>
<h3 class="actor-username">
<a href="<%= actor.ap_id %>">
<%= display_username(actor) %>
</a>
</h3>
</div>
<% end %>
<% end %>
2020-04-27 02:57:47 +00:00
<%= if length(@status_results) > 0 do %>
2020-04-26 02:28:30 +00:00
<hr>
<%= for {status, author} <- @status_results do %>
<%= render "_status.html", conn: @conn, author: author, status: status, note: status.object.data %>
2020-04-26 02:28:30 +00:00
<% end %>
<% end %>