mirror of
https://github.com/penpot/penpot.git
synced 2025-07-19 17:38:02 +02:00
⚡ Lazy load dashboard grid images
This commit is contained in:
parent
a397f25cb2
commit
1a831eddc5
1 changed files with 7 additions and 3 deletions
|
@ -90,7 +90,9 @@
|
||||||
(when visible?
|
(when visible?
|
||||||
(if thumbnail-uri
|
(if thumbnail-uri
|
||||||
[:img {:class (stl/css :grid-item-thumbnail-image)
|
[:img {:class (stl/css :grid-item-thumbnail-image)
|
||||||
:src thumbnail-uri}]
|
:src thumbnail-uri
|
||||||
|
:loading "lazy"
|
||||||
|
:decoding "async"}]
|
||||||
i/loader-pencil))]
|
i/loader-pencil))]
|
||||||
|
|
||||||
;; OLD
|
;; OLD
|
||||||
|
@ -99,7 +101,9 @@
|
||||||
:ref container}
|
:ref container}
|
||||||
(when visible?
|
(when visible?
|
||||||
(if thumbnail-uri
|
(if thumbnail-uri
|
||||||
[:img.grid-item-thumbnail-image {:src thumbnail-uri}]
|
[:img.grid-item-thumbnail-image {:src thumbnail-uri
|
||||||
|
:loading "lazy"
|
||||||
|
:decoding "async"}]
|
||||||
i/loader-pencil))])))
|
i/loader-pencil))])))
|
||||||
|
|
||||||
;; --- Grid Item Library
|
;; --- Grid Item Library
|
||||||
|
@ -474,7 +478,7 @@
|
||||||
|
|
||||||
(when (and (:is-shared file) (not library-view?))
|
(when (and (:is-shared file) (not library-view?))
|
||||||
[:div {:class (stl/css :item-badge)} i/library])
|
[:div {:class (stl/css :item-badge)} i/library])
|
||||||
|
|
||||||
[:div {:class (stl/css :info-wrapper)}
|
[:div {:class (stl/css :info-wrapper)}
|
||||||
[:div {:class (stl/css :item-info)}
|
[:div {:class (stl/css :item-info)}
|
||||||
(if (:edition @local)
|
(if (:edition @local)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue