style: Update default theme
This commit is contained in:
10
website/tools/copy-iis-web-config.mjs
Normal file
10
website/tools/copy-iis-web-config.mjs
Normal file
@@ -0,0 +1,10 @@
|
||||
import { copyFileSync, mkdirSync } from 'node:fs';
|
||||
import { dirname, resolve } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const websiteRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const source = resolve(websiteRoot, 'public/web.config');
|
||||
const destination = resolve(websiteRoot, 'dist/toju-website/web.config');
|
||||
|
||||
mkdirSync(dirname(destination), { recursive: true });
|
||||
copyFileSync(source, destination);
|
||||
22
website/tools/iis-release-config.test.mjs
Normal file
22
website/tools/iis-release-config.test.mjs
Normal file
@@ -0,0 +1,22 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { test } from 'node:test';
|
||||
|
||||
const webConfig = readFileSync(new URL('../public/web.config', import.meta.url), 'utf8');
|
||||
const deployScript = readFileSync(new URL('../../tools/deploy-web-apps.ps1', import.meta.url), 'utf8');
|
||||
const angularConfig = readFileSync(new URL('../angular.json', import.meta.url), 'utf8');
|
||||
|
||||
test('website web.config routes IIS requests through the Angular SSR server', () => {
|
||||
assert.match(webConfig, /iisnode/i);
|
||||
assert.match(webConfig, /server\.mjs/);
|
||||
assert.match(webConfig, /node_env/i);
|
||||
assert.match(webConfig, /api\/releases/i);
|
||||
});
|
||||
|
||||
test('IIS deployment publishes the full SSR output instead of only browser assets', () => {
|
||||
assert.match(deployScript, /website\\dist\\toju-website(?!\\browser)/);
|
||||
});
|
||||
|
||||
test('web.config is kept at the SSR release root, not copied as a browser asset', () => {
|
||||
assert.match(angularConfig, /"ignore":\s*\[\s*"web\.config"\s*\]/);
|
||||
});
|
||||
38
website/tools/website-design.test.mjs
Normal file
38
website/tools/website-design.test.mjs
Normal file
@@ -0,0 +1,38 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { test } from 'node:test';
|
||||
|
||||
const homeTemplate = readFileSync(new URL('../src/app/pages/home/home.component.html', import.meta.url), 'utf8');
|
||||
const homeStyles = readFileSync(new URL('../src/app/pages/home/home.component.scss', import.meta.url), 'utf8');
|
||||
const styles = readFileSync(new URL('../src/styles.scss', import.meta.url), 'utf8');
|
||||
|
||||
test('home page avoids common AI-generated visual patterns', () => {
|
||||
const bannedPatterns = [
|
||||
/Gradient orbs/i,
|
||||
/gradient-text/,
|
||||
/from-purple-600\s+to-violet-600/,
|
||||
/lg:grid-cols-3/,
|
||||
/blur-\[128px\]/
|
||||
];
|
||||
|
||||
for (const pattern of bannedPatterns) {
|
||||
assert.doesNotMatch(homeTemplate, pattern);
|
||||
}
|
||||
});
|
||||
|
||||
test('global palette uses a restrained product-led brand system', () => {
|
||||
assert.doesNotMatch(styles, /Inter:wght/);
|
||||
assert.doesNotMatch(styles, /hsl\(280\s+90%\s+70%\)/);
|
||||
assert.match(styles, /--primary:\s*\d+\s+\d+%\s+\d+%/);
|
||||
});
|
||||
|
||||
test('hero screenshot does not add duplicate app chrome', () => {
|
||||
assert.doesNotMatch(homeTemplate, /window-bar/);
|
||||
assert.doesNotMatch(homeStyles, /\.window-bar/);
|
||||
});
|
||||
|
||||
test('self-hostable section keeps title and copy in separate readable columns', () => {
|
||||
assert.doesNotMatch(homeStyles, /\.host-section\s*{[^}]*align-items:\s*end/s);
|
||||
assert.match(homeStyles, /\.host-section\s*{[^}]*align-items:\s*start/s);
|
||||
assert.match(homeStyles, /\.host-section-copy/);
|
||||
});
|
||||
Reference in New Issue
Block a user