Implement lazy loading (#188)
This commit is contained in:
parent
17d75c4797
commit
f02f1541ad
@ -2,7 +2,7 @@
|
||||
<div class="post user">
|
||||
|
||||
<a href="{{ identity.urls.view }}">
|
||||
<img src="{{ identity.local_icon_url.relative }}" class="icon" alt="Avatar for {{ identity.name_or_handle }}">
|
||||
<img src="{{ identity.local_icon_url.relative }}" class="icon" alt="Avatar for {{ identity.name_or_handle }}" loading="lazy">
|
||||
</a>
|
||||
|
||||
{% if created %}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="post {% if reply %}reply{% endif %}" data-takahe-id="{{ post.id }}" role="article" tabindex="0">
|
||||
|
||||
<a href="{{ post.author.urls.view }}" tabindex="-1">
|
||||
<img src="{{ post.author.local_icon_url.relative }}" class="icon">
|
||||
<img src="{{ post.author.local_icon_url.relative }}" class="icon" loading="lazy">
|
||||
</a>
|
||||
|
||||
<time _="on click go url {% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %} then halt">
|
||||
@ -79,7 +79,7 @@
|
||||
{% for attachment in post.attachments.all %}
|
||||
{% if attachment.is_image %}
|
||||
<a href="{{ attachment.full_url.relative }}" class="image">
|
||||
<img src="{{ attachment.thumbnail_url.relative }}" title="{{ attachment.name }}" alt="{{ attachment.name }}" />
|
||||
<img src="{{ attachment.thumbnail_url.relative }}" title="{{ attachment.name }}" alt="{{ attachment.name }}" loading="lazy" />
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
@ -17,7 +17,7 @@
|
||||
<section class="icon-menu">
|
||||
{% for identity in page_obj %}
|
||||
<a class="option" href="{{ identity.urls.view }}">
|
||||
<img src="{{ identity.local_icon_url.relative }}">
|
||||
<img src="{{ identity.local_icon_url.relative }}" loading="lazy">
|
||||
<span class="handle">
|
||||
{{ identity.html_name_or_handle }}
|
||||
<small>@{{ identity.handle }}</small>
|
||||
|
@ -20,7 +20,7 @@
|
||||
<section class="icon-menu">
|
||||
{% for identity in page_obj %}
|
||||
<a class="option" href="{{ identity.urls.admin_edit }}">
|
||||
<img src="{{ identity.local_icon_url.relative }}" class="icon" alt="Avatar for {{ identity.name_or_handle }}">
|
||||
<img src="{{ identity.local_icon_url.relative }}" class="icon" alt="Avatar for {{ identity.name_or_handle }}" loading="lazy">
|
||||
<span class="handle">
|
||||
{{ identity.html_name_or_handle }}
|
||||
<small>
|
||||
|
Reference in New Issue
Block a user