Merge pull request 'some minor improvements' (#401) from h3ndrik/pyfedi:minor_improvements into main

Reviewed-on: https://codeberg.org/rimu/pyfedi/pulls/401
This commit is contained in:
rimu 2024-12-30 00:13:13 +00:00
commit b7d0c1cb42
9 changed files with 46 additions and 31 deletions

View file

@ -988,9 +988,6 @@ time {
.post_utilities_bar div .dropdown-item:active { .post_utilities_bar div .dropdown-item:active {
line-height: 26px; line-height: 26px;
} }
.post_utilities_bar .notify_toggle {
margin-left: auto; /* pull right */
}
.post_full .post_utilities_bar .voting_buttons_new { .post_full .post_utilities_bar .voting_buttons_new {
margin-left: -15px; margin-left: -15px;
@ -1388,7 +1385,6 @@ time {
line-height: 44px; line-height: 44px;
} }
.comment .comment_actions .notify_toggle { .comment .comment_actions .notify_toggle {
margin-left: auto; /* pull right */
font-size: 87%; font-size: 87%;
} }
.comment .comment_actions .dropdown-item { .comment .comment_actions .dropdown-item {
@ -1841,6 +1837,10 @@ form h5 {
text-align: right; text-align: right;
} }
.pull-right {
margin-left: auto;
}
#timeSpent { #timeSpent {
cursor: wait; cursor: wait;
} }

View file

@ -591,10 +591,6 @@ time {
} }
} }
} }
.notify_toggle {
margin-left: auto; /* pull right */
}
} }
.post_full .post_utilities_bar { .post_full .post_utilities_bar {
@ -1052,7 +1048,6 @@ time {
} }
.notify_toggle { .notify_toggle {
margin-left: auto; /* pull right */
font-size: 87%; font-size: 87%;
} }
@ -1552,6 +1547,10 @@ form {
text-align: right; text-align: right;
} }
.pull-right {
margin-left: auto;
}
#timeSpent { #timeSpent {
cursor: wait; cursor: wait;
} }

View file

@ -10,12 +10,23 @@
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
<form method="get"> <div class="row">
<input type="search" name="search"> <input type="submit" name="submit" value="Search"> <div class="col">
</form> <form method="get">
Result Filter: <input type="search" name="search"> <input type="submit" name="submit" value="Search">
<a href="{{ url_for('admin.admin_communities') }}">All</a> | </form>
<a href="{{ url_for('admin.admin_communities_no_topic') }}">No topic</a> Result Filter:
<a href="{{ url_for('admin.admin_communities') }}">All</a> |
<a href="{{ url_for('admin.admin_communities_no_topic') }}">No topic</a>
</div>
<div class="col-auto">
<div class="btn-group">
<a href="{{ url_for('community.add_local') }}" class="btn btn-outline-secondary" aria-label="{{ _('Create local community') }}">{{ _('Create local community') }}</a>
<a href="{{ url_for('community.add_remote') }}" class="btn btn-outline-secondary" aria-label="{{ _('Add community from another instance') }}">{{ _('Add remote community') }}</a>
</div>
</div>
</div>
<table class="table table-striped"> <table class="table table-striped">
<tr> <tr>
<th>Name</th> <th>Name</th>

View file

@ -175,7 +175,7 @@
<span aria-label="{{ _('Number of cross-posts:') }}">{{ len(post.cross_posts) }}</span></a> <span aria-label="{{ _('Number of cross-posts:') }}">{{ len(post.cross_posts) }}</span></a>
</div> </div>
{% endif -%} {% endif -%}
<div class="notify_toggle"> <div class="notify_toggle pull-right">
{% if current_user.is_authenticated and current_user.verified -%} {% if current_user.is_authenticated and current_user.verified -%}
{% include 'post/_post_notification_toggle.html' -%} {% include 'post/_post_notification_toggle.html' -%}
{% endif -%} {% endif -%}

View file

@ -17,7 +17,7 @@
<div class="row"> <div class="row">
<div class="col-12 hidable"> <div class="col-12 hidable">
{% if post_reply.post.deleted: -%} {% if post_reply.post.deleted: -%}
reply to: [deleted post] reply to: <a href="{{ url_for('activitypub.post_ap', post_id=post_reply.post.id, _anchor='comment_' + str(post_reply.id)) }}">[deleted post]</a>
{% else -%} {% else -%}
reply to: <a href="{{ url_for('activitypub.post_ap', post_id=post_reply.post.id, _anchor='comment_' + str(post_reply.id)) }}">{{ post_reply.post.title | truncate(80, True) }}</a> reply to: <a href="{{ url_for('activitypub.post_ap', post_id=post_reply.post.id, _anchor='comment_' + str(post_reply.id)) }}">{{ post_reply.post.title | truncate(80, True) }}</a>
{% endif -%} {% endif -%}
@ -86,7 +86,7 @@
<a href='#' class=""><span class="fe fe-collapse"></span></a> <a href='#' class=""><span class="fe fe-collapse"></span></a>
{% endif -%} {% endif -%}
</div> </div>
<div class="notify_toggle"> <div class="notify_toggle pull-right">
{% if current_user.is_authenticated and current_user.verified -%} {% if current_user.is_authenticated and current_user.verified -%}
{% with comment=dict(comment=post_reply) -%} {% with comment=dict(comment=post_reply) -%}
{% include "post/_reply_notification_toggle.html" -%} {% include "post/_reply_notification_toggle.html" -%}

