1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

chore(deps): use lazysizes to load images

This commit is contained in:
Cotes Chung
2022-12-09 07:03:13 +08:00
parent 7651d2851b
commit ca41c7ebff
10 changed files with 26 additions and 32 deletions

View File

@@ -183,22 +183,17 @@ i { /* fontawesome icons */
}
}
@-webkit-keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
img[data-src] {
margin: 0.5rem 0;
&[data-loaded="true"] {
-webkit-animation: fade-in linear 0.5s;
animation: fade-in linear 0.5s;
&.lazyload,
&.lazyloading {
opacity: 0;
}
&.lazyloaded {
opacity: 1;
transition: opacity 0.5s;
}
&.left {

View File

@@ -30,7 +30,7 @@ img.preview-img {
margin: 0;
border-radius: 6px;
&.bg[data-loaded="true"] {
&.bg {
background: var(--preview-img-bg);
}
}