lib

CrootJS Project Instructions

This project uses CrootJS — vanilla ES6+ JavaScript modules imported straight from jsDelivr, no npm, no bundler. Follow these rules whenever you write, edit, or generate code in this project.

Mandatory: separate HTML, CSS, and JS

Exception: a third-party library’s own CDN <script src="..."> tag is fine — that’s an external dependency, not inline application code.

Exception: integrity.js, which installs the import map with SRI hashes (see Importing CrootJS), is a classic <script src="integrity.js"></script> placed first in <head>: Firefox ignores an import map added after module loading started. It holds only that import map.

Mandatory: no AI slop

Mandatory: no “AI look”

Pages must not look AI-generated. Start from croot.css (+ optional ui.css components, a themes.css theme, icons.css) and the page patterns at https://croot.js.org/examples/pola/, then change only what the product needs.

Mandatory: a 404.html next to index.html

Every site (the folder with the site’s index.html, e.g. the repo root on GitHub Pages) must also have a 404.html in the same folder: separate CSS (croot.css is fine), absolute paths (/, /style.css) because it is shown for wrong addresses in every subfolder, <meta name="robots" content="noindex">, a plain message and links to the likely destinations. Example: https://croot.js.org/examples/pola/kosong-404/404.html

Importing CrootJS

Reference