Design: add the orange second accent from the UZURON palette and split the colour roles (orange marks, green acts) in both themes; soften the dark green and lift the dark cards toward the page background. Background options for the next review are in design/background-options-2026-10-13/. Page: replace the process block with an individual-approach section; drop the budget form field; rename the contact field to a preferred channel; add a submit confirmation dialog, studio links (mail, VK, RuStore), the First Step Radio card, portfolio filters by platform, stack, genre and status, a cookie bar and a removable hero ticker. Cards keep the mascot face; the member window gains the real photo and the city. Planet: fold the speed knobs into SPEED_TAU and SPEED_MIN with a hard stop below the threshold; the pill is the only hover target and the summary card is inert. Repo: remove .pen backups from the index, ignore backups and Python artefacts, drop generated pen-sync exports.
109 lines
4.3 KiB
JavaScript
109 lines
4.3 KiB
JavaScript
/* Live-page verification of the two-accent scheme — wave 2026-10-13.
|
|
*
|
|
* Reads computed styles of the accent carriers on the served page
|
|
* (http://127.0.0.1:8765/src/), in BOTH themes, at 1440 and 390,
|
|
* with the dark theme switched by the real control (not by hand).
|
|
*
|
|
* Run:
|
|
* NODE_PATH="$LOCALAPPDATA/hermes/hermes-agent/node_modules" \
|
|
* node design/dark-palette/verify-live-2026-10-13.cjs
|
|
* Exit: 0 = all carriers match the spec, 1 = a mismatch.
|
|
*/
|
|
const { chromium } = require("playwright");
|
|
|
|
const EXE = process.env.CHROME_EXE ||
|
|
"C:/Users/deeen/AppData/Local/ms-playwright/chromium-1223/chrome-win64/chrome.exe";
|
|
const URL = process.env.PAGE_URL || "http://127.0.0.1:8765/src/";
|
|
|
|
const EXPECT = {
|
|
light: {
|
|
bg: "rgb(245, 238, 226)", // #F5EEE2
|
|
card: "rgb(255, 252, 247)", // #FFFCF7
|
|
cta: "rgb(0, 204, 102)", // #00CC66 green fill, unchanged
|
|
eyebrow: "rgb(156, 88, 0)", // #9C5800 orange text
|
|
dot: "rgb(255, 164, 0)", // #FFA400 orange marker
|
|
badge: "rgb(156, 88, 0)", // #9C5800
|
|
pressedBg: "rgb(255, 164, 0)", // #FFA400
|
|
pressedFg: "rgb(42, 21, 0)", // #2A1500
|
|
},
|
|
dark: {
|
|
bg: "rgb(24, 17, 9)", // #181109
|
|
card: "rgb(31, 22, 13)", // #1F160D raised towards the bg
|
|
cta: "rgb(34, 180, 107)", // #22B46B muted green
|
|
eyebrow: "rgb(231, 162, 35)", // #E7A223
|
|
dot: "rgb(209, 145, 26)", // #D1911A
|
|
badge: "rgb(231, 162, 35)", // #E7A223
|
|
pressedBg: "rgb(209, 145, 26)", // #D1911A
|
|
pressedFg: "rgb(42, 21, 0)", // #2A1500
|
|
},
|
|
};
|
|
|
|
const PROBE = () => {
|
|
const css = (sel) => {
|
|
const el = document.querySelector(sel);
|
|
return el ? getComputedStyle(el) : null;
|
|
};
|
|
const pressed = document.querySelector('.filter-chip[aria-pressed="true"]');
|
|
const pcs = pressed ? getComputedStyle(pressed) : null;
|
|
return {
|
|
theme: document.documentElement.getAttribute("data-theme") || "light",
|
|
bg: css("body") && css("body").backgroundColor,
|
|
card: css(".case-card") && css(".case-card").backgroundColor,
|
|
cta: css(".btn--primary") && css(".btn--primary").backgroundColor,
|
|
eyebrow: css(".eyebrow") && css(".eyebrow").color,
|
|
dot: css(".planet-tag__dot") && css(".planet-tag__dot").backgroundColor,
|
|
badge: css(".planet-tag__badge") && css(".planet-tag__badge").color,
|
|
pressedBg: pcs && pcs.backgroundColor,
|
|
pressedFg: pcs && pcs.color,
|
|
chips: document.querySelectorAll(".filter-chip").length,
|
|
eyebrows: document.querySelectorAll(".eyebrow").length,
|
|
};
|
|
};
|
|
|
|
(async () => {
|
|
const failures = [];
|
|
const browser = await chromium.launch({ executablePath: EXE });
|
|
|
|
for (const vp of [{ w: 1440, h: 900 }, { w: 390, h: 844 }]) {
|
|
const ctx = await browser.newContext({ viewport: { width: vp.w, height: vp.h } });
|
|
const page = await ctx.newPage();
|
|
await page.goto(URL, { waitUntil: "load" });
|
|
await page.waitForTimeout(400);
|
|
|
|
for (const mode of ["light", "dark"]) {
|
|
if (mode === "dark") {
|
|
const inBar = vp.w > 767;
|
|
const sel = inBar ? "#theme-toggle" : "#theme-toggle-panel";
|
|
if (!inBar) {
|
|
await page.click(".nav-toggle");
|
|
await page.waitForTimeout(250);
|
|
}
|
|
await page.click(sel);
|
|
await page.waitForTimeout(350);
|
|
}
|
|
// a pressed filter chip may not exist until a chip is used
|
|
if ((await page.evaluate(() => document.querySelectorAll('.filter-chip[aria-pressed="true"]').length)) === 0) {
|
|
const chip = await page.$(".filter-chip");
|
|
if (chip) { await chip.click(); await page.waitForTimeout(250); }
|
|
}
|
|
const got = await page.evaluate(PROBE);
|
|
const want = EXPECT[mode];
|
|
console.log(`== ${vp.w}px / ${mode} (data-theme=${got.theme}, eyebrows=${got.eyebrows}, chips=${got.chips})`);
|
|
for (const key of Object.keys(want)) {
|
|
const ok = got[key] === want[key];
|
|
console.log(` ${ok ? "ok " : "FAIL"} ${key.padEnd(10)} ${String(got[key]).padEnd(20)} want ${want[key]}`);
|
|
if (!ok) failures.push(`${vp.w}px/${mode}: ${key} = ${got[key]} (want ${want[key]})`);
|
|
}
|
|
}
|
|
await ctx.close();
|
|
}
|
|
|
|
await browser.close();
|
|
if (failures.length) {
|
|
console.log("\nFAIL:");
|
|
for (const f of failures) console.log(" -", f);
|
|
process.exit(1);
|
|
}
|
|
console.log("\nPASS: both themes carry the wave accents on the live page (1440 + 390).");
|
|
})();
|