diff --git a/dist/1.dc197a9a.jpg b/dist/1.dc197a9a.jpg new file mode 100644 index 0000000..82fb5e4 Binary files /dev/null and b/dist/1.dc197a9a.jpg differ diff --git a/dist/base.98fd6c19.css b/dist/base.98fd6c19.css new file mode 100644 index 0000000..bfa70ac --- /dev/null +++ b/dist/base.98fd6c19.css @@ -0,0 +1,244 @@ +*, +*::after, +*::before { + box-sizing: border-box; +} + +:root { + font-size: 14px; + --color-text: #fff; + --color-bg: #000; + --color-link: #aaa; + --color-link-hover: #fff; +} + +body { + margin: 0; + color: var(--color-text); + background-color: var(--color-bg); + text-transform: uppercase; + font-family: tenon, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +/* Page Loader */ +.js .loading::before, +.js .loading::after { + content: ''; + position: fixed; + z-index: 1000; +} + +.js .loading::before { + top: 0; + left: 0; + width: 100%; + height: 100%; + background: var(--color-bg); +} + +.js .loading::after { + top: 50%; + left: 50%; + width: 60px; + height: 60px; + margin: -30px 0 0 -30px; + border-radius: 50%; + opacity: 0.4; + background: var(--color-link); + animation: loaderAnim 0.7s linear infinite alternate forwards; + +} + +@keyframes loaderAnim { + to { + opacity: 1; + transform: scale3d(0.5,0.5,1); + } +} + +a { + text-decoration: none; + color: var(--color-link); + outline: none; + cursor: pointer; +} + +a:hover { + color: var(--color-link-hover); + outline: none; +} + +/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */ +a:focus { + /* Provide a fallback style for browsers + that don't support :focus-visible */ + outline: none; + background: lightgrey; +} + +a:focus:not(:focus-visible) { + /* Remove the focus indicator on mouse-focus for browsers + that do support :focus-visible */ + background: transparent; +} + +a:focus-visible { + /* Draw a very noticeable focus style for + keyboard-focus on browsers that do support + :focus-visible */ + outline: 2px solid red; + background: transparent; +} + +.unbutton { + background: none; + border: 0; + padding: 0; + margin: 0; + font: inherit; + cursor: pointer; +} + +.unbutton:focus { + outline: none; +} + +.frame { + color: var(--color-title); + padding: 1rem; + display: grid; + grid-template-columns: 100%; + grid-template-areas: 'title' 'prev' 'sponsor'; + justify-content: start; + grid-gap: 0.5rem; + align-items: start; + position: fixed; + top: 0; + left: 0; + width: 100%; + justify-items: end; + z-index: 500; +} + +.frame a:not(.frame__title-back) { + white-space: nowrap; + overflow: hidden; + position: relative; +} + +.frame a:not(.frame__title-back)::before { + content: ''; + height: 1px; + width: 100%; + background: currentColor; + position: absolute; + top: 90%; + transition: transform 0.3s; + transform-origin: 0% 50%; +} + +.frame a:not(.frame__title-back):hover::before { + transform: scaleX(0); + transform-origin: 100% 50%; +} + +.frame__title { + grid-area: title; + display: flex; + align-items: start; +} + +.frame__title-main { + font-size: inherit; + margin: 0; + font-weight: inherit; +} + +.frame__title-back { + position: relative; + display: flex; + align-items: flex-end; +} + +.frame__title-back span { + display: none; +} + +.frame__title-back svg { + fill: currentColor; +} + +.frame__prev { + grid-area: prev; + align-self: start; +} + +.grid { + display: flex; + flex-direction: column; + gap: 5vh; +} + +.grid__item { + height: 100vh; + place-items: center; + display: grid; +} + +.grid__item-inner { + display: grid; + gap: 1rem; + place-items: center; + text-align: center; +} + +.grid__item--stack { + display: grid; + gap: 2rem; + grid-template-rows: 1fr auto; +} + +.grid__item-logo { + padding: 8rem 1rem 0; +} + +.grid__item-img { + background-size: cover; + background-position: 50% 50%; + height: 70vh; + aspect-ratio: 1.5; +} + +.grid__item-text { + margin: 0; +} + +.credits { + margin: 0 0 1.5rem; + font-size: 1rem; + letter-spacing: 0.25em; + word-spacing: 0.75em; + font-weight: 300; + text-align: center; +} + +@media screen and (min-width: 53em) { + .frame { + grid-template-columns: auto auto 1fr; + grid-template-rows: auto; + grid-template-areas: 'title prev sponsor'; + justify-items: start; + grid-gap: 2rem; + } + .grid__item-logo { + padding: 3rem 1rem 0; + } + .credits { + font-size: 1.4vw; + } +} + + +/*# sourceMappingURL=/base.98fd6c19.css.map */ \ No newline at end of file diff --git a/dist/base.98fd6c19.css.map b/dist/base.98fd6c19.css.map new file mode 100644 index 0000000..491cbd9 --- /dev/null +++ b/dist/base.98fd6c19.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["css/base.css"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"base.98fd6c19.css","sourceRoot":"..","sourcesContent":["*,\r\n*::after,\r\n*::before {\r\n\tbox-sizing: border-box;\r\n}\r\n\r\n:root {\r\n\tfont-size: 14px;\r\n\t--color-text: #fff;\r\n\t--color-bg: #000;\r\n\t--color-link: #aaa;\r\n\t--color-link-hover: #fff;\r\n}\r\n\r\nbody {\r\n\tmargin: 0;\r\n\tcolor: var(--color-text);\r\n\tbackground-color: var(--color-bg);\r\n\ttext-transform: uppercase;\r\n\tfont-family: tenon, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;\r\n\t-webkit-font-smoothing: antialiased;\r\n\t-moz-osx-font-smoothing: grayscale;\r\n}\r\n\r\n/* Page Loader */\r\n.js .loading::before,\r\n.js .loading::after {\r\n\tcontent: '';\r\n\tposition: fixed;\r\n\tz-index: 1000;\r\n}\r\n\r\n.js .loading::before {\r\n\ttop: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tbackground: var(--color-bg);\r\n}\r\n\r\n.js .loading::after {\r\n\ttop: 50%;\r\n\tleft: 50%;\r\n\twidth: 60px;\r\n\theight: 60px;\r\n\tmargin: -30px 0 0 -30px;\r\n\tborder-radius: 50%;\r\n\topacity: 0.4;\r\n\tbackground: var(--color-link);\r\n\tanimation: loaderAnim 0.7s linear infinite alternate forwards;\r\n\r\n}\r\n\r\n@keyframes loaderAnim {\r\n\tto {\r\n\t\topacity: 1;\r\n\t\ttransform: scale3d(0.5,0.5,1);\r\n\t}\r\n}\r\n\r\na {\r\n\ttext-decoration: none;\r\n\tcolor: var(--color-link);\r\n\toutline: none;\r\n\tcursor: pointer;\r\n}\r\n\r\na:hover {\r\n\tcolor: var(--color-link-hover);\r\n\toutline: none;\r\n}\r\n\r\n/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */\r\na:focus {\r\n\t/* Provide a fallback style for browsers\r\n\t that don't support :focus-visible */\r\n\toutline: none;\r\n\tbackground: lightgrey;\r\n}\r\n\r\na:focus:not(:focus-visible) {\r\n\t/* Remove the focus indicator on mouse-focus for browsers\r\n\t that do support :focus-visible */\r\n\tbackground: transparent;\r\n}\r\n\r\na:focus-visible {\r\n\t/* Draw a very noticeable focus style for\r\n\t keyboard-focus on browsers that do support\r\n\t :focus-visible */\r\n\toutline: 2px solid red;\r\n\tbackground: transparent;\r\n}\r\n\r\n.unbutton {\r\n\tbackground: none;\r\n\tborder: 0;\r\n\tpadding: 0;\r\n\tmargin: 0;\r\n\tfont: inherit;\r\n\tcursor: pointer;\r\n}\r\n\r\n.unbutton:focus {\r\n\toutline: none;\r\n}\r\n\r\n.frame {\r\n\tcolor: var(--color-title);\r\n\tpadding: 1rem;\r\n\tdisplay: grid;\r\n\tgrid-template-columns: 100%;\r\n\tgrid-template-areas: 'title' 'prev' 'sponsor';\r\n\tjustify-content: start;\r\n\tgrid-gap: 0.5rem;\r\n\talign-items: start;\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\tjustify-items: end;\r\n\tz-index: 500;\r\n}\r\n\r\n.frame a:not(.frame__title-back) {\r\n\twhite-space: nowrap;\r\n\toverflow: hidden;\r\n\tposition: relative;\r\n}\r\n\r\n.frame a:not(.frame__title-back)::before {\r\n\tcontent: '';\r\n\theight: 1px;\r\n\twidth: 100%;\r\n\tbackground: currentColor;\r\n\tposition: absolute;\r\n\ttop: 90%;\r\n\ttransition: transform 0.3s;\r\n\ttransform-origin: 0% 50%;\r\n}\r\n\r\n.frame a:not(.frame__title-back):hover::before {\r\n\ttransform: scaleX(0);\r\n\ttransform-origin: 100% 50%;\r\n}\r\n\r\n.frame__title {\r\n\tgrid-area: title;\r\n\tdisplay: flex;\r\n\talign-items: start;\r\n}\r\n\r\n.frame__title-main {\r\n\tfont-size: inherit;\r\n\tmargin: 0;\r\n\tfont-weight: inherit;\r\n}\r\n\r\n.frame__title-back {\r\n\tposition: relative;\r\n\tdisplay: flex;\r\n\talign-items: flex-end;\r\n}\r\n\r\n.frame__title-back span {\r\n\tdisplay: none;\r\n}\r\n\r\n.frame__title-back svg {\r\n\tfill: currentColor;\r\n}\r\n\r\n.frame__prev {\r\n\tgrid-area: prev;\r\n\talign-self: start;\r\n}\r\n\r\n.grid {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 5vh;\r\n}\r\n\r\n.grid__item {\r\n height: 100vh; \r\n\tplace-items: center;\r\n display: grid;\r\n}\r\n\r\n.grid__item-inner {\r\n\tdisplay: grid;\r\n\tgap: 1rem;\r\n\tplace-items: center;\r\n\ttext-align: center;\r\n}\r\n\r\n.grid__item--stack {\r\n\tdisplay: grid;\r\n\tgap: 2rem;\r\n\tgrid-template-rows: 1fr auto;\r\n}\r\n\r\n.grid__item-logo {\r\n\tpadding: 8rem 1rem 0;\r\n}\r\n\r\n.grid__item-img {\r\n\tbackground-size: cover;\r\n background-position: 50% 50%;\r\n\theight: 70vh;\r\n\taspect-ratio: 1.5;\r\n}\r\n\r\n.grid__item-text {\r\n\tmargin: 0;\r\n}\r\n\r\n.credits {\r\n\tmargin: 0 0 1.5rem;\r\n\tfont-size: 1rem;\r\n\tletter-spacing: 0.25em;\r\n word-spacing: 0.75em;\r\n\tfont-weight: 300;\r\n\ttext-align: center;\r\n}\r\n\r\n@media screen and (min-width: 53em) {\r\n\t.frame {\r\n\t\tgrid-template-columns: auto auto 1fr;\r\n\t\tgrid-template-rows: auto;\r\n\t\tgrid-template-areas: 'title prev sponsor';\r\n\t\tjustify-items: start;\r\n\t\tgrid-gap: 2rem;\r\n\t}\r\n\t.grid__item-logo {\r\n\t\tpadding: 3rem 1rem 0;\r\n\t}\t\r\n\t.credits {\r\n\t\tfont-size: 1.4vw;\r\n\t}\r\n}\r\n"]} \ No newline at end of file diff --git a/dist/base.98fd6c19.js b/dist/base.98fd6c19.js new file mode 100644 index 0000000..e83f530 --- /dev/null +++ b/dist/base.98fd6c19.js @@ -0,0 +1,345 @@ +// modules are defined as an array +// [ module function, map of requires ] +// +// map of requires is short require name -> numeric require +// +// anything defined in a previous bundle is accessed via the +// orig method which is the require for previous bundles +parcelRequire = (function (modules, cache, entry, globalName) { + // Save the require from previous bundle to this closure if any + var previousRequire = typeof parcelRequire === 'function' && parcelRequire; + var nodeRequire = typeof require === 'function' && require; + + function newRequire(name, jumped) { + if (!cache[name]) { + if (!modules[name]) { + // if we cannot find the module within our internal map or + // cache jump to the current global require ie. the last bundle + // that was added to the page. + var currentRequire = typeof parcelRequire === 'function' && parcelRequire; + if (!jumped && currentRequire) { + return currentRequire(name, true); + } + + // If there are other bundles on this page the require from the + // previous one is saved to 'previousRequire'. Repeat this as + // many times as there are bundles until the module is found or + // we exhaust the require chain. + if (previousRequire) { + return previousRequire(name, true); + } + + // Try the node require function if it exists. + if (nodeRequire && typeof name === 'string') { + return nodeRequire(name); + } + + var err = new Error('Cannot find module \'' + name + '\''); + err.code = 'MODULE_NOT_FOUND'; + throw err; + } + + localRequire.resolve = resolve; + localRequire.cache = {}; + + var module = cache[name] = new newRequire.Module(name); + + modules[name][0].call(module.exports, localRequire, module, module.exports, this); + } + + return cache[name].exports; + + function localRequire(x){ + return newRequire(localRequire.resolve(x)); + } + + function resolve(x){ + return modules[name][1][x] || x; + } + } + + function Module(moduleName) { + this.id = moduleName; + this.bundle = newRequire; + this.exports = {}; + } + + newRequire.isParcelRequire = true; + newRequire.Module = Module; + newRequire.modules = modules; + newRequire.cache = cache; + newRequire.parent = previousRequire; + newRequire.register = function (id, exports) { + modules[id] = [function (require, module) { + module.exports = exports; + }, {}]; + }; + + var error; + for (var i = 0; i < entry.length; i++) { + try { + newRequire(entry[i]); + } catch (e) { + // Save first error but execute all entries + if (!error) { + error = e; + } + } + } + + if (entry.length) { + // Expose entry point to Node, AMD or browser globals + // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js + var mainExports = newRequire(entry[entry.length - 1]); + + // CommonJS + if (typeof exports === "object" && typeof module !== "undefined") { + module.exports = mainExports; + + // RequireJS + } else if (typeof define === "function" && define.amd) { + define(function () { + return mainExports; + }); + + // + + + +
+
+
+

Loop Scrolling

+ + Back to the article + + + +
+ Previous demo +
+
+
+ +

An infinite scrolling demo based on Bureau DAM

+
+ +
+
+ + + + + + + + diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..1ede673 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,341 @@ +// modules are defined as an array +// [ module function, map of requires ] +// +// map of requires is short require name -> numeric require +// +// anything defined in a previous bundle is accessed via the +// orig method which is the require for previous bundles +parcelRequire = (function (modules, cache, entry, globalName) { + // Save the require from previous bundle to this closure if any + var previousRequire = typeof parcelRequire === 'function' && parcelRequire; + var nodeRequire = typeof require === 'function' && require; + + function newRequire(name, jumped) { + if (!cache[name]) { + if (!modules[name]) { + // if we cannot find the module within our internal map or + // cache jump to the current global require ie. the last bundle + // that was added to the page. + var currentRequire = typeof parcelRequire === 'function' && parcelRequire; + if (!jumped && currentRequire) { + return currentRequire(name, true); + } + + // If there are other bundles on this page the require from the + // previous one is saved to 'previousRequire'. Repeat this as + // many times as there are bundles until the module is found or + // we exhaust the require chain. + if (previousRequire) { + return previousRequire(name, true); + } + + // Try the node require function if it exists. + if (nodeRequire && typeof name === 'string') { + return nodeRequire(name); + } + + var err = new Error('Cannot find module \'' + name + '\''); + err.code = 'MODULE_NOT_FOUND'; + throw err; + } + + localRequire.resolve = resolve; + localRequire.cache = {}; + + var module = cache[name] = new newRequire.Module(name); + + modules[name][0].call(module.exports, localRequire, module, module.exports, this); + } + + return cache[name].exports; + + function localRequire(x){ + return newRequire(localRequire.resolve(x)); + } + + function resolve(x){ + return modules[name][1][x] || x; + } + } + + function Module(moduleName) { + this.id = moduleName; + this.bundle = newRequire; + this.exports = {}; + } + + newRequire.isParcelRequire = true; + newRequire.Module = Module; + newRequire.modules = modules; + newRequire.cache = cache; + newRequire.parent = previousRequire; + newRequire.register = function (id, exports) { + modules[id] = [function (require, module) { + module.exports = exports; + }, {}]; + }; + + var error; + for (var i = 0; i < entry.length; i++) { + try { + newRequire(entry[i]); + } catch (e) { + // Save first error but execute all entries + if (!error) { + error = e; + } + } + } + + if (entry.length) { + // Expose entry point to Node, AMD or browser globals + // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js + var mainExports = newRequire(entry[entry.length - 1]); + + // CommonJS + if (typeof exports === "object" && typeof module !== "undefined") { + module.exports = mainExports; + + // RequireJS + } else if (typeof define === "function" && define.amd) { + define(function () { + return mainExports; + }); + + //