perf: add defer to scripts and lazy loading to images
Some checks failed
CI / ruff (push) Successful in 14s
CI / validate (push) Has been cancelled
CI / dependency-scanning (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / pytest (push) Has been cancelled

Add defer attribute to 145 <script> tags across 103 template files
(PERF-067) and loading="lazy" to 22 <img> tags across 13 template
files (PERF-058). Both improve page load performance.

Validator totals: 0 errors, 2 warnings, 1360 info (down from 1527).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-16 20:55:52 +01:00
parent 3a7cf29386
commit 8ee8c398ce
110 changed files with 193 additions and 193 deletions

View File

@@ -227,5 +227,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('analytics_static', path='store/js/analytics.js') }}"></script>
<script defer src="{{ url_for('analytics_static', path='store/js/analytics.js') }}"></script>
{% endblock %}

View File

@@ -203,5 +203,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('billing_static', path='admin/js/billing-history.js') }}"></script>
<script defer src="{{ url_for('billing_static', path='admin/js/billing-history.js') }}"></script>
{% endblock %}

View File

@@ -474,5 +474,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('billing_static', path='admin/js/subscription-tiers.js') }}"></script>
<script defer src="{{ url_for('billing_static', path='admin/js/subscription-tiers.js') }}"></script>
{% endblock %}

View File

@@ -316,5 +316,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('billing_static', path='admin/js/subscriptions.js') }}"></script>
<script defer src="{{ url_for('billing_static', path='admin/js/subscriptions.js') }}"></script>
{% endblock %}

View File

@@ -6,7 +6,7 @@
{% block extra_head %}
{# Stripe.js for payment #}
<script src="https://js.stripe.com/v3/"></script>
<script defer src="https://js.stripe.com/v3/"></script>
{% endblock %}
{% block content %}

View File

@@ -402,5 +402,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="/static/modules/billing/store/js/billing.js"></script>
<script defer src="/static/modules/billing/store/js/billing.js"></script>
{% endblock %}

View File

@@ -340,7 +340,7 @@
<div class="w-32 h-32 rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-700 border-2 border-dashed border-gray-300 dark:border-gray-600 flex-shrink-0">
<template x-if="form.primary_image_url">
<div class="relative w-full h-full group">
<img :src="form.primary_image_url" class="w-full h-full object-cover" />
<img loading="lazy" :src="form.primary_image_url" class="w-full h-full object-cover" />
<div class="absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center">
<button
type="button"
@@ -389,7 +389,7 @@
<!-- Existing Additional Images -->
<template x-for="(imgUrl, index) in form.additional_images" :key="index">
<div class="relative w-24 h-24 rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 group">
<img :src="imgUrl" class="w-full h-full object-cover" />
<img loading="lazy" :src="imgUrl" class="w-full h-full object-cover" />
<div class="absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center">
<button
type="button"
@@ -507,6 +507,6 @@
document.head.appendChild(script);
})();
</script>
<script src="{{ url_for('cms_static', path='shared/js/media-picker.js') }}"></script>
<script src="{{ url_for('catalog_static', path='admin/js/product-create.js') }}"></script>
<script defer src="{{ url_for('cms_static', path='shared/js/media-picker.js') }}"></script>
<script defer src="{{ url_for('catalog_static', path='admin/js/product-create.js') }}"></script>
{% endblock %}

View File

@@ -95,7 +95,7 @@
<div class="px-4 py-3 bg-white rounded-lg shadow-md dark:bg-gray-800">
<div class="aspect-square bg-gray-100 dark:bg-gray-700 rounded-lg overflow-hidden">
<template x-if="product?.image_url">
<img :src="product?.image_url" :alt="product?.title" class="w-full h-full object-contain" />
<img loading="lazy" :src="product?.image_url" :alt="product?.title" class="w-full h-full object-contain" />
</template>
<template x-if="!product?.image_url">
<div class="w-full h-full flex items-center justify-center">
@@ -109,7 +109,7 @@
<div class="grid grid-cols-4 gap-2">
<template x-for="(img, index) in (product?.additional_images || [])" :key="index">
<div class="aspect-square bg-gray-100 dark:bg-gray-700 rounded overflow-hidden">
<img :src="img" :alt="'Image ' + (index + 1)" class="w-full h-full object-cover" />
<img loading="lazy" :src="img" :alt="'Image ' + (index + 1)" class="w-full h-full object-cover" />
</div>
</template>
</div>
@@ -354,5 +354,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('catalog_static', path='admin/js/product-detail.js') }}"></script>
<script defer src="{{ url_for('catalog_static', path='admin/js/product-detail.js') }}"></script>
{% endblock %}

