mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
fix html and make user_preview popups work on posts and together with icons
This commit is contained in:
parent
4bcd218b8a
commit
9f49c02ac6
2 changed files with 13 additions and 13 deletions
|
@ -13,6 +13,16 @@
|
|||
{% endif -%}
|
||||
{{ user.display_name() }}{% if add_domain and not user.is_local() %}<span class="text-muted">@{{ user.ap_domain }}</span>{% endif %}
|
||||
</a>
|
||||
<div class="d-none user_preview" id="preview_{{ user.id }}"
|
||||
{% if htmx_redirect_back_to -%}
|
||||
hx-get="{{ url_for('user.user_preview', user_id=user.id, return_to=htmx_redirect_back_to) }}"
|
||||
{% else %}
|
||||
hx-get="{{ url_for('user.user_preview', user_id=user.id) }}"
|
||||
{% endif %}
|
||||
hx-trigger="intersect once"
|
||||
hx-target="this"
|
||||
hx-swap="innerHTML"
|
||||
></div>
|
||||
{% if user.created_recently() -%}
|
||||
<span class="fe fe-new-account" title="New account"> </span>
|
||||
{% endif -%}
|
||||
|
@ -33,16 +43,6 @@
|
|||
<span class="user_note" title="{{ _('User note: %(note)s', note=user_note) }}">[{{ user_note | truncate(12, True) }}]</span>
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
<div class="d-none user_preview" id="preview_{{ user.id }}"
|
||||
{% if htmx_redirect_back_to -%}
|
||||
hx-get="{{ url_for('user.user_preview', user_id=user.id, return_to=htmx_redirect_back_to) }}"
|
||||
{% else %}
|
||||
hx-get="{{ url_for('user.user_preview', user_id=user.id) }}"
|
||||
{% endif %}
|
||||
hx-trigger="intersect once"
|
||||
hx-target="this"
|
||||
hx-swap="innerHTML"
|
||||
></div>
|
||||
{% endif -%}
|
||||
</span>
|
||||
{% endmacro -%}
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
<p><a href="{{ post.url }}" rel="nofollow ugc" target="_blank" aria-label="Go to image">{{ post.url|shorten_url }}
|
||||
<span class="fe fe-external"></span></a></p>
|
||||
{% endif -%}
|
||||
<p>{% if post.reports > 0 and current_user.is_authenticated and post.community.is_moderator(current_user) -%}
|
||||
<div>{% if post.reports > 0 and current_user.is_authenticated and post.community.is_moderator(current_user) -%}
|
||||
<span class="red fe fe-report" title="{{ _('Reported. Check post for issues.') }}"></span>
|
||||
{% endif -%}<small>submitted <time datetime="{{ arrow.get(post.posted_at).format('YYYY-MM-DD HH:mm:ss ZZ') }}" title="{{ arrow.get(post.posted_at).format('YYYY-MM-DD HH:mm:ss ZZ') }}">{{ arrow.get(post.posted_at).humanize(locale=locale) }}</time> by
|
||||
{{ render_username(post.author, htmx_redirect_back_to=request.url) }}
|
||||
{% if post.edited_at -%} edited <time datetime="{{ arrow.get(post.posted_at).format('YYYY-MM-DD HH:mm:ss ZZ') }}" title="{{ arrow.get(post.posted_at).format('YYYY-MM-DD HH:mm:ss ZZ') }}">{{ arrow.get(post.edited_at).humanize(locale=locale) }}{% endif -%}</time></small>
|
||||
</p>
|
||||
{% if post.edited_at -%} edited <time datetime="{{ arrow.get(post.posted_at).format('YYYY-MM-DD HH:mm:ss ZZ') }}" title="{{ arrow.get(post.posted_at).format('YYYY-MM-DD HH:mm:ss ZZ') }}">{{ arrow.get(post.edited_at).humanize(locale=locale) }}</time>{% endif -%}</small>
|
||||
</div>
|
||||
{% if post.type == POST_TYPE_IMAGE -%}
|
||||
<div class="post_image">
|
||||
{% if post.image_id -%}
|
||||
|
|
Loading…
Reference in a new issue