View file

@ -10,18 +10,20 @@
<h3>{{ _('Voting Activity for "%(reply_text)s"', reply_text=reply_text) }}</h3> <h3>{{ _('Voting Activity for "%(reply_text)s"', reply_text=reply_text) }}</h3>
<p><details open> <p><details open>
<summary>Upvoters</summary> <summary>Upvoters</summary>
<ul>
{% for upvoter in upvoters -%} {% for upvoter in upvoters -%}
<a href="{{ upvoter.ap_profile_id }}" rel="nofollow" class="no-underline"><span class="fe fe-external"></span> <li>{{ render_username(upvoter) }}</li>
{{ upvoter.ap_profile_id }}</a><br />
{% endfor -%} {% endfor -%}
</ul>
</details> </details>
</p><p><hr></p> </p><p><hr></p>
<details open> <details open>
<summary>Downvoters</summary> <summary>Downvoters</summary>
<ul>
{% for downvoter in downvoters -%} {% for downvoter in downvoters -%}
<a href="{{ downvoter.ap_profile_id }}" rel="nofollow" class="no-underline"><span class="fe fe-external"></span> <li>{{ render_username(downvoter) }}</li>
{{ downvoter.ap_profile_id }}</a><br />
{% endfor -%} {% endfor -%}
</ul>
</details> </details>
</div> </div>
{% endblock -%} {% endblock -%}

View file

@ -19,7 +19,7 @@
<a rel="nofollow" aria-label="{{ _('Cross-post') }}" href="{{ url_for('post.post_cross_post', post_id=post.id) }}"><span class="fe fe-cross-post"></span></a> <a rel="nofollow" aria-label="{{ _('Cross-post') }}" href="{{ url_for('post.post_cross_post', post_id=post.id) }}"><span class="fe fe-cross-post"></span></a>
</div> </div>
{% endif -%} {% endif -%}
<div class="post_options_link"> <div class="post_options_link pull-right">
<div class="dropdown"> <div class="dropdown">
<a href="{{ url_for('post.post_options', post_id=post.id) if low_bandwidth else '#' }}" <a href="{{ url_for('post.post_options', post_id=post.id) if low_bandwidth else '#' }}"
data-bs-toggle="dropdown" data-bs-toggle="dropdown"

View file

@ -10,18 +10,20 @@
<h3>{{ _('Voting Activity for "%(post_title)s"', post_title=post_title) }}</h3> <h3>{{ _('Voting Activity for "%(post_title)s"', post_title=post_title) }}</h3>
<p><details open> <p><details open>
<summary>Upvoters</summary> <summary>Upvoters</summary>
<ul>
{% for upvoter in upvoters -%} {% for upvoter in upvoters -%}
<a href="{{ upvoter.ap_profile_id }}" rel="nofollow" class="no-underline"><span class="fe fe-external"></span> <li>{{ render_username(upvoter) }}</li>
{{ upvoter.ap_profile_id }}</a><br />
{% endfor -%} {% endfor -%}
</ul>
</details> </details>
</p><p><hr></p> </p><p><hr></p>
<details open> <details open>
<summary>Downvoters</summary> <summary>Downvoters</summary>
<ul>
{% for downvoter in downvoters -%} {% for downvoter in downvoters -%}
<a href="{{ downvoter.ap_profile_id }}" rel="nofollow" class="no-underline"><span class="fe fe-external"></span> <li>{{ render_username(downvoter) }}</li>
{{ downvoter.ap_profile_id }}</a><br />
{% endfor -%} {% endfor -%}
</ul>
</details> </details>
</div> </div>
{% endblock -%} {% endblock -%}

View file

@ -87,16 +87,17 @@
{{ _('More') }} {{ _('More') }}
</button> </button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a class="dropdown-item" href="{{ user.ap_profile_id }}" title="{{ _('View user profile on original server') }}" rel="nofollow"><span class="fe fe-external"></span>{{ _('View original profile') }}</a></li>
{% if current_user.has_blocked_user(user.id) -%} {% 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> <li><a class="dropdown-item" href="{{ url_for('user.unblock_profile', actor=user.link()) }}" rel="nofollow">{{ _('Unblock') }}</a></li>
{% else -%} {% 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> <li><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></li>
{% endif -%} {% endif -%}
{% if not user.is_local() -%} {% if not user.is_local() -%}
{% if current_user.has_blocked_instance(user.instance_id) -%} {% if current_user.has_blocked_instance(user.instance_id) -%}
<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> <li><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></li>
{% else %} {% 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> <li><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></li>
{% endif -%} {% endif -%}
{% endif -%} {% endif -%}
<li><a class="dropdown-item" href="{{ url_for('user.report_profile', actor=user.link()) }}" rel="nofollow">{{ _('Report') }}</a></li> <li><a class="dropdown-item" href="{{ url_for('user.report_profile', actor=user.link()) }}" rel="nofollow">{{ _('Report') }}</a></li>