View File

@@ -317,7 +317,7 @@
<!-- Preview -->
<div class="w-32 h-32 rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 flex-shrink-0">
<template x-if="form.primary_image_url">
<img :src="form.primary_image_url" class="w-full h-full object-cover" />
<img loading="lazy" :src="form.primary_image_url" class="w-full h-full object-cover" />
</template>
<template x-if="!form.primary_image_url">
<div class="w-full h-full flex items-center justify-center">
@@ -369,7 +369,7 @@
<template x-for="(url, index) in form.additional_images" :key="index">
<div class="relative group">
<div class="w-full aspect-square rounded-lg overflow-hidden bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600">
<img :src="url" class="w-full h-full object-cover" />
<img loading="lazy" :src="url" class="w-full h-full object-cover" />
</div>
<button
type="button"
@@ -498,6 +498,6 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('cms_static', path='shared/js/media-picker.js') }}"></script>
<script src="{{ url_for('catalog_static', path='admin/js/product-edit.js') }}"></script>
<script defer src="{{ url_for('cms_static', path='shared/js/media-picker.js') }}"></script>
<script defer src="{{ url_for('catalog_static', path='admin/js/product-edit.js') }}"></script>
{% endblock %}

View File

@@ -396,5 +396,5 @@
document.head.appendChild(script);
})();
</script>
<script src="{{ url_for('catalog_static', path='admin/js/products.js') }}"></script>
<script defer src="{{ url_for('catalog_static', path='admin/js/products.js') }}"></script>
{% endblock %}

View File

@@ -170,5 +170,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('catalog_static', path='store/js/product-create.js') }}"></script>
<script defer src="{{ url_for('catalog_static', path='store/js/product-create.js') }}"></script>
{% endblock %}

View File

@@ -364,5 +364,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('catalog_static', path='store/js/products.js') }}"></script>
<script defer src="{{ url_for('catalog_static', path='store/js/products.js') }}"></script>
{% endblock %}

View File

@@ -62,7 +62,7 @@
<template x-for="product in products" :key="product.id">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-sm hover:shadow-md transition-shadow overflow-hidden">
<a :href="`{{ base_url }}shop/products/${product.id}`">
<img :src="product.marketplace_product?.image_link || '/static/shop/img/placeholder.svg'"
<img loading="lazy" :src="product.marketplace_product?.image_link || '/static/shop/img/placeholder.svg'"
@error="$el.src = '/static/shop/img/placeholder.svg'"
:alt="product.marketplace_product?.title"
class="w-full h-48 object-cover">

View File

@@ -74,7 +74,7 @@
<template x-for="product in products" :key="product.id">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-sm hover:shadow-md transition-shadow overflow-hidden">
<a :href="`{{ base_url }}shop/products/${product.id}`">
<img :src="product.marketplace_product?.image_link || '/static/shop/img/placeholder.svg'"
<img loading="lazy" :src="product.marketplace_product?.image_link || '/static/shop/img/placeholder.svg'"
@error="$el.src = '/static/shop/img/placeholder.svg'"
:alt="product.marketplace_product?.title"
class="w-full h-48 object-cover">

View File

@@ -81,7 +81,7 @@
<template x-for="product in products" :key="product.id">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-sm hover:shadow-md transition-shadow overflow-hidden">
<a :href="`{{ base_url }}shop/products/${product.id}`">
<img :src="product.marketplace_product?.image_link || '/static/shop/img/placeholder.svg'"
<img loading="lazy" :src="product.marketplace_product?.image_link || '/static/shop/img/placeholder.svg'"
@error="$el.src = '/static/shop/img/placeholder.svg'"
:alt="product.marketplace_product?.title"
class="w-full h-48 object-cover">

View File

@@ -65,7 +65,7 @@
</button>
<a :href="`{{ base_url }}shop/products/${item.product.id}`">
<img :src="item.product.marketplace_product?.image_link || '/static/shop/img/placeholder.svg'"
<img loading="lazy" :src="item.product.marketplace_product?.image_link || '/static/shop/img/placeholder.svg'"
@error="$el.src = '/static/shop/img/placeholder.svg'"
:alt="item.product.marketplace_product?.title"
class="w-full h-48 object-cover">

View File

