Files
mono/federation/templates/federation/_interaction_buttons.html
giles f42042ccb7 Monorepo: consolidate 7 repos into one
Combines shared, blog, market, cart, events, federation, and account
into a single repository. Eliminates submodule sync, sibling model
copying at build time, and per-app CI orchestration.

Changes:
- Remove per-app .git, .gitmodules, .gitea, submodule shared/ dirs
- Remove stale sibling model copies from each app
- Update all 6 Dockerfiles for monorepo build context (root = .)
- Add build directives to docker-compose.yml
- Add single .gitea/workflows/ci.yml with change detection
- Add .dockerignore for monorepo build context
- Create __init__.py for federation and account (cross-app imports)
2026-02-24 19:44:17 +00:00

62 lines
3.1 KiB
HTML

{% set oid = item.object_id if item is defined and item.object_id is defined else item_object_id | default('') %}
{% set ainbox = item.author_inbox if item is defined and item.author_inbox is defined else item_author_inbox | default('') %}
{% set lcount = item.like_count if item is defined and item.like_count is defined else like_count | default(0) %}
{% set bcount = item.boost_count if item is defined and item.boost_count is defined else boost_count | default(0) %}
{% set liked = item.liked_by_me if item is defined and item.liked_by_me is defined else liked_by_me | default(false) %}
{% set boosted = item.boosted_by_me if item is defined and item.boosted_by_me is defined else boosted_by_me | default(false) %}
<div class="flex items-center gap-4 mt-3 text-sm text-stone-500">
{% if liked %}
<form hx-post="{{ url_for('social.unlike') }}"
hx-target="#interactions-{{ oid | replace('/', '_') | replace(':', '_') }}"
hx-swap="innerHTML">
<input type="hidden" name="object_id" value="{{ oid }}">
<input type="hidden" name="author_inbox" value="{{ ainbox }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button type="submit" class="flex items-center gap-1 text-red-500 hover:text-red-600">
<span>&#x2665;</span> {{ lcount }}
</button>
</form>
{% else %}
<form hx-post="{{ url_for('social.like') }}"
hx-target="#interactions-{{ oid | replace('/', '_') | replace(':', '_') }}"
hx-swap="innerHTML">
<input type="hidden" name="object_id" value="{{ oid }}">
<input type="hidden" name="author_inbox" value="{{ ainbox }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button type="submit" class="flex items-center gap-1 hover:text-red-500">
<span>&#x2661;</span> {{ lcount }}
</button>
</form>
{% endif %}
{% if boosted %}
<form hx-post="{{ url_for('social.unboost') }}"
hx-target="#interactions-{{ oid | replace('/', '_') | replace(':', '_') }}"
hx-swap="innerHTML">
<input type="hidden" name="object_id" value="{{ oid }}">
<input type="hidden" name="author_inbox" value="{{ ainbox }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button type="submit" class="flex items-center gap-1 text-green-600 hover:text-green-700">
<span>&#x21BB;</span> {{ bcount }}
</button>
</form>
{% else %}
<form hx-post="{{ url_for('social.boost') }}"
hx-target="#interactions-{{ oid | replace('/', '_') | replace(':', '_') }}"
hx-swap="innerHTML">
<input type="hidden" name="object_id" value="{{ oid }}">
<input type="hidden" name="author_inbox" value="{{ ainbox }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button type="submit" class="flex items-center gap-1 hover:text-green-600">
<span>&#x21BB;</span> {{ bcount }}
</button>
</form>
{% endif %}
{% if oid %}
<a href="{{ url_for('social.compose_form', reply_to=oid) }}"
class="hover:text-stone-700">Reply</a>
{% endif %}
</div>