1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 13:44:15 +00:00

Add image CDN support & improve image lazy loading

This commit is contained in:
Cotes Chung
2021-01-09 22:30:31 +08:00
parent 594eaf5100
commit 6e6633c2fc
5 changed files with 52 additions and 22 deletions

View File

@@ -2,7 +2,7 @@
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lozad/dist/lozad.min.js"></script>
<script type="text/javascript">
const imgs = document.querySelectorAll('#post-wrapper img');
const imgs = document.querySelectorAll('.post-content img');
const observer = lozad(imgs);
observer.observe();
</script>
</script>