Implement lazy loading (#188)

pull/193/head
Kromonos 2022-12-18 01:01:07 +01:00 zatwierdzone przez GitHub
rodzic 17d75c4797
commit f02f1541ad
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -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 %}

Wyświetl plik

@ -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 %}

Wyświetl plik

@ -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>

Wyświetl plik

@ -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>