{% extends "base.html" %}

{% block title %}{{ domain }} - Bridgy Fed{% endblock %}

{% block content %}

{% if user.has_redirects == False %}
<div class="row promo warning">
<form method="post" action="/web-site">
  Next step:
  <a href="/docs#redirect+these+URL+paths">
    add the .well-known redirects.
  </a>
  <input type="hidden" name="url" value="https://{{ domain }}" />
  <input type="submit" class="btn btn-default" value="Check now" />
</form>

{% if user.redirects_error %}
<details class="small">
  {{ user.redirects_error|safe }}
</details>
{% endif %}
</div>
{% endif %}

{% if user.has_hcard == False %}
<div class="row promo warning">
<form method="post" action="/web-site">
  Next step:
  <a href="https://indiewebify.me/validate-h-card/?url=https://{{ domain }}">
    add a representative h-card.
  </a>
  <input type="hidden" name="url" value="https://{{ domain }}" />
  <input type="submit" class="btn btn-default" value="Check now" />
</form>
</div>
{% endif %}

{% include "user_addresses.html" %}

<div class="row">
    <a href="/user/{{ domain }}/followers">{{ followers }} follower{% if followers != '1' %}s{% endif %}</a>
  &middot; <a href="/user/{{ domain }}/following">following {{ following }}</a>
  &middot; <a href="/user/{{ domain }}/feed">HTML</a>
  &middot; <a href="/user/{{ domain }}/feed?format=atom">Atom</a>
  &middot; <a href="/user/{{ domain }}/feed?format=rss">RSS</a>
  &middot; <a href="/.well-known/webfinger?resource=acct:{{ domain }}@{{ domain }}">Webfinger</a>
  &middot; <a href="/{{ domain }}">ActivityPub</a>
</div>

<div class="row">
<form method="post" action="/remote-follow">
<p>
 <label for="follow-address">Follow @{{ domain }} with your fediverse address:</label>
 <input id="follow-address" name="address" type="text" required
        placeholder="@user@domain.social" alt="fediverse address"
        value="{{ follow_url or '' }}"></input>
 <input name="domain" type="hidden" value="{{ domain }}"></input>
 <button type="submit" class="btn btn-default">Follow</button>
</p>
</form>
</div>

{% include "activities.html" %}

{% endblock %}