@@ -384,7 +384,7 @@
<div class="divide-y divide-gray-200 dark:divide-gray-700">
<template x-for="item in cartItems" :key="item.product_id">
<div class="py-4 flex items-center gap-4">
<img :src="item.image_url || '/static/shop/img/placeholder.svg'"
<img loading="lazy" :src="item.image_url || '/static/shop/img/placeholder.svg'"
@error="$el.src = '/static/shop/img/placeholder.svg'"
class="w-16 h-16 object-cover rounded-lg">
<div class="flex-1 min-w-0">
@@ -428,7 +428,7 @@
<template x-for="item in cartItems" :key="item.product_id">
<div class="flex items-center gap-3">
<div class="relative">
<img :src="item.image_url || '/static/shop/img/placeholder.svg'"
<img loading="lazy" :src="item.image_url || '/static/shop/img/placeholder.svg'"
@error="$el.src = '/static/shop/img/placeholder.svg'"
class="w-12 h-12 object-cover rounded">
<span class="absolute -top-2 -right-2 w-5 h-5 bg-gray-500 text-white text-xs rounded-full flex items-center justify-center" x-text="item.quantity"></span>

View File

@@ -636,5 +636,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('cms_static', path='admin/js/content-page-edit.js') }}"></script>
<script defer src="{{ url_for('cms_static', path='admin/js/content-page-edit.js') }}"></script>
{% endblock %}

View File

@@ -178,5 +178,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('cms_static', path='admin/js/content-pages.js') }}"></script>
<script defer src="{{ url_for('cms_static', path='admin/js/content-pages.js') }}"></script>
{% endblock %}

View File

@@ -322,5 +322,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('cms_static', path='store/js/content-page-edit.js') }}"></script>
<script defer src="{{ url_for('cms_static', path='store/js/content-page-edit.js') }}"></script>
{% endblock %}

View File

@@ -323,5 +323,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('cms_static', path='store/js/content-pages.js') }}"></script>
<script defer src="{{ url_for('cms_static', path='store/js/content-pages.js') }}"></script>
{% endblock %}

View File

@@ -321,7 +321,7 @@
<!-- Preview -->
<div class="bg-gray-100 dark:bg-gray-700 rounded-lg overflow-hidden">
<template x-if="selectedMedia?.media_type === 'image'">
<img :src="selectedMedia?.file_url" :alt="selectedMedia?.original_filename" class="w-full h-auto">
<img loading="lazy" :src="selectedMedia?.file_url" :alt="selectedMedia?.original_filename" class="w-full h-auto">
</template>
<template x-if="selectedMedia?.media_type !== 'image'">
<div class="aspect-square flex items-center justify-center text-gray-400">
@@ -441,5 +441,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('cms_static', path='store/js/media.js') }}"></script>
<script defer src="{{ url_for('cms_static', path='store/js/media.js') }}"></script>
{% endblock %}

View File

@@ -137,5 +137,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('core_static', path='admin/js/dashboard.js') }}"></script>
{% endblock %}
<script defer src="{{ url_for('core_static', path='admin/js/dashboard.js') }}"></script>
{% endblock %}

View File

@@ -170,5 +170,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('core_static', path='admin/js/my-menu-config.js') }}"></script>
<script defer src="{{ url_for('core_static', path='admin/js/my-menu-config.js') }}"></script>
{% endblock %}

View File

@@ -778,5 +778,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('core_static', path='admin/js/settings.js') }}"></script>
<script defer src="{{ url_for('core_static', path='admin/js/settings.js') }}"></script>
{% endblock %}

View File

@@ -177,5 +177,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('core_static', path='store/js/dashboard.js') }}"></script>
{% endblock %}
<script defer src="{{ url_for('core_static', path='store/js/dashboard.js') }}"></script>
{% endblock %}

View File

@@ -1402,5 +1402,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('core_static', path='store/js/settings.js') }}"></script>
<script defer src="{{ url_for('core_static', path='store/js/settings.js') }}"></script>
{% endblock %}

View File

@@ -315,5 +315,5 @@
document.head.appendChild(script);
})();
</script>
<script src="{{ url_for('customers_static', path='admin/js/customers.js') }}"></script>
<script defer src="{{ url_for('customers_static', path='admin/js/customers.js') }}"></script>
{% endblock %}

View File

@@ -264,5 +264,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('customers_static', path='store/js/customers.js') }}"></script>
<script defer src="{{ url_for('customers_static', path='store/js/customers.js') }}"></script>
{% endblock %}

View File

@@ -9,7 +9,7 @@
{% block alpine_data %}codeQualityDashboard(){% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('dev_tools_static', path='admin/js/code-quality-dashboard.js') }}"></script>
<script defer src="{{ url_for('dev_tools_static', path='admin/js/code-quality-dashboard.js') }}"></script>
{% endblock %}
{% block content %}

View File

