This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const initLazyloading = (selector: string): void => { | |
let images = document.querySelectorAll(selector) | |
if ('IntersectionObserver' in window) { | |
// Create new observer object | |
let lazyImageObserver = new IntersectionObserver(function(entries, observer) { | |
// Loop through IntersectionObserverEntry objects | |
entries.forEach(function(entry) { | |
// Do these if the target intersects with the root | |
if (entry.isIntersecting) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FORGE CONFIG (DO NOT REMOVE!) | |
include forge-conf/<your-site>/before/*; | |
map $sent_http_content_type $expires { | |
"text/html" epoch; | |
"text/html; charset=utf-8" epoch; | |
default off; | |
} | |
server { |
OlderNewer