This repository has been archived on 2026-02-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
federation/templates/federation/search.html
giles 87ce2d4970
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 49s
Add actor search with infinite scroll
Replace single WebFinger lookup with paginated search across cached
remote actors and local profiles. New _search_results.html partial
with htmx infinite scroll sentinel. Form submits via hx-get for
seamless pagination.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 08:18:59 +00:00

33 lines
1.1 KiB
HTML

{% extends "_types/social/index.html" %}
{% block title %}Search — Rose Ash{% endblock %}
{% block social_content %}
<h1 class="text-2xl font-bold mb-6">Search</h1>
<form method="get" action="{{ url_for('social.search') }}" class="mb-6"
hx-get="{{ url_for('social.search_page') }}"
hx-target="#search-results"
hx-push-url="{{ url_for('social.search') }}">
<div class="flex gap-2">
<input type="text" name="q" value="{{ query }}"
class="flex-1 border border-stone-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-stone-500"
placeholder="Search users or @user@instance.tld">
<button type="submit"
class="bg-stone-800 text-white px-6 py-2 rounded hover:bg-stone-700">
Search
</button>
</div>
</form>
{% if query and total %}
<p class="text-sm text-stone-500 mb-4">{{ total }} result{{ 's' if total != 1 }} for <strong>{{ query }}</strong></p>
{% elif query %}
<p class="text-stone-500 mb-4">No results found for <strong>{{ query }}</strong></p>
{% endif %}
<div id="search-results">
{% include "federation/_search_results.html" %}
</div>
{% endblock %}