bridgy-fed/templates/user_base.html

97 wiersze
3.3 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ id }} {{ tab }} - Bridgy Fed{% endblock %}
{% block content %}
{% if user.LABEL == 'web' and not user.has_redirects %}
<div class="row promo warning">
<p>Bridgy Fed is providing <a href="{{ user.web_url() }}">{{ user.handle_or_id() }}</a> a presence in the <a href="https://en.wikipedia.org/wiki/Fediverse">fediverse</a>. This account was generated automatically when someone first followed it. <a href="/docs#web-how-post">Learn more here</a>.</p>
<p>Do you own <a href="{{ user.web_url() }}">{{ user.handle_or_id() }}</a>? You can <a href="/docs#opt-out">opt out</a> or <a href="/docs#fediverse-enhanced">upgrade your fediverse handle</a> from <code>@web.brid.gy</code> to <code>@{{ user.handle_or_id() }}</code>.</p>
<form method="post" action="/web-site">
<span style="vertical-align: top">
Got your <a href="/docs#fediverse-enhanced">redirects set up</a>?
<input type="hidden" name="url" value="{{ user.web_url() }}" />
<input type="submit" class="btn btn-default" value="Check now" />
</span>
{% if user.redirects_error %}
<details>
<summary class="btn btn-default">See results</summary>
<span class="small">{{ user.redirects_error|safe }}</span>
</details>
{% endif %}
</form>
</div>
{% endif %} {# promos for web users #}
<div class="row">
<span class="big">
{% if user.name() != user.handle_or_id() %}
{{ user.user_link()|safe }}
&middot;
{% else %}
{% if user.profile_picture() %}
<img src="{{ user.profile_picture() }}" class="profile">
{% endif %}
{% endif %}
<nobr>
<a href="{{ user.web_url() }}"
title="{{ user.__class__.__name__ }} (native)">
<span class="logo">{{ user.LOGO_HTML|safe }}</span>
{{ user.handle_or_id() }}
</a>
{% if user.LABEL == 'web' %}
<form method="post" action="/webmention-interactive">
<input name="source" type="hidden" value="{{ user.web_url() }}" />
<button id="update-profile-button" type="submit" title="Update profile"
class="btn btn-default glyphicon glyphicon-refresh"></button>
</form>
{% endif %}
</nobr>
</span>
{% set copies = user.copies|map(attribute='protocol')|list %}
{% for proto in set(PROTOCOLS.values()) %}
{% if proto and not isinstance(user, proto)
and proto.LABEL not in ('ui', 'web')
and (proto.LABEL not in ids.COPIES_PROTOCOLS or proto.LABEL in copies) %}
&middot;
<nobr title="{{ proto.__name__ }} (bridged)">
<span class="logo">{{ proto.LOGO_HTML|safe }}</span>
{{ user.handle_as(proto) }}
</nobr>
{% endif %}
{% endfor %}
</div>
<!-- tabs -->
<div class="row tabs">
<a class="left-tab"></a>
<a href="{{ user.user_page_path() }}"
{% if tab == 'profile' %}class="active-tab"{% endif %}
>👤 Profile</a>{% if user.LABEL == 'web' %}<a
href="{{ user.user_page_path('home') }}"
{% if tab == 'home' %}class="active-tab"{% endif %}
>🏠 Feed</a>{% endif %}<a
href="{{ user.user_page_path('notifications') }}"
{% if tab == 'notifications' %}class="active-tab"{% endif %}
>🔔 Notifications</a>
<a class="right-tab"></a>
</div>
{% block subtabs %}
{% endblock subtabs %}
{% block feed %}
{% include "activities.html" %}
{% endblock feed %}
{% endblock content %}