@@ -10,7 +10,7 @@
{% block alpine_data %}codeQualityViolations(){% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('dev_tools_static', path='admin/js/code-quality-violations.js') }}"></script>
<script defer src="{{ url_for('dev_tools_static', path='admin/js/code-quality-violations.js') }}"></script>
{% endblock %}
{% block content %}

View File

@@ -364,7 +364,7 @@ html {
? 'border-purple-500 dark:border-purple-400 ring-2 ring-purple-500/30'
: 'border-gray-200 dark:border-gray-600 hover:border-gray-300 dark:hover:border-gray-500'"
>
<img :src="image.url" :alt="image.alt" class="w-full h-full object-cover" />
<img loading="lazy" :src="image.url" :alt="image.alt" class="w-full h-full object-cover" />
</button>
</template>
</div>
@@ -3173,5 +3173,5 @@ new Chart(document.getElementById('barChart'), barConfig);
{% block extra_scripts %}
{# ✅ CRITICAL: Load JavaScript file #}
<script src="{{ url_for('dev_tools_static', path='admin/js/components.js') }}"></script>
<script defer src="{{ url_for('dev_tools_static', path='admin/js/components.js') }}"></script>
{% endblock %}

View File

@@ -318,5 +318,5 @@
{% block extra_scripts %}
{# ✅ CRITICAL: Load JavaScript file #}
<script src="{{ url_for('dev_tools_static', path='admin/js/icons-page.js') }}"></script>
{% endblock %}
<script defer src="{{ url_for('dev_tools_static', path='admin/js/icons-page.js') }}"></script>
{% endblock %}

View File

@@ -8,7 +8,7 @@
{% block alpine_data %}testingDashboard(){% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('dev_tools_static', path='admin/js/testing-dashboard.js') }}"></script>
<script defer src="{{ url_for('dev_tools_static', path='admin/js/testing-dashboard.js') }}"></script>
{% endblock %}
{% block content %}

View File

@@ -218,5 +218,5 @@
{% block extra_scripts %}
{# ✅ CRITICAL: Load JavaScript file #}
<script src="{{ url_for('dev_tools_static', path='admin/js/testing-hub.js') }}"></script>
{% endblock %}
<script defer src="{{ url_for('dev_tools_static', path='admin/js/testing-hub.js') }}"></script>
{% endblock %}

View File

@@ -599,5 +599,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('inventory_static', path='admin/js/inventory.js') }}"></script>
<script defer src="{{ url_for('inventory_static', path='admin/js/inventory.js') }}"></script>
{% endblock %}

View File

@@ -370,5 +370,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('inventory_static', path='store/js/inventory.js') }}"></script>
<script defer src="{{ url_for('inventory_static', path='store/js/inventory.js') }}"></script>
{% endblock %}

View File

