Documentation for Infinite Scroll, the JavaScript library for automatically adding next pages.
Building these docs requires npm.
npm installRun with npm: npm run dev.
build- build production version of sitedev- built development version of sitelint- lint JS and CSS "npm run lint:js && npm run lint:css",lint:js- lint JS. Runnpm run lint:js -- --fixto make automatic fixeslint:js- lint CSS. Runnpm run lint:css -- --fixto make automatic fixes
assets/- files that get copied intobuild/build/- where static site gets builtcontent/- page contentcss/- boilerplate CSSdata/- Site and logo data files.js/- boilerplate JSmodules/- See Modules belowmodules/demos- Demo modules
tasks/- Gulp tasks to build the sitetemplates/- page templates
Modules are re-usable components used throughout the site. A module may consist of template, JS, and CSS files.
modules/
page-nav/
page-nav.css
page-nav.js
page-nav.hbs
BEM is used for CSS code style.
.page-nav {} /* block */
.page-nav__item {} /* element, child */
.page-nav--dark {} /* modifier */JavaScript can be initialized for each element with data-js attribute.
<div class="page-nav" data-js="page-nav">InfiniteScrollDocs.['page-nav'] = function( elem ) {
// do something with elem
};By Metafizzy