From 4107be833cfc1a970817362d72928362282634bf Mon Sep 17 00:00:00 2001 From: spagu Date: Tue, 20 Oct 2026 19:18:04 +0100 Subject: [PATCH] chore(security): source-map-js 1.2.2, jsdom 30.1.3; LJ Create logo on its reference card source-map-js (CVE-2026-93749, development-only via jsdom -> css-tree) is raised to 1.2.2 in the lockfile and jsdom to 30.1.3; npm audit is clean. The references cards show an owner-approved logo on a light plate token, white in both schemes; only a complete logo under images/references/ is published. The approval filter moves to approved-references.mjs. --- CHANGELOG.md | 5 + package-lock.json | 157 ++++++++---------- package.json | 2 +- site/references/references.json | 8 +- site/scripts/approved-references.mjs | 48 ++++++ site/scripts/references.mjs | 24 +-- site/scripts/references.test.mjs | 29 ++++ site/templates/xslt-site/css/references.css | 16 +- site/templates/xslt-site/css/tokens.css | 2 + .../xslt-site/images/references/ljcreate.png | Bin 0 -> 12323 bytes site/templates/xslt-site/layouts/landing.html | 2 +- .../xslt-site/layouts/references.html | 2 +- .../xslt-site/partials/references.html | 12 +- 13 files changed, 192 insertions(+), 115 deletions(-) create mode 100644 site/scripts/approved-references.mjs create mode 100644 site/templates/xslt-site/images/references/ljcreate.png diff --git a/CHANGELOG.md b/CHANGELOG.md index c4246b1..dea2363 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Security + +- **source-map-js 1.2.2** (CVE-2026-93749, GHSA-68fv-2mgg-jv7q, event-loop denial of service through indexed source-map section offsets): a development-only, transitive dependency (jsdom → css-tree), raised in the lockfile; the published packages never contained it. jsdom, the development DOM and the CLI's optional peer, goes to 30.1.3 at the same time. + ### Documentation +- **LJ Create's logo on its reference card**, as LJ Create offered in #17: the card shows a logo on a light plate (a `--color-logo-plate` token, white in both colour schemes, since logos are drawn for light backgrounds) when its entry in `site/references/references.json` has one; only a complete logo (a file under `images/references/`, an alt text, its intrinsic size) is published. The approval filter moved to `site/scripts/approved-references.mjs`. - **References: LJ Cloud, LJ Create's learning portal** (cloud.ljcreate.com), which renders its course menus and lesson content with the library, listed with the reporter's permission (issue #17). The references tests read the approved entries from the data file instead of a fixed list. ## [1.3.4] - 2026-10-12 diff --git a/package-lock.json b/package-lock.json index f2b9f8b..42ba687 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@xmldom/xmldom": "^0.9.12", "esbuild": "^0.28.2", "eslint": "^10.11.0", - "jsdom": "^30.1.1", + "jsdom": "^30.1.3", "linkedom": "^0.18.13", "prettier": "^3.9.9" }, @@ -45,16 +45,16 @@ } }, "node_modules/@asamuzakjp/css-color": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-7.0.1.tgz", - "integrity": "sha512-C9duntabagkBZ1LebM7FKmphR4Q1pBclLxVbZETQV0akkFjV0ooFxo8FlvAQyKj9F6l8rEnmidgcTlpyxFYizg==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-7.1.7.tgz", + "integrity": "sha512-Q7ioeear07HwixdIitIn9KS1LZi97CEDFCSjPNm9v+y8KNbsu9q4Lrd4zUQW4faED+E7qxvfeVnbNRW46wFKuw==", "devOptional": true, "license": "MIT", "dependencies": { - "@csstools/css-calc": "^3.4.0", - "@csstools/css-color-parser": "^4.2.3", - "@csstools/css-parser-algorithms": "^4.0.0", - "@csstools/css-tokenizer": "^4.0.1", + "@csstools/css-calc": "^3.4.3", + "@csstools/css-color-parser": "^4.2.6", + "@csstools/css-parser-algorithms": "^4.0.2", + "@csstools/css-tokenizer": "^4.0.2", "lru-cache": "^11.5.3" }, "engines": { @@ -62,9 +62,9 @@ } }, "node_modules/@asamuzakjp/dom-selector": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-9.2.1.tgz", - "integrity": "sha512-NT4s3yZLjovPpliRpTvdsdzyPjqRqiCZj9MxnarBihbaY5MbAG7DWAJcrLlhmC7xKTNCXsTELcqB8YsqpLnUFQ==", + "version": "10.0.4", + "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-10.0.4.tgz", + "integrity": "sha512-A6f1nKy99I6tyoK82U6kBHvQQZmdHmTmPzJYPY/0eaOW0r8/qPmEOwjGHs+hL/vCgOwQTupu4LT1XtXNUuDruA==", "devOptional": true, "license": "MIT", "dependencies": { @@ -115,9 +115,9 @@ } }, "node_modules/@csstools/color-helpers": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.1.1.tgz", - "integrity": "sha512-gLNsunvwf3mCi5u5o46/Z/JcJMnhbHSaZ69rkgPzNM3J4s8hWwpPUQB6/tt0EDFyCiWzxANlx+2LJwpYj4zS1w==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.1.2.tgz", + "integrity": "sha512-grhRy3OKmniaAEKXMjua5z/EODX0MSqBGjunw8+j/3HQjOnahs2AGhvEOIYVUWcU6ScApbhLhVrQTX8XqrMrow==", "devOptional": true, "funding": [ { @@ -135,9 +135,9 @@ } }, "node_modules/@csstools/css-calc": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.4.0.tgz", - "integrity": "sha512-XQKj5B7QiZcHiegCOCAzcAOJdhGgWOHbbu62h5e5mkHnn8lWcfiJhllkqWmxu5zWR9jucPHuo1iTB56P033hcg==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.4.3.tgz", + "integrity": "sha512-iex20d8CHVkyvg6B7UKV7uHnI2Bqo9g+EFfT9E0y+GvTvhZ/DwONJ+9aKb1dlqm0ZiGsL5RXjp0fCoJYnkeDjA==", "devOptional": true, "funding": [ { @@ -154,14 +154,14 @@ "node": ">=20.19.0" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^4.0.0", - "@csstools/css-tokenizer": "^4.0.0" + "@csstools/css-parser-algorithms": "^4.0.2", + "@csstools/css-tokenizer": "^4.0.2" } }, "node_modules/@csstools/css-color-parser": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.2.3.tgz", - "integrity": "sha512-y4LpL+lmpuyKDiEFq2PnZUVFdAjsoB/qQJod79yLNokXyW7jewi+/WJ69EfItj8A2unWtxXnGjw6LYXgXu5ZjA==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.2.6.tgz", + "integrity": "sha512-iiPQ3iRWwnJkeEn6RIu6SJPr7hYrLz6XZ9s/QZl+2/LI5KQVjpl2fdmDSZKuD4xP6GMmMPgHFFXg6k1Wkz0Trg==", "devOptional": true, "funding": [ { @@ -175,21 +175,21 @@ ], "license": "MIT", "dependencies": { - "@csstools/color-helpers": "^6.1.1", - "@csstools/css-calc": "^3.4.0" + "@csstools/color-helpers": "^6.1.2", + "@csstools/css-calc": "^3.4.3" }, "engines": { "node": ">=20.19.0" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^4.0.0", - "@csstools/css-tokenizer": "^4.0.0" + "@csstools/css-parser-algorithms": "^4.0.2", + "@csstools/css-tokenizer": "^4.0.2" } }, "node_modules/@csstools/css-parser-algorithms": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.0.tgz", - "integrity": "sha512-+B87qS7fIG3L5h3qwJ/IFbjoVoOe/bpOdh9hAjXbvx0o8ImEmUsGXN0inFOnk2ChCFgqkkGFQ+TpM5rbhkKe4w==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.2.tgz", + "integrity": "sha512-40cSKyMvK+tq4qz6Awrlye2WGuOKt3FwPgtGg6KTfbHOWNw+Rk1rzbAtZnZ6IBhsY491HLRnDXwoyBAijmmILA==", "devOptional": true, "funding": [ { @@ -206,13 +206,13 @@ "node": ">=20.19.0" }, "peerDependencies": { - "@csstools/css-tokenizer": "^4.0.0" + "@csstools/css-tokenizer": "^4.0.2" } }, "node_modules/@csstools/css-syntax-patches-for-csstree": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.13.tgz", - "integrity": "sha512-i9ZylF5QNhmNfPA9l0vHAWK4kPrbIp6g9lKgaiIFsIBz2F/WNB7OLrzlNNcCOm+h42bkaSD2v1PG+IBPHhc3ZA==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.15.tgz", + "integrity": "sha512-J0u7HkVl2nzSlhsiTOp4AmwcUQ3D+mGEEKfBy/7To5/y7F2OHwyLrXfrhR0SMgr4p5Lo+eaMVSeai24zUcBIxA==", "devOptional": true, "funding": [ { @@ -235,9 +235,9 @@ } }, "node_modules/@csstools/css-tokenizer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-4.0.1.tgz", - "integrity": "sha512-bPlN9S9O1A0euCpEWE4qnvB5YDuyYVsUTrxSgmAM1Is0j4tICHoVyOVAXfWMP/kS9ZrjvyIXWV2PmomiAXXqOw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-4.0.2.tgz", + "integrity": "sha512-OoKoR0f76dCY666JlcbhmVTs2drYj1GUXZTYTcbUgJjh9Nv41aFfZ21bPQTERm5+L5cBDo466NltB2lplS5GBw==", "devOptional": true, "funding": [ { @@ -825,9 +825,9 @@ } }, "node_modules/@exodus/bytes": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.15.1.tgz", - "integrity": "sha512-S6mL0yNB/Abt9Ei4tq8gDhcczc4S3+vQ4ra7vxnAf+YHC02srtqxKKZghx2Dq6p0e66THKwR6r8N6P95wEty7Q==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.16.0.tgz", + "integrity": "sha512-IcpW84uEn3N7ETtNZMlxKhfl6Pec8rUNGOTBtWbK1FKhJxIFAptZyVrvVRVBimAJxJCgc3PxepxkdWWG4DVzfA==", "devOptional": true, "license": "MIT", "engines": { @@ -1156,17 +1156,17 @@ "license": "MIT" }, "node_modules/data-urls": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-7.0.0.tgz", - "integrity": "sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-8.0.0.tgz", + "integrity": "sha512-JQUCCK+/CAGbGGx618PlFZMXH81Jtj7t73CHv9dd/zVWvxgGT2zLFRjnKb+Ng46GIwcy+f7f88qd4duqllK+WQ==", "devOptional": true, "license": "MIT", "dependencies": { "whatwg-mimetype": "^5.0.0", - "whatwg-url": "^16.0.0" + "whatwg-url": "^17.1.2" }, "engines": { - "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + "node": "^22.14.0 || >=24.0.0" } }, "node_modules/debug": { @@ -1778,31 +1778,31 @@ "license": "ISC" }, "node_modules/jsdom": { - "version": "30.1.1", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-30.1.1.tgz", - "integrity": "sha512-FahmoPK5vbPc+jxV1iErMHmAZypCZ942NHF4+qqaWAuvaKKTBZxawnmAtrbGWLU7MtlxfqIP0qw6aSI+aWGtLg==", + "version": "30.1.3", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-30.1.3.tgz", + "integrity": "sha512-hQMUPvRgN7KxsfIytDQji7bimuJeRQa6Qo5+iuiZQk5CafeRxLIA10/cG5YCBFNpD9RO3oqIiN4CO1Y44kxqXg==", "devOptional": true, "license": "MIT", "dependencies": { - "@asamuzakjp/css-color": "^7.0.0", - "@asamuzakjp/dom-selector": "^9.2.1", + "@asamuzakjp/css-color": "^7.1.3", + "@asamuzakjp/dom-selector": "^10.0.3", "@bramus/specificity": "^2.4.2", - "@csstools/css-syntax-patches-for-csstree": "^1.1.13", - "@exodus/bytes": "^1.15.1", + "@csstools/css-syntax-patches-for-csstree": "^1.1.15", + "@exodus/bytes": "^1.16.0", "css-tree": "^3.2.1", - "data-urls": "^7.0.0", + "data-urls": "^8.0.0", "decimal.js": "^10.6.0", "html-encoding-sniffer": "^7.0.0", "is-potential-custom-element-name": "^1.0.1", - "lru-cache": "^11.5.2", + "lru-cache": "^11.5.3", "parse5": "^8.0.1", "saxes": "^6.0.0", "tough-cookie": "^6.0.2", - "undici": "^8.10.2", + "undici": "^8.12.1", "w3c-xmlserializer": "^6.0.0", "webidl-conversions": "^8.0.1", "whatwg-mimetype": "^5.0.0", - "whatwg-url": "^17.1.1", + "whatwg-url": "^17.2.0", "xml-name-validator": "^5.0.0" }, "engines": { @@ -1817,21 +1817,6 @@ } } }, - "node_modules/jsdom/node_modules/whatwg-url": { - "version": "17.1.2", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-17.1.2.tgz", - "integrity": "sha512-TEZA+Zqxin7Jjsm2cjRohCmen5awh+hT6Zi3VZdqZlNRk7zvOI/9WpBFg/DWlA56bWnzwm6DuB8NS0EsxQH9uQ==", - "devOptional": true, - "license": "MIT", - "dependencies": { - "@exodus/bytes": "^1.15.1", - "tr46": "^6.0.0", - "webidl-conversions": "^8.0.1" - }, - "engines": { - "node": "^22.14.0 || >=24.0.0" - } - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -2190,9 +2175,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", "devOptional": true, "license": "BSD-3-Clause", "engines": { @@ -2233,16 +2218,16 @@ } }, "node_modules/tr46": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-6.0.0.tgz", - "integrity": "sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-7.0.0.tgz", + "integrity": "sha512-BcDSDW+SIGWVOns1Zm6Yg91q9AEj7eaID0QDY9oIqJD1A8dscNwMcl9Sms2DeuWCNov1X0/oXanHGYQBSLwZsg==", "devOptional": true, "license": "MIT", "dependencies": { "punycode": "^2.3.1" }, "engines": { - "node": ">=20" + "node": "^22.14.0 || >=24.0.0" } }, "node_modules/type-check": { @@ -2266,9 +2251,9 @@ "license": "ISC" }, "node_modules/undici": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-8.11.2.tgz", - "integrity": "sha512-u4UB2/IrKdU6lFxumHmmo1a3fCQO5tzQllRorfoRS63txhrB7xTpSn1PftwC4qEHkOaqP95fCWW4lJzwErwzhQ==", + "version": "8.12.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-8.12.3.tgz", + "integrity": "sha512-+fdndUTwBP86cVjihTp21hZHo7d6oj1c/47XPA3lL8mM0XHs+C4EkcjmgRsFnFk2f/UONGDy9ItBItmXsLOQHw==", "devOptional": true, "license": "MIT", "engines": { @@ -2319,18 +2304,18 @@ } }, "node_modules/whatwg-url": { - "version": "16.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-16.0.1.tgz", - "integrity": "sha512-1to4zXBxmXHV3IiSSEInrreIlu02vUOvrhxJJH5vcxYTBDAx51cqZiKdyTxlecdKNSjj8EcxGBxNf6Vg+945gw==", + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-17.3.0.tgz", + "integrity": "sha512-KwOAJrpf+GTgBvcBQJcP38sMF0DsQKdwtG+TxM2pW44P6E5k0hDbWrDmyuJDIF0Uef0aQq0ZoJs+5oI+k8ddhg==", "devOptional": true, "license": "MIT", "dependencies": { - "@exodus/bytes": "^1.11.0", - "tr46": "^6.0.0", + "@exodus/bytes": "^1.16.0", + "tr46": "^7.0.0", "webidl-conversions": "^8.0.1" }, "engines": { - "node": "^20.19.0 || ^22.12.0 || >=24.0.0" + "node": "^22.14.0 || >=24.0.0" } }, "node_modules/which": { diff --git a/package.json b/package.json index 7d66b77..b180269 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "@xmldom/xmldom": "^0.9.12", "esbuild": "^0.28.2", "eslint": "^10.11.0", - "jsdom": "^30.1.1", + "jsdom": "^30.1.3", "linkedom": "^0.18.13", "prettier": "^3.9.9" }, diff --git a/site/references/references.json b/site/references/references.json index 56a12d9..3f27a85 100644 --- a/site/references/references.json +++ b/site/references/references.json @@ -16,7 +16,13 @@ "name": "LJ Cloud — Learning Portal (LJ Create)", "url": "https://cloud.ljcreate.com", "use": "Renders its course menus and lesson content with XSLT through @tradik/xslt-processor, which also keeps LJ ClassAct II working.", - "approved": true + "approved": true, + "logo": { + "src": "images/references/ljcreate.png", + "alt": "LJ Create, Learning for life", + "width": 225, + "height": 88 + } } ], "builtOn": [ diff --git a/site/scripts/approved-references.mjs b/site/scripts/approved-references.mjs new file mode 100644 index 0000000..0873858 --- /dev/null +++ b/site/scripts/approved-references.mjs @@ -0,0 +1,48 @@ +/** + * Which references reach the website: entries of + * site/references/references.json with `approved: true` (the project agreed + * to be named), and their logo only when it is complete and a file of the + * site (images/references/). + * + * @module site/scripts/approved-references + */ + +/* global URL */ + +/** + * The usedBy entries that may be published: those with `approved: true`. + * + * @param {Array<{name: string, url: string, use: string, approved?: boolean}>} entries + * @returns {Array<{name: string, url: string, domain: string, use: string}>} + * Approved entries with the host name to show as the link text + */ +export function approvedReferences(entries) { + return entries + .filter((entry) => entry.approved === true) + .map(({ name, url, use, logo }) => ({ + name, + url, + domain: new URL(url).hostname.replace(/^www\./, ""), + use, + ...(validLogo(logo) ? { logo } : {}), + })); +} + +/** + * Whether an entry's logo can be shown: a path under the site, an alt text + * and the intrinsic size (so the card does not shift while it loads). Add a + * logo only when its owner allowed it, as for the entry itself. + * + * @param {*} logo - The entry's `logo` field + * @returns {boolean} True for a complete logo + */ +function validLogo(logo) { + return ( + typeof logo?.src === "string" && + /^images\/references\/[\w.-]+\.(png|svg|webp)$/.test(logo.src) && + typeof logo.alt === "string" && + logo.alt.length > 0 && + Number.isInteger(logo.width) && + Number.isInteger(logo.height) + ); +} diff --git a/site/scripts/references.mjs b/site/scripts/references.mjs index bcae25f..586166b 100644 --- a/site/scripts/references.mjs +++ b/site/scripts/references.mjs @@ -13,7 +13,11 @@ * @module site/scripts/references */ -/* global fetch, AbortSignal, URL -- Node.js 18+ globals */ +import { approvedReferences } from "./approved-references.mjs"; + +export { approvedReferences }; + +/* global fetch, AbortSignal -- Node.js 18+ globals */ /** npm downloads of the last month (30 days). */ export const NPM_DOWNLOADS_URL = @@ -29,24 +33,6 @@ export const FETCH_TIMEOUT_MS = 5000; /** Entries of the home page band. */ export const HOME_LIMIT = 6; -/** - * The usedBy entries that may be published: those with `approved: true`. - * - * @param {Array<{name: string, url: string, use: string, approved?: boolean}>} entries - * @returns {Array<{name: string, url: string, domain: string, use: string}>} - * Approved entries with the host name to show as the link text - */ -export function approvedReferences(entries) { - return entries - .filter((entry) => entry.approved === true) - .map(({ name, url, use }) => ({ - name, - url, - domain: new URL(url).hostname.replace(/^www\./, ""), - use, - })); -} - /** * A date as the page writes it, e.g. "3 October 2026". * diff --git a/site/scripts/references.test.mjs b/site/scripts/references.test.mjs index 2cebb08..fd7c17c 100644 --- a/site/scripts/references.test.mjs +++ b/site/scripts/references.test.mjs @@ -34,6 +34,35 @@ const apis = { }; describe("approved references", () => { + it("keeps a complete logo and drops an incomplete or foreign one", () => { + const logo = { + src: "images/references/a.png", + alt: "A", + width: 10, + height: 4, + }; + const entry = (extra) => ({ + name: "A", + url: "https://a.test", + use: "a", + approved: true, + ...extra, + }); + assert.deepEqual(approvedReferences([entry({ logo })])[0].logo, logo); + for (const bad of [ + { ...logo, src: "https://evil.test/x.png" }, + { ...logo, src: "images/references/../x.png" }, + { ...logo, alt: "" }, + { ...logo, width: "10" }, + null, + ]) { + assert.equal( + approvedReferences([entry({ logo: bad })])[0].logo, + undefined, + ); + } + }); + it("publishes only entries with approved: true", () => { const entries = [ { name: "A", url: "https://www.a.test/x", use: "a", approved: true }, diff --git a/site/templates/xslt-site/css/references.css b/site/templates/xslt-site/css/references.css index 1e5142e..3e24432 100644 --- a/site/templates/xslt-site/css/references.css +++ b/site/templates/xslt-site/css/references.css @@ -1,7 +1,7 @@ /* * References: the "Used by" cards (home page band and /references/), the * numbers from npm and GitHub, and the list of specifications and test - * suites. Text cards without logos; every colour is a token of tokens.css, + * suites. Text cards, with a logo on a light plate where its owner allowed one; every colour is a token of tokens.css, * so the light and dark pairs keep the WCAG 2.2 AA ratios check-site.mjs * verifies. Grid items get min-width: 0 so long names and URLs wrap instead * of widening the page on phones. @@ -33,6 +33,20 @@ overflow-wrap: anywhere; } +.ref-card__logo { + /* The card is a flex column: without align-self the image is stretched */ + align-self: flex-start; + display: block; + max-width: 100%; + height: auto; + max-height: 3.5rem; + width: auto; + margin-bottom: var(--space-3); + padding: var(--space-2); + border-radius: calc(var(--radius) / 2); + background: var(--color-logo-plate); +} + .ref-card h3 { margin: 0 0 var(--space-2); } diff --git a/site/templates/xslt-site/css/tokens.css b/site/templates/xslt-site/css/tokens.css index d71009e..4147363 100644 --- a/site/templates/xslt-site/css/tokens.css +++ b/site/templates/xslt-site/css/tokens.css @@ -22,6 +22,7 @@ /* contrast pairs checked by check-site.mjs: fg / bg */ --color-bg: #ffffff; /* style guide: Background */ --color-surface: #f8f9fa; /* Google Grey 50 */ + --color-logo-plate: #ffffff; /* behind third-party logos, both schemes */ --color-surface-strong: #f1f3f4; /* Google Grey 100 */ --color-hero: #e8f0fe; /* Google Blue 50 */ --color-text: #1f2937; /* style guide: Text */ @@ -53,6 +54,7 @@ :root { --color-bg: #202124; /* Google Grey 900 */ --color-surface: #292a2d; /* Google dark surface */ + --color-logo-plate: #ffffff; /* logos are made for light backgrounds */ --color-surface-strong: #35363a; /* Google dark surface, raised */ --color-hero: #292a2d; --color-text: #e8eaed; /* Google Grey 200 */ diff --git a/site/templates/xslt-site/images/references/ljcreate.png b/site/templates/xslt-site/images/references/ljcreate.png new file mode 100644 index 0000000000000000000000000000000000000000..262148aae365820a8d85bd8a65e7acd01aedf206 GIT binary patch literal 12323 zcmb7KRaYF$5?o+`#ezG*-Q8t@#oZ;iy95m`8{8qdy9Sp)aCf%=L4#{>zxjT`opWaT zq35a3^i}&1^@tPaRzCY5sA-zc6mh8+sfsR9r9K2a?G!){cQRrA^djdNLLob(D<=gU3L!@X&8^s)WIEq`}A_ zx<>>}Wn;qNw4j;6Do*BMDV^c z>9X(tQqI!(I^F(4FhTnXwCC-PMNpO>h_W@_p+o z^J92#A1k&E0jBs9m?%;S@MY3tsNoW^E9~#>JFDF z<}OlT0c<6rVxw4`E3BzsJWIsn?3n_9xOXf$u76PnW_tlfp21g86ay9q`9oAEsxGKB zI6(16)b*KT^)a_^0C5Wkgv34Q@MOr5_f(ys8mwAR{^_nhZ#W1qNR*eF^ntSfD(bQo zWrn|53Ckv(C0IAMt$>~#0)UYPsxAk(3e{hcq!PkN48!UK<2}Pqc9_ZfeSq7lmwqMg z%@~BEfz0Tb8~?nf*a}Y0AtWsSuLO1~IW6(XP{wkEnADRq47r;qfP+&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tgpJ!E||i{N89voCNl z;+#{f(kHgoW8{-*t_>t4jdgd`C@txHPzX$uji=LhY4moQQpY+q#7!ap?TY!$l2PSvXE z`5%#D#()76Ih=l8xA;l$;=j1Kh&8gR)ZiAJ6#;munwa;i!@F~GF%yM zi6S8c2(T87zUcpVlo1(l|F>D%0LAW_}?#Vut&BB&o{zZhA^f&GFx^y+cxBH6! z{Oqp(w`qMke~gnTUtWiiO7-}kC%$fh%D}dp6Bb^2>m80!%pz2wRlWP4>mMK|r40El HVG{B`xB*W> literal 0 HcmV?d00001 diff --git a/site/templates/xslt-site/layouts/landing.html b/site/templates/xslt-site/layouts/landing.html index 5a98d3b..b991564 100644 --- a/site/templates/xslt-site/layouts/landing.html +++ b/site/templates/xslt-site/layouts/landing.html @@ -61,7 +61,7 @@