@@ -158,5 +158,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('loyalty_static', path='admin/js/loyalty-analytics.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='admin/js/loyalty-analytics.js') }}"></script>
{% endblock %}

View File

@@ -234,5 +234,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('loyalty_static', path='admin/js/loyalty-merchant-detail.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='admin/js/loyalty-merchant-detail.js') }}"></script>
{% endblock %}

View File

@@ -176,5 +176,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('loyalty_static', path='admin/js/loyalty-merchant-settings.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='admin/js/loyalty-merchant-settings.js') }}"></script>
{% endblock %}

View File

@@ -237,5 +237,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('loyalty_static', path='admin/js/loyalty-programs.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='admin/js/loyalty-programs.js') }}"></script>
{% endblock %}

View File

@@ -154,5 +154,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('loyalty_static', path='store/js/loyalty-card-detail.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='store/js/loyalty-card-detail.js') }}"></script>
{% endblock %}

View File

@@ -146,5 +146,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('loyalty_static', path='store/js/loyalty-cards.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='store/js/loyalty-cards.js') }}"></script>
{% endblock %}

View File

@@ -142,5 +142,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('loyalty_static', path='store/js/loyalty-enroll.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='store/js/loyalty-enroll.js') }}"></script>
{% endblock %}

View File

@@ -154,5 +154,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('loyalty_static', path='store/js/loyalty-settings.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='store/js/loyalty-settings.js') }}"></script>
{% endblock %}

View File

@@ -130,5 +130,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('loyalty_static', path='store/js/loyalty-stats.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='store/js/loyalty-stats.js') }}"></script>
{% endblock %}

View File

@@ -305,5 +305,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('loyalty_static', path='store/js/loyalty-terminal.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='store/js/loyalty-terminal.js') }}"></script>
{% endblock %}

View File

@@ -222,5 +222,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('loyalty_static', path='storefront/js/loyalty-dashboard.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='storefront/js/loyalty-dashboard.js') }}"></script>
{% endblock %}

View File

@@ -131,5 +131,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('loyalty_static', path='storefront/js/loyalty-enroll.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='storefront/js/loyalty-enroll.js') }}"></script>
{% endblock %}

View File

@@ -103,5 +103,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('loyalty_static', path='storefront/js/loyalty-history.js') }}"></script>
<script defer src="{{ url_for('loyalty_static', path='storefront/js/loyalty-history.js') }}"></script>
{% endblock %}

View File

@@ -8,7 +8,7 @@
{% block alpine_data %}backgroundTasks(){% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('marketplace_static', path='admin/js/background-tasks.js') }}"></script>
<script defer src="{{ url_for('marketplace_static', path='admin/js/background-tasks.js') }}"></script>
{% endblock %}
{% block content %}

View File

@@ -11,7 +11,7 @@
{% block alpine_data %}adminImports(){% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('marketplace_static', path='admin/js/imports.js') }}"></script>
<script defer src="{{ url_for('marketplace_static', path='admin/js/imports.js') }}"></script>
{% endblock %}
{% block content %}

View File

@@ -426,5 +426,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('marketplace_static', path='admin/js/letzshop-store-directory.js') }}"></script>
<script defer src="{{ url_for('marketplace_static', path='admin/js/letzshop-store-directory.js') }}"></script>
{% endblock %}

View File

@@ -11,7 +11,7 @@
{% block alpine_data %}adminLetzshop(){% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('marketplace_static', path='admin/js/letzshop.js') }}"></script>
<script defer src="{{ url_for('marketplace_static', path='admin/js/letzshop.js') }}"></script>
{% endblock %}
{% block content %}

View File

@@ -599,5 +599,5 @@
document.head.appendChild(script);
})();
</script>
<script src="{{ url_for('marketplace_static', path='admin/js/marketplace-letzshop.js') }}"></script>
<script defer src="{{ url_for('marketplace_static', path='admin/js/marketplace-letzshop.js') }}"></script>
{% endblock %}

View File

@@ -50,7 +50,7 @@
<div class="px-4 py-3 bg-white rounded-lg shadow-md dark:bg-gray-800">
<div class="aspect-square bg-gray-100 dark:bg-gray-700 rounded-lg overflow-hidden">
<template x-if="product?.image_link">
<img :src="product?.image_link" :alt="product?.title" class="w-full h-full object-contain" />
<img loading="lazy" :src="product?.image_link" :alt="product?.title" class="w-full h-full object-contain" />
</template>
<template x-if="!product?.image_link">
<div class="w-full h-full flex items-center justify-center">
@@ -64,7 +64,7 @@
<div class="grid grid-cols-4 gap-2">
<template x-for="(img, index) in (product?.additional_images || [])" :key="index">
<div class="aspect-square bg-gray-100 dark:bg-gray-700 rounded overflow-hidden">
<img :src="img" :alt="'Image ' + (index + 1)" class="w-full h-full object-cover" />
<img loading="lazy" :src="img" :alt="'Image ' + (index + 1)" class="w-full h-full object-cover" />
</div>
</template>
</div>
@@ -388,5 +388,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('marketplace_static', path='admin/js/marketplace-product-detail.js') }}"></script>
<script defer src="{{ url_for('marketplace_static', path='admin/js/marketplace-product-detail.js') }}"></script>
{% endblock %}

View File

@@ -472,5 +472,5 @@
document.head.appendChild(script);
})();
</script>
<script src="{{ url_for('marketplace_static', path='admin/js/marketplace-products.js') }}"></script>
<script defer src="{{ url_for('marketplace_static', path='admin/js/marketplace-products.js') }}"></script>
{% endblock %}

View File

@@ -347,5 +347,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('marketplace_static', path='admin/js/marketplace.js') }}?v=2"></script>
<script defer src="{{ url_for('marketplace_static', path='admin/js/marketplace.js') }}?v=2"></script>
{% endblock %}

View File

@@ -9,7 +9,7 @@
{% block alpine_data %}storeLetzshop(){% endblock %}
{% block extra_scripts %}
<script src="/static/modules/marketplace/store/js/letzshop.js"></script>
<script defer src="/static/modules/marketplace/store/js/letzshop.js"></script>
{% endblock %}
{% block content %}

View File

@@ -11,7 +11,7 @@
{% block alpine_data %}storeMarketplace(){% endblock %}
{% block extra_scripts %}
<script src="/static/modules/marketplace/store/js/marketplace.js"></script>
<script defer src="/static/modules/marketplace/store/js/marketplace.js"></script>
{% endblock %}
{% block content %}

