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
| import dom from "./dom" | |
| import utils from "./utils" | |
| /* ========================================================================== | |
| ANIMATE | |
| ========================================================================== | |
| • When ".js-animate" elements are in view, ".is-active" class is added. | |
| • Intersection Observer for modern browsers | |
| • Scroll event fallback for browsers that don't support Intersection Ob. |
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
| import LazyLoad from "vanilla-lazyload"; | |
| import utils from "./utils"; | |
| /* ========================================================================== | |
| LAZYLOAD | |
| ========================================================================== | |
| • Once an element enters viewport, load it up! | |
| • Handles lazyloading images, iframes, scripts, etc... | |
| • https://github.com/verlok/lazyload |
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
| // __ ___ ___ ____ ____ ___ __ _ _ _ _ __ ___ | |
| // /__\ / __)/ __(_ _(_ _) / __) /__\ ( \( ( \/ /__\ / __) | |
| // /(__)\\__ ( (__ _)(_ _)(_ ( (__ /(__)\ ) ( \ /(__)\\__ \ | |
| // (__)(__(___/\___(____(____) \___(__)(__(_)\_) \(__)(__(___/ | |
| // What you'll need... | |
| // 1. A canvas: <canvas id="asciiCanvas"></canvas> | |
| // 2. An image: <img id="image" src="" alt=""> | |
| // Fetch elements |
OlderNewer