Various JS optimizations

This commit is contained in:
Bernd Bestel
2023-05-21 18:01:47 +02:00
parent 825321593b
commit 979c67b44c
25 changed files with 64 additions and 87 deletions

View File

@@ -257,8 +257,9 @@
<div id="RecipeGalleryCard-{{ $recipe->id }}"
class="card recipe-card">
@if(!empty($recipe->picture_file_name))
<img data-src="{{ $U('/api/files/recipepictures/' . base64_encode($recipe->picture_file_name) . '?force_serve_as=picture&best_fit_width=400') }}"
class="card-img-top lazy">
<img src="{{ $U('/api/files/recipepictures/' . base64_encode($recipe->picture_file_name) . '?force_serve_as=picture&best_fit_width=400') }}"
class="card-img-top"
loading="lazy">
@endif
<div class="card-body text-center">
<h5 class="card-title mb-1">{{ $recipe->name }}</h5>
@@ -323,8 +324,9 @@
id="recipe-{{ $index + 1 }}"
role="tabpanel">
@if(!empty($recipe->picture_file_name))
<img class="card-img-top lazy"
src="{{ $U('/api/files/recipepictures/' . base64_encode($recipe->picture_file_name) . '?force_serve_as=picture') }}">
<img class="card-img-top"
src="{{ $U('/api/files/recipepictures/' . base64_encode($recipe->picture_file_name) . '?force_serve_as=picture') }}"
loading="lazy">
@endif
<div class="card-body">
<div class="shadow p-4 mb-5 bg-white rounded mt-n5 d-print-none @if(empty($recipe->picture_file_name)) d-none @endif">