View File

@@ -373,11 +373,11 @@
</div>
<!-- Scripts -->
<script src="{{ url_for('static', path='shared/js/log-config.js') }}"></script>
<script src="{{ url_for('static', path='shared/js/icons.js') }}"></script>
<script src="{{ url_for('static', path='shared/js/utils.js') }}"></script>
<script src="{{ url_for('static', path='shared/js/api-client.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/log-config.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/icons.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/utils.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/api-client.js') }}"></script>
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.0/dist/cdn.min.js"></script>
<script src="{{ url_for('marketplace_static', path='store/js/onboarding.js') }}"></script>
<script defer src="{{ url_for('marketplace_static', path='store/js/onboarding.js') }}"></script>
</body>
</html>

View File

@@ -364,5 +364,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('messaging_static', path='admin/js/email-templates.js') }}"></script>
<script defer src="{{ url_for('messaging_static', path='admin/js/email-templates.js') }}"></script>
{% endblock %}

View File

@@ -332,5 +332,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('messaging_static', path='admin/js/messages.js') }}"></script>
<script defer src="{{ url_for('messaging_static', path='admin/js/messages.js') }}"></script>
{% endblock %}

View File

@@ -357,5 +357,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('messaging_static', path='admin/js/notifications.js') }}"></script>
<script defer src="{{ url_for('messaging_static', path='admin/js/notifications.js') }}"></script>
{% endblock %}

View File

@@ -326,5 +326,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('messaging_static', path='store/js/email-templates.js') }}"></script>
<script defer src="{{ url_for('messaging_static', path='store/js/email-templates.js') }}"></script>
{% endblock %}

View File

@@ -275,5 +275,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('messaging_static', path='store/js/messages.js') }}"></script>
<script defer src="{{ url_for('messaging_static', path='store/js/messages.js') }}"></script>
{% endblock %}

View File

@@ -226,5 +226,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('messaging_static', path='store/js/notifications.js') }}"></script>
<script defer src="{{ url_for('messaging_static', path='store/js/notifications.js') }}"></script>
{% endblock %}

View File

@@ -407,5 +407,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('monitoring_static', path='admin/js/logs.js') }}"></script>
<script defer src="{{ url_for('monitoring_static', path='admin/js/logs.js') }}"></script>
{% endblock %}

View File

@@ -263,5 +263,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('monitoring_static', path='admin/js/platform-health.js') }}"></script>
<script defer src="{{ url_for('monitoring_static', path='admin/js/platform-health.js') }}"></script>
{% endblock %}

View File

@@ -641,5 +641,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('orders_static', path='admin/js/orders.js') }}"></script>
<script defer src="{{ url_for('orders_static', path='admin/js/orders.js') }}"></script>
{% endblock %}

View File

@@ -10,7 +10,7 @@
{% block alpine_data %}storeInvoices(){% endblock %}
{% block extra_scripts %}
<script src="/static/modules/billing/store/js/invoices.js"></script>
<script defer src="/static/modules/billing/store/js/invoices.js"></script>
{% endblock %}
{% block content %}

View File

@@ -451,5 +451,5 @@
orderId: {{ order_id }}
};
</script>
<script src="{{ url_for('orders_static', path='store/js/order-detail.js') }}"></script>
<script defer src="{{ url_for('orders_static', path='store/js/order-detail.js') }}"></script>
{% endblock %}

View File

@@ -330,5 +330,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('orders_static', path='store/js/orders.js') }}"></script>
<script defer src="{{ url_for('orders_static', path='store/js/orders.js') }}"></script>
{% endblock %}

View File

@@ -234,5 +234,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/admin-user-detail.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/admin-user-detail.js') }}"></script>
{% endblock %}

View File

@@ -268,5 +268,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/admin-user-edit.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/admin-user-edit.js') }}"></script>
{% endblock %}

View File

@@ -258,5 +258,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/admin-users.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/admin-users.js') }}"></script>
{% endblock %}

View File

@@ -106,16 +106,16 @@
<!-- Scripts - ORDER MATTERS! -->
<!-- 1. Log Configuration -->
<script src="{{ url_for('static', path='shared/js/log-config.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/log-config.js') }}"></script>
<!-- 2. Icons -->
<script src="{{ url_for('static', path='shared/js/icons.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/icons.js') }}"></script>
<!-- 3. Utils -->
<script src="{{ url_for('static', path='shared/js/utils.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/utils.js') }}"></script>
<!-- 4. API Client -->
<script src="{{ url_for('static', path='shared/js/api-client.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/api-client.js') }}"></script>
<!-- 5. Alpine.js v3 with CDN fallback -->
<script>
@@ -135,6 +135,6 @@
</script>
<!-- 6. Login Logic -->
<script src="{{ url_for('core_static', path='admin/js/login.js') }}"></script>
<script defer src="{{ url_for('core_static', path='admin/js/login.js') }}"></script>
</body>
</html>
</html>

