aboutsummaryrefslogtreecommitdiffstats
path: root/client/templates
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-12-10 15:23:38 +0100
committerAndrea Lepori <alepori@student.ethz.ch>2020-12-10 15:23:38 +0100
commit22cbc05be615e10d7c766dee8b865182f919677d (patch)
tree4e8d32df20c7c78a74e366dfadb584762ee49d0b /client/templates
parentall admin page use lazyload for images (diff)
downloadscout-subs-22cbc05be615e10d7c766dee8b865182f919677d.tar.gz
scout-subs-22cbc05be615e10d7c766dee8b865182f919677d.zip
lazyload of images in non admin page
Diffstat (limited to '')
-rw-r--r--client/templates/client/index.html22
1 files changed, 19 insertions, 3 deletions
diff --git a/client/templates/client/index.html b/client/templates/client/index.html
index b5d1135..932af1c 100644
--- a/client/templates/client/index.html
+++ b/client/templates/client/index.html
@@ -310,14 +310,19 @@
{% if doc.0.document_type.medical_data %}
<li>
<div class="collapsible-header">
- <i class="material-icons">attach_file</i>Allegati
+ {% if doc.0.medical_data %}
+ <i class="material-icons">attach_file</i>Allegati
+ {% else %}
+ <i class="material-icons">attach_file</i><del>Allegati</del>
+ {% endif %}
</div>
+ {% if doc.0.medical_data %}
<div class="collapsible-body"><span>
<div class="row">
<div class="col s12">
<div class="card">
<div class="card-image">
- {% if doc.5 %} <img src="data:;base64,{{ doc.5 }}"> {% endif %}
+ {% if doc.5 %} <img class="lazyload" data-src="{{ doc.5 }}"> {% endif %}
</div>
</div>
</div>
@@ -326,12 +331,22 @@
<div class="col s12">
<div class="card">
<div class="card-image">
- {% if doc.6 %}<img src="data:;base64,{{ doc.6 }}">{% endif %}
+ {% if doc.6 %}<img class="lazyload" data-src="{{ doc.6 }}">{% endif %}
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col s12">
+ <div class="card">
+ <div class="card-image">
+ {% if doc.7 %}<img class="lazyload" data-src="{{ doc.7 }}">{% endif %}
</div>
</div>
</div>
</div>
</span></div>
+ {% endif %}
</li>
{% endif %}
</ul>
@@ -389,6 +404,7 @@ $(document).ready(function(){
{% endif %}
{% endif %}
{% endif %}
+ lazyload();
});
{% if user.is_authenticated %}
{% if user.is_staff or perms.client.approved %}