mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-15 21:31:26 +00:00
add remote follow templates
This commit is contained in:
parent
e275b98183
commit
2e428e6ea1
2 changed files with 59 additions and 0 deletions
43
bookwyrm/templates/ostatus/remote_follow.html
Normal file
43
bookwyrm/templates/ostatus/remote_follow.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
{% extends 'ostatus/template.html' %}
|
||||
{% load i18n %}
|
||||
{% load utilities %}
|
||||
|
||||
{% block content %}
|
||||
<div class="block card">
|
||||
<header class="card-header">
|
||||
<h2 class="card-header-title">{% blocktrans %}Follow {{ user.display_name }} on the fediverse{% endblocktrans %}</h2>
|
||||
</header>
|
||||
<div class="card-content">
|
||||
<div class="media">
|
||||
<a href="{{ user.local_path }}" class="media-left">
|
||||
{% include 'snippets/avatar.html' with user=user large=True %}
|
||||
</a>
|
||||
<div class="media-content">
|
||||
<a href="{{ user.local_path }}" class="is-block mb-2">
|
||||
<span class="title is-4 is-block">
|
||||
{{ user.display_name }}
|
||||
{% if user.manually_approves_followers %}
|
||||
<span class="icon icon-lock is-size-7" title="{% trans 'Locked account' %}">
|
||||
<span class="is-sr-only">{% trans "Locked account" %}</span>
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
<span class="subtitle is-7 is-block">@{{ user|username }}</span>
|
||||
</a>
|
||||
<p>Follow {{ user.name }} from another Fediverse account like Bookwyrm, Mastodon, or Pleroma.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<section class="card-content content">
|
||||
<form name="remote-follow" method="post" action="{% url 'remote-follow' %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ user.username }}">
|
||||
<label class="label" for="remote_user">User handle to follow from:</label>
|
||||
<input class="input" type="text" name="remote_user" id="remote_user" placeholder="user@example.social">
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
16
bookwyrm/templates/ostatus/remote_follow_button.html
Normal file
16
bookwyrm/templates/ostatus/remote_follow_button.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{% load i18n %}
|
||||
{% if request.user == user %}
|
||||
{% else %}
|
||||
|
||||
<div class="field mb-0">
|
||||
<div class="control">
|
||||
<form method="GET" action="{% url 'remote-follow-page' %}" >
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="user" value="{{ user.username }}">
|
||||
<button class="button is-small{% if not minimal %} is-link{% endif %}" type="submit">
|
||||
{% blocktrans with username=user.localname %}Follow on Fediverse{% endblocktrans %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
Loading…
Reference in a new issue