-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathuser_base.html
93 lines (80 loc) · 3.62 KB
/
user_base.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{% 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> and/or <a href="https://bsky.social/">Bluesky</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">
<nobr>
{{ user.user_link(pictures=True)|safe }}
<form method="post" action="{{ user.user_page_path('update-profile', prefer_id=True) }}">
<button id="update-profile-button" type="submit" title="Update profile"
class="btn btn-default glyphicon glyphicon-refresh"></button>
</form>
</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 user.is_enabled(proto) %}
{% set url = proto.bridged_web_url_for(user) %}
{% set handle = user.handle_as(proto) %}
·
<nobr title="{{ proto.__name__ }} (bridged): {{ handle }}">
{% if url %} <a rel="me" href="{{ url }}"> {% endif %}
<span class="logo">{{ proto.LOGO_HTML|safe }}</span>
<span style="unicode-bidi: isolate">{{ util.ellipsize(handle, chars=40) }}</span>
{% if url %}
</a>
{% else %}
<button class="btn btn-default btn-copy glyphicon glyphicon-duplicate"
onclick="navigator.clipboard.writeText('{{ handle }}')"
title="Copy {{ handle }} to clipboard"> </button>
{% endif %}
{% if proto.LABEL == 'atproto' %}
{% set did = user.get_copy(PROTOCOLS['atproto']) %}
<button class="btn btn-default btn-copy glyphicon glyphicon-tag"
onclick="navigator.clipboard.writeText('{{ did }}')"
title="Copy {{ did }} to clipboard"></button>
{% endif %}
</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 %}