View File

@@ -452,5 +452,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/merchant-detail.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/merchant-detail.js') }}"></script>
{% endblock %}

View File

@@ -445,5 +445,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/merchant-edit.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/merchant-edit.js') }}"></script>
{% endblock %}

View File

@@ -247,5 +247,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/merchant-user-detail.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/merchant-user-detail.js') }}"></script>
{% endblock %}

View File

@@ -226,5 +226,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/merchant-users.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/merchant-users.js') }}"></script>
{% endblock %}

View File

@@ -245,5 +245,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/merchants.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/merchants.js') }}"></script>
{% endblock %}

View File

@@ -144,5 +144,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('static', path='admin/js/module-config.js') }}"></script>
<script defer src="{{ url_for('static', path='admin/js/module-config.js') }}"></script>
{% endblock %}

View File

@@ -270,5 +270,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('static', path='admin/js/module-info.js') }}"></script>
<script defer src="{{ url_for('static', path='admin/js/module-info.js') }}"></script>
{% endblock %}

View File

@@ -297,5 +297,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/platform-detail.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/platform-detail.js') }}"></script>
{% endblock %}

View File

@@ -320,5 +320,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/platform-edit.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/platform-edit.js') }}"></script>
{% endblock %}

View File

@@ -196,5 +196,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/platform-menu-config.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/platform-menu-config.js') }}"></script>
{% endblock %}

View File

@@ -278,5 +278,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/platform-modules.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/platform-modules.js') }}"></script>
{% endblock %}

View File

@@ -158,5 +158,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/platforms.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/platforms.js') }}"></script>
{% endblock %}

View File

@@ -111,11 +111,11 @@
</div>
<!-- Scripts -->
<script src="{{ url_for('static', path='shared/js/log-config.js') }}"></script>
<script src="{{ url_for('static', path='shared/js/utils.js') }}"></script>
<script src="{{ url_for('static', path='shared/js/api-client.js') }}"></script>
<script src="{{ url_for('static', path='shared/js/icons.js') }}"></script>
<script src="{{ url_for('tenancy_static', path='admin/js/select-platform.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/log-config.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/utils.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/api-client.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/icons.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/select-platform.js') }}"></script>
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.13.3/dist/cdn.min.js"></script>
</body>
</html>

View File

@@ -279,5 +279,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/store-create.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/store-create.js') }}"></script>
{% endblock %}

View File

@@ -45,7 +45,7 @@
<div class="grid gap-6 mb-8 md:grid-cols-4">
<!-- Verification Status -->
<div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800">
<div class="p-3 mr-4 rounded-full"
<div class="p-3 mr-4 rounded-full"
:class="store?.is_verified ? 'text-green-500 bg-green-100 dark:text-green-100 dark:bg-green-500' : 'text-orange-500 bg-orange-100 dark:text-orange-100 dark:bg-orange-500'">
<span x-html="$icon(store?.is_verified ? 'badge-check' : 'clock', 'w-5 h-5')"></span>
</div>
@@ -268,11 +268,11 @@
</div>
<div>
<p class="text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase">Website</p>
<a
<a
x-show="store?.website"
:href="store?.website"
:href="store?.website"
target="_blank"
class="text-sm text-purple-600 hover:text-purple-700 dark:text-purple-400"
class="text-sm text-purple-600 hover:text-purple-700 dark:text-purple-400"
x-text="store?.website">
</a>
<span x-show="!store?.website" class="text-sm text-gray-700 dark:text-gray-300">-</span>
@@ -327,28 +327,28 @@
<div class="space-y-3">
<div x-show="store?.letzshop_csv_url_fr">
<p class="text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase mb-1">French (FR)</p>
<a
:href="store?.letzshop_csv_url_fr"
<a
:href="store?.letzshop_csv_url_fr"
target="_blank"
class="text-sm text-purple-600 hover:text-purple-700 dark:text-purple-400 break-all"
class="text-sm text-purple-600 hover:text-purple-700 dark:text-purple-400 break-all"
x-text="store?.letzshop_csv_url_fr">
</a>
</div>
<div x-show="store?.letzshop_csv_url_en">
<p class="text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase mb-1">English (EN)</p>
<a
:href="store?.letzshop_csv_url_en"
<a
:href="store?.letzshop_csv_url_en"
target="_blank"
class="text-sm text-purple-600 hover:text-purple-700 dark:text-purple-400 break-all"
class="text-sm text-purple-600 hover:text-purple-700 dark:text-purple-400 break-all"
x-text="store?.letzshop_csv_url_en">
</a>
</div>
<div x-show="store?.letzshop_csv_url_de">
<p class="text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase mb-1">German (DE)</p>
<a
:href="store?.letzshop_csv_url_de"
<a
:href="store?.letzshop_csv_url_de"
target="_blank"
class="text-sm text-purple-600 hover:text-purple-700 dark:text-purple-400 break-all"
class="text-sm text-purple-600 hover:text-purple-700 dark:text-purple-400 break-all"
x-text="store?.letzshop_csv_url_de">
</a>
</div>
@@ -389,5 +389,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/store-detail.js') }}"></script>
{% endblock %}
<script defer src="{{ url_for('tenancy_static', path='admin/js/store-detail.js') }}"></script>
{% endblock %}

