Fixed: lazyload slider
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
b6819225ed
commit
3b8cffec2a
|
@ -4,7 +4,12 @@
|
|||
{% for post in __SELF__.posts %}
|
||||
<div class="px-3">
|
||||
<a href="{{post.href}}" class="flex flex-col h-full box shadow-lg hover:shadow-2xl rounded-lg overflow-hidden" target="_BLANK">
|
||||
{% if post.featuredImage %} <img {{ post.featuredImage | resize('box', 'calc(100vw - 1.5rem)|640:calc(50vw - 1.5rem)|1024:calc(33vw - 1.5rem)|1152:360px', {'lazy': true}) }} class="object-cover w-full h-48"> {% endif %}
|
||||
{% if post.featuredImage %}
|
||||
<script type="text/html" data-lazy data-src="img">
|
||||
<img {{ post.featuredImage | resize('box', 'calc(100vw - 1.5rem)|640:calc(50vw - 1.5rem)|1024:calc(33vw - 1.5rem)|1152:360px') }} class="object-cover w-full h-48">
|
||||
</script>
|
||||
<div data-dest="img"></div>
|
||||
{% endif %}
|
||||
<div class="flex items-end justify-between px-6 py-3 bg-gray-100">
|
||||
{% if __SELF__.logo %} <img data-src="{{__SELF__.logo|media}}" class="w-8"> {% endif %}
|
||||
<div class="text-xs text-gray-500">{{post.created_at | human}}</div>
|
||||
|
|
Loading…
Reference in New Issue