From 3cc74658c028878c0d9740b6f3a4fdb61b0e1762 Mon Sep 17 00:00:00 2001 From: Lucas Garron Date: Thu, 2 Jan 2025 21:27:16 -0800 Subject: [PATCH] Multiple source notices. --- script/build-site.ts | 8 +++++++- src/web/icons.cubing.net/index.html | 13 ++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/script/build-site.ts b/script/build-site.ts index 23662e5..a707440 100644 --- a/script/build-site.ts +++ b/script/build-site.ts @@ -1,3 +1,4 @@ +import assert from "node:assert"; import { cp, mkdir, readFile, rm, writeFile } from "node:fs/promises"; import { join } from "node:path"; import { JSDOM } from "jsdom"; @@ -64,6 +65,7 @@ for (const className of Object.values(CubingIcons).sort()) { } const allIconsElem = mustExist(document.querySelector("#all-icons")); +allIconsElem.textContent = ""; for (const className of classNamesOrdered) { const a = allIconsElem.appendChild(document.createElement("a")); a.href = `#${className}`; @@ -72,7 +74,11 @@ for (const className of classNamesOrdered) { span.classList.add(className); } -mustExist(document.querySelector("#source-notice")).remove(); +const notices = document.querySelectorAll(".source-notice"); +assert.equal(notices.length, 2); +for (const notice of notices) { + notice.remove(); +} for (const prefix of ["event", "unofficial", "penalty"]) { const [elem, ...extra] = document.getElementsByClassName(`group-${prefix}`); diff --git a/src/web/icons.cubing.net/index.html b/src/web/icons.cubing.net/index.html index 4b42e7d..f5c2e25 100644 --- a/src/web/icons.cubing.net/index.html +++ b/src/web/icons.cubing.net/index.html @@ -27,6 +27,12 @@

It's time for cubing icons!

+ +
+
+ Note: Only three icons are included in the source HTML in the repo. All icons are included in the compiled HTML.

Cubing icons can be used for any cubing project under a Icon catalog Icons are listed here with their CSS class names.

-
- Note: Only three icons from each group are included in the source HTML in the repo. +
+ Note: Only three icons from each group are included in the source HTML in the repo. All icons are included in + the compiled HTML.