Find out what breaks

{{ with .Data.references.home }}

Used by

- {{template "reference-cards" .}} + {{template "reference-cards" (dict "Items" . "Base" $b)}}

All references, with the specifications and test suites it is verified against

{{ end }} diff --git a/site/templates/xslt-site/layouts/references.html b/site/templates/xslt-site/layouts/references.html index fe1354d..15298b4 100644 --- a/site/templates/xslt-site/layouts/references.html +++ b/site/templates/xslt-site/layouts/references.html @@ -11,7 +11,7 @@

{{ .Page.Title }}

Used by

- {{template "reference-cards" $r.usedBy}} + {{template "reference-cards" (dict "Items" $r.usedBy "Base" $b)}}

Using it too? Open an issue with a link and a sentence on what it does for you, and we will list it.

diff --git a/site/templates/xslt-site/partials/references.html b/site/templates/xslt-site/partials/references.html index 644c093..b22d272 100644 --- a/site/templates/xslt-site/partials/references.html +++ b/site/templates/xslt-site/partials/references.html @@ -1,11 +1,13 @@ {{/* Cards of the projects that use the library, on /references/ and in the - home page's "Used by" band. Items are the approved entries of - site/references/references.json (site/scripts/references.mjs drops the - others). No logos: none are approved yet, so each card is text only. + home page's "Used by" band. Called with (dict "Items" ... "Base" base_path); + items are the approved entries of site/references/references.json + (site/scripts/references.mjs drops the others). A logo, when its owner + allowed one, sits on a light plate so it reads in both colour schemes. */}} -{{define "reference-cards"}}
    - {{ range . }}
  • +{{define "reference-cards"}}{{ $b := .Base }}
      + {{ range .Items }}
    • + {{ with .logo }}{{ end }}

      {{ .name }}

      {{ .use }}