2024-02-07 17:31:12 +13:00
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
{% extends 'themes/' + theme() + '/base.html' %}
{% else %}
{% extends "base.html" %}
2024-12-10 12:16:52 +01:00
{% endif %}
2023-10-07 21:32:19 +13:00
{% from 'bootstrap/form.html' import render_form %}
2024-02-19 16:26:58 +13:00
{% if current_user.is_authenticated and user.id == current_user.id %}
2024-02-19 15:56:56 +13:00
{% set active_child = 'view_profile' %}
{% endif %}
2023-10-07 21:32:19 +13:00
{% block app_content %}
< div class = "row" >
2023-11-30 20:57:51 +13:00
< div class = "col-12 col-md-8 position-relative main_pane" >
2023-10-07 21:32:19 +13:00
{% if user.cover_image() != '' %}
< div class = "community_header" style = "height: 240px; background-image: url({{ user.cover_image() }});" >
< nav aria-label = "breadcrumb" id = "breadcrumb_nav" title = "Navigation" >
< ol class = "breadcrumb" >
< li class = "breadcrumb-item" > < a href = "/" > {{ _('Home') }}< / a > < / li >
2024-01-03 20:53:06 +13:00
< li class = "breadcrumb-item" > < a href = "/people" > {{ _('People') }}< / a > < / li >
2024-01-01 14:49:15 +13:00
< li class = "breadcrumb-item active" > {{ user.display_name()|shorten }}< / li >
2023-10-07 21:32:19 +13:00
< / ol >
< / nav >
< / div >
2024-01-23 19:17:05 +13:00
< img class = "community_icon_big bump_up rounded-circle" src = "{{ user.avatar_image() }}" alt = "{{ _('Profile pic') }}" / >
2024-04-19 20:06:08 +12:00
< h1 class = "mt-2" > {{ user.display_name() if user.is_local() else user.display_name() + ', ' + user.ap_id }}
{% if current_user.is_authenticated %}
{% include 'user/_notification_toggle.html' %}
{% endif %}
< / h1 >
2023-10-07 21:32:19 +13:00
{% elif user.avatar_image() != '' %}
< div class = "row" >
2024-05-12 14:37:27 +12:00
< nav aria-label = "breadcrumb" id = "breadcrumb_nav" title = "Navigation" >
< ol class = "breadcrumb" >
< li class = "breadcrumb-item" > < a href = "/" > {{ _('Home') }}< / a > < / li >
< li class = "breadcrumb-item" > < a href = "/people" > {{ _('People') }}< / a > < / li >
< li class = "breadcrumb-item active" > {{ user.display_name()|shorten }}< / li >
< / ol >
< / nav >
2024-12-07 10:22:23 +13:00
< div class = "col-3 col-md-2" >
2024-04-17 19:17:11 +12:00
{% if low_bandwidth %}
< img class = "community_icon_big rounded-circle" src = "{{ user.avatar_image() }}" alt = "{{ _('Profile pic') }}" / >
{% else %}
{% if user.avatar.source_url and user.avatar.source_url.endswith('.mp4') %}
< video autoplay disablepictureinpicture loop muted class = "community_icon_big rounded-circle" >
< source src = "{{ user.avatar.source_url }}" type = "video/mp4" >
< / video >
{% else %}
< img class = "community_icon_big rounded-circle" src = "{{ user.avatar_image() }}" alt = "{{ _('Profile pic') }}" / >
{% endif %}
{% endif %}
2023-10-07 21:32:19 +13:00
< / div >
2024-12-07 10:22:23 +13:00
< div class = "col-9 col-md-10" >
2024-04-19 20:06:08 +12:00
< h1 class = "mt-3" > {{ user.display_name() if user.is_local() else user.display_name() + ', ' + user.ap_id }}
{% if current_user.is_authenticated %}
{% include 'user/_notification_toggle.html' %}
{% endif %}
< / h1 >
2023-10-07 21:32:19 +13:00
< / div >
< / div >
{% else %}
< nav aria-label = "breadcrumb" id = "breadcrumb_nav" title = "Navigation" >
< ol class = "breadcrumb" >
< li class = "breadcrumb-item" > < a href = "/" > {{ _('Home') }}< / a > < / li >
2024-01-03 20:53:06 +13:00
< li class = "breadcrumb-item" > < a href = "/people" > {{ _('People') }}< / a > < / li >
2024-01-09 20:44:08 +13:00
< li class = "breadcrumb-item active" > {{ user.link()|shorten }}< / li >
2023-10-07 21:32:19 +13:00
< / ol >
< / nav >
2024-04-19 20:06:08 +12:00
< h1 class = "mt-2" > {{ user.display_name() if user.is_local() else user.display_name() + ', ' + user.ap_id }}
{% if current_user.is_authenticated %}
{% include 'user/_notification_toggle.html' %}
{% endif %}
< / h1 >
2023-10-07 21:32:19 +13:00
{% endif %}
2024-05-12 14:16:12 +12:00
< div class = "profile_action_buttons" >
2024-02-19 16:26:58 +13:00
{% if current_user.is_authenticated and current_user != user %}
2024-02-19 15:01:53 +13:00
< a class = "btn btn-primary" href = "{{ url_for('chat.new_message', to=user.id) }}" rel = "nofollow" aria-label = "{{ _('Send message') }}" > {{ _('Send message') }}< / a >
{% if user.matrix_user_id %}
< a class = "btn btn-primary" href = "https://matrix.to/#/{{ user.matrix_user_id }}" rel = "nofollow" aria-label = "{{ _('Send message with matrix chat') }}" > {{ _('Send message using Matrix') }}< / a >
2024-02-18 11:46:11 +13:00
{% endif %}
2024-05-12 14:16:12 +12:00
2024-10-25 13:14:56 +13:00
{% if user.is_local() -%}
< a class = "btn btn-primary" href = "{{ url_for('user.fediverse_redirect', actor=user.link()) }}" rel = "nofollow" > < img src = "/static/images/fediverse_logo.svg" width = "22" height = "22" > {{ _('Follow') }}< / a >
{% endif -%}
< div class = "dropdown display-inline" >
< button class = "btn btn-primary dropdown-toggle" type = "button" data-bs-toggle = "dropdown" aria-expanded = "false" >
{{ _('More') }}
< / button >
< ul class = "dropdown-menu" >
{% if current_user.has_blocked_user(user.id) -%}
< a class = "dropdown-item" href = "{{ url_for('user.unblock_profile', actor=user.link()) }}" rel = "nofollow" > {{ _('Unblock') }}< / a >
{% else -%}
< a class = "dropdown-item confirm_first" href = "{{ url_for('user.block_profile', actor=user.link()) }}" rel = "nofollow" > {{ _('Block %(user_name)s', user_name=user.display_name()) }}< / a >
{% endif -%}
{% if not user.is_local() -%}
{% if current_user.has_blocked_instance(user.instance_id) -%}
2024-10-25 13:37:57 +13:00
< a class = "dropdown-item" href = "{{ url_for('instance.instance_unblock', instance_id=user.instance_id, redirect='/u/' + user.link()) }}" rel = "nofollow" > {{ _('Unblock %(instance_name)s', instance_name=user.ap_domain) }}< / a >
2024-10-25 13:14:56 +13:00
{% else %}
< a class = "dropdown-item confirm_first" href = "{{ url_for('user.user_block_instance', actor=user.link()) }}" rel = "nofollow" > {{ _('Block everyone from %(instance_name)s', instance_name=user.ap_domain) }}< / a >
{% endif -%}
{% endif -%}
< li > < a class = "dropdown-item" href = "{{ url_for('user.report_profile', actor=user.link()) }}" rel = "nofollow" > {{ _('Report') }}< / a > < / li >
< / ul >
< / div >
{% endif %}
2024-05-12 14:16:12 +12:00
< / div >
2024-12-03 13:05:55 +01:00
< p class = "small" > {{ _('Instance') }}: < a href = "{{ url_for('instance.instance_overview', instance_domain=user.instance_domain()) }}" > {{ user.instance_domain() }}< / a >
2024-12-03 13:40:59 +01:00
{% if user.is_instance_admin() or (user.is_local() and user.is_admin()) %}< span class = "red" > ({{ _('Admin') }})< / span > {% endif %}< br / >
2024-12-03 13:33:19 +01:00
{% if user.is_admin() or user.is_staff() %}{{ _('Role permissions') }}: {% if user.is_admin() %}{{ _('Admin') }}{% endif %} {% if user.is_staff() %}{{ _('Staff') }}{% endif %}< br / > {% endif %}
2024-10-13 10:53:47 +13:00
{{ _('Joined') }}: {{ arrow.get(user.created).humanize(locale=locale) }}< br / >
2024-08-23 11:14:47 +12:00
{% if current_user.is_authenticated and current_user.is_admin() and user.last_seen %}{{ _('Active') }}: {{ arrow.get(user.last_seen).humanize(locale=locale) }}< br / > {% endif %}
2024-03-20 10:45:26 +00:00
{% if user.bot %}
{{ _('Bot Account') }}< br / >
{% endif %}
2024-09-13 11:21:42 +12:00
{{ _('Attitude') }}: < span title = "{{ _('Ratio of upvotes cast to downvotes cast. Higher is more positive.') }}" > {{ (user.attitude * 100) | round | int }}%< / span > < br / >
2024-12-03 12:48:25 +01:00
{% if current_user.is_authenticated and current_user.is_admin() and user.reputation %}{{ _('Reputation') }}: < span title = "{{ _('Reputation: The Karma of the account. Total up votes minus down votes they got.') }}" > {{ user.reputation | round | int }}< / span > < br / > {% endif %}
2024-09-13 11:21:42 +12:00
{{ _('Posts') }}: {{ user.post_count }}< br / >
{{ _('Comments') }}: {{ user.post_reply_count }}< br / >
< / p >
2024-10-21 15:55:55 +13:00
< div class = "profile_bio" >
{{ user.about_html|safe }}
< / div >
2023-12-15 17:35:11 +13:00
{% if posts %}
2023-10-07 21:32:19 +13:00
< h2 class = "mt-4" > Posts< / h2 >
< div class = "post_list" >
2024-02-06 17:40:03 +13:00
{% for post in posts.items %}
2023-11-30 06:36:08 +13:00
{% include 'post/_post_teaser.html' %}
2023-10-07 21:32:19 +13:00
{% endfor %}
< / div >
2024-01-23 19:17:05 +13:00
< nav aria-label = "{{ _('Post pagination') }}" class = "mt-4" role = "navigation" >
2023-12-15 17:35:11 +13:00
{% if post_prev_url %}
< a href = "{{ post_prev_url }}" class = "btn btn-primary" >
< span aria-hidden = "true" > ← < / span > {{ _('Previous page') }}
< / a >
{% endif %}
{% if post_next_url %}
< a href = "{{ post_next_url }}" class = "btn btn-primary" >
{{ _('Next page') }} < span aria-hidden = "true" > → < / span >
< / a >
{% endif %}
< / nav >
2024-01-05 14:09:46 +13:00
{% else %}
< p > {{ _('No posts yet.') }}< / p >
2023-10-07 21:32:19 +13:00
{% endif %}
2023-12-15 17:35:11 +13:00
{% if post_replies %}
< h2 class = "mt-4" id = "comments" > Comments< / h2 >
2023-10-07 21:32:19 +13:00
< div class = "post_list" >
2024-02-06 17:40:03 +13:00
{% for post_reply in post_replies.items %}
2024-10-20 11:23:20 +13:00
{% with teaser=True %}
2024-07-10 22:55:11 +02:00
{% include 'post/_post_reply_teaser.html' %}
{% endwith %}
< hr / >
2023-10-07 21:32:19 +13:00
{% endfor %}
< / div >
2024-01-23 19:17:05 +13:00
< nav aria-label = "{{ _('Comment pagination') }}" class = "mt-4" role = "navigation" >
2023-12-15 17:35:11 +13:00
{% if replies_prev_url %}
< a href = "{{ replies_prev_url }}#comments" class = "btn btn-primary" >
< span aria-hidden = "true" > ← < / span > {{ _('Previous page') }}
< / a >
{% endif %}
{% if replies_next_url %}
< a href = "{{ replies_next_url }}#comments" class = "btn btn-primary" >
{{ _('Next page') }} < span aria-hidden = "true" > → < / span >
< / a >
{% endif %}
< / nav >
2024-01-05 14:09:46 +13:00
{% else %}
< p > {{ _('No comments yet.') }}< / p >
2023-10-07 21:32:19 +13:00
{% endif %}
< / div >
2024-02-05 08:39:08 +13:00
< aside id = "side_pane" class = "col-12 col-md-4 side_pane" role = "complementary" >
2023-10-21 15:49:01 +13:00
{% if current_user.is_authenticated and current_user.id == user.id %}
2024-03-08 11:20:46 +01:00
< div class = "card mb-3" >
2023-10-07 21:32:19 +13:00
< div class = "card-header" >
< h2 > {{ _('Manage') }}< / h2 >
< / div >
< div class = "card-body" >
< div class = "row" >
< div class = "col-6" >
2024-08-03 21:31:10 +12:00
< a class = "w-100 btn btn-primary" href = "/u/{{ user.link() }}/profile" > {{ _('Profile') }}< / a >
2023-10-07 21:32:19 +13:00
< / div >
< div class = "col-6" >
2024-01-11 20:39:22 +13:00
< a class = "w-100 btn btn-primary" href = "/user/settings" > {{ _('Settings') }}< / a >
2023-10-07 21:32:19 +13:00
< / div >
< / div >
< / div >
< / div >
{% endif %}
2023-11-12 20:54:22 +13:00
{% if len(subscribed) > 0 or len(moderates) > 0 %}
2024-03-08 11:20:46 +01:00
< div class = "card mb-3" >
2023-10-07 21:32:19 +13:00
< div class = "card-header" >
2023-11-12 20:54:22 +13:00
< h2 > {{ _('Communities') }}< / h2 >
2023-10-07 21:32:19 +13:00
< / div >
< div class = "card-body" >
2023-11-12 20:54:22 +13:00
{% if len(subscribed) > 0 %}
2024-01-05 14:09:46 +13:00
< h4 > {{ _('Member of') }}< / h4 >
< ul class = "list-group list-group-flush" >
2023-11-12 20:54:22 +13:00
{% for community in subscribed %}
2024-01-05 14:09:46 +13:00
< li class = "list-group-item" >
2024-07-04 14:26:18 +02:00
{{ render_communityname(community) }}
2023-11-12 20:54:22 +13:00
< / li >
{% endfor %}
< / ul >
{% endif %}
{% if len(moderates) > 0 %}
< h4 > Moderates< / h4 >
2024-01-05 14:09:46 +13:00
< ul class = "list-group list-group-flush" >
2023-11-12 20:54:22 +13:00
{% for community in moderates %}
2024-01-05 14:09:46 +13:00
< li class = "list-group-item" >
2024-07-04 14:26:18 +02:00
{{ render_communityname(community) }}
2023-11-12 20:54:22 +13:00
< / li >
{% endfor %}
< / ul >
{% endif %}
2023-10-07 21:32:19 +13:00
< / div >
< / div >
{% endif %}
2023-10-21 15:49:01 +13:00
{% if current_user.is_authenticated and (user_access('ban users', current_user.id) or user_access('manage users', current_user.id)) and user.id != current_user.id %}
2024-03-08 11:20:46 +01:00
< div class = "card mb-3" >
2023-10-21 15:49:01 +13:00
< div class = "card-header" >
2024-03-26 22:48:45 +01:00
< h2 > {{ _('Moderate user') }}< / h2 >
2023-10-21 15:49:01 +13:00
< / div >
< div class = "card-body" >
< div class = "row" >
{% if user_access('ban users', current_user.id) %}
2023-10-22 18:26:57 +13:00
{% if user.banned %}
< div class = "col-4" >
2024-01-09 20:44:08 +13:00
< a class = "w-100 btn btn-primary confirm_first" href = "/u/{{ user.link() }}/unban" > {{ _('Unban') }}< / a >
2023-10-22 18:26:57 +13:00
< / div >
{% else %}
< div class = "col-4" >
2024-01-09 20:44:08 +13:00
< a class = "w-100 btn btn-primary confirm_first" href = "/u/{{ user.link() }}/ban" > {{ _('Ban') }}< / a >
2023-10-22 18:26:57 +13:00
< / div >
{% endif %}
2023-10-21 15:49:01 +13:00
{% endif %}
{% if user_access('manage users', current_user.id) %}
2023-10-22 18:26:57 +13:00
< div class = "col-4" >
2024-01-09 20:44:08 +13:00
< a class = "w-100 btn btn-primary confirm_first" href = "/u/{{ user.link() }}/delete" > {{ _('Delete') }}< / a >
2023-10-22 18:26:57 +13:00
< / div >
< div class = "col-4" >
2024-01-09 20:44:08 +13:00
< a class = "w-100 btn btn-primary confirm_first" href = "/u/{{ user.link() }}/ban_purge" > {{ _('Ban + Purge') }}< / a >
2023-10-22 18:26:57 +13:00
< / div >
2023-10-21 15:49:01 +13:00
{% endif %}
< / div >
< / div >
< / div >
{% endif %}
2023-11-12 20:54:22 +13:00
{% if upvoted %}
2024-03-08 11:20:46 +01:00
< div class = "card mb-3" >
2023-11-12 20:54:22 +13:00
< div class = "card-header" >
< h2 > {{ _('Upvoted') }}< / h2 >
< / div >
< div class = "card-body" >
< ul >
{% for post in upvoted %}
2023-12-10 15:10:09 +13:00
< li > < a href = "{{ url_for('activitypub.post_ap', post_id=post.id) }}" > {{ post.title }}< / a > < / li >
2023-11-12 20:54:22 +13:00
{% endfor %}
< / ul >
< / div >
< / div >
{% endif %}
2024-01-28 21:38:04 +13:00
< / aside >
2023-10-07 21:32:19 +13:00
< / div >
{% endblock %}