This Web Components keeps the year in your copyright notice up-to-date.
export { CopyrightYearElement }
const name = "copyright-year";
class CopyrightYearElement extends HTMLSpanElement {| import collections, random, sys, textwrap | |
| # Build possibles table indexed by pair of prefix words (w1, w2) | |
| w1 = w2 = '' | |
| possibles = collections.defaultdict(list) | |
| for line in sys.stdin: | |
| for word in line.split(): | |
| possibles[w1, w2].append(word) | |
| w1, w2 = w2, word |
| <script async src="https://ga.jspm.io/npm:es-module-shims@1.5.1/dist/es-module-shims.js" crossorigin="anonymous"></script> | |
| <script type="importmap"> | |
| { | |
| "imports": { | |
| "three": "https://unpkg.com/three@0.155.0/build/three.module.js", | |
| "three/addons/": "https://unpkg.com/three@0.155.0/examples/jsm/" | |
| } | |
| } | |
| </script> |
| /* | |
| * This is an experimental view library that would compete with react, svelte, qwik.js, vue.js etc. | |
| * | |
| * Implementation reference: https://git.sr.ht/~erock/alpfx | |
| * | |
| * Features: | |
| * - Instead of `view = func(state)` we have `view = func(event)` | |
| * - This paradigm shift will: | |
| * - make prop mgmt (e.g. when to update component) more manual | |
| * - animations easier (events or transitions are sent to the component that the end-user |
Points are static, the box of visibility moves through them.
A Pen by Faked Weiss on CodePen.
A Pen by Faked Weiss on CodePen.
A Pen by Faked Weiss on CodePen.
A Pen by Faked Weiss on CodePen.
A Pen by Faked Weiss on CodePen.