View File

@@ -428,5 +428,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/store-edit.js') }}"></script>
{% endblock %}
<script defer src="{{ url_for('tenancy_static', path='admin/js/store-edit.js') }}"></script>
{% endblock %}

View File

@@ -446,5 +446,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/store-theme.js') }}"></script>
{% endblock %}
<script defer src="{{ url_for('tenancy_static', path='admin/js/store-theme.js') }}"></script>
{% endblock %}

View File

@@ -124,6 +124,6 @@
{% endblock %}
{% block extra_scripts %}
<script src="https://cdn.jsdelivr.net/npm/tom-select@2.3.1/dist/js/tom-select.complete.min.js"></script>
<script src="{{ url_for('tenancy_static', path='admin/js/store-themes.js') }}"></script>
<script defer src="https://cdn.jsdelivr.net/npm/tom-select@2.3.1/dist/js/tom-select.complete.min.js"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/store-themes.js') }}"></script>
{% endblock %}

View File

@@ -228,5 +228,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/stores.js') }}"></script>
{% endblock %}
<script defer src="{{ url_for('tenancy_static', path='admin/js/stores.js') }}"></script>
{% endblock %}

View File

@@ -189,5 +189,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='admin/js/user-create.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='admin/js/user-create.js') }}"></script>
{% endblock %}

View File

@@ -107,16 +107,16 @@
<!-- Scripts - ORDER MATTERS! -->
<!-- 1. Log Configuration -->
<script src="{{ url_for('static', path='shared/js/log-config.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/log-config.js') }}"></script>
<!-- 2. Icons -->
<script src="{{ url_for('static', path='shared/js/icons.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/icons.js') }}"></script>
<!-- 3. Utils -->
<script src="{{ url_for('static', path='shared/js/utils.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/utils.js') }}"></script>
<!-- 4. API Client -->
<script src="{{ url_for('static', path='shared/js/api-client.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/api-client.js') }}"></script>
<!-- 5. Alpine.js v3 with CDN fallback -->
<script>
@@ -136,6 +136,6 @@
</script>
<!-- 6. Merchant Login Logic -->
<script src="{{ url_for('core_static', path='merchant/js/login.js') }}"></script>
<script defer src="{{ url_for('core_static', path='merchant/js/login.js') }}"></script>
</body>
</html>

View File

@@ -140,21 +140,21 @@
<!-- Scripts - ORDER MATTERS! -->
<!-- 1. Log Configuration -->
<script src="{{ url_for('static', path='shared/js/log-config.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/log-config.js') }}"></script>
<!-- 2. Icons -->
<script src="{{ url_for('static', path='shared/js/icons.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/icons.js') }}"></script>
<!-- 3. Utils -->
<script src="{{ url_for('static', path='shared/js/utils.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/utils.js') }}"></script>
<!-- 4. API Client -->
<script src="{{ url_for('static', path='shared/js/api-client.js') }}"></script>
<script defer src="{{ url_for('static', path='shared/js/api-client.js') }}"></script>
<!-- 5. Alpine.js v3 -->
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.0/dist/cdn.min.js"></script>
<!-- 6. Login Logic -->
<script src="{{ url_for('tenancy_static', path='store/js/login.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='store/js/login.js') }}"></script>
</body>
</html>
</html>

View File

@@ -202,5 +202,5 @@
{% endblock %}
{% block extra_scripts %}
<script src="{{ url_for('tenancy_static', path='store/js/profile.js') }}"></script>
<script defer src="{{ url_for('tenancy_static', path='store/js/profile.js') }}"></script>
{% endblock %}

Some files were not shown because too many files have changed in this diff Show More