ReviewOS

also looking at this

stacks/commshq

fix(ui): align component palette and contain homepage hero

#16
Merged glennmichael123 wants to merge fix/commshq-component-theme into main
7 files +157 -13

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

config/ui.tsmodified+6-0
Changes to config/ui.ts
@@ -35,6 +35,12 @@ export default {
3535
3636 partialsDir: 'partials',
3737
38 app: {
39 head: {
40 link: [{ rel: 'stylesheet', href: '/component-tokens.css' }],
41 },
42 },
43
3844 /*
3945 * stx's client-script DOM guard: 25 rules at script-validation.js:1-127,
4046 * run by process.js on every non-server <script> body. serve.js forwards the
public/component-tokens.cssadded+28-0
Changes to public/component-tokens.css
@@ -0,0 +1,28 @@
1/* Component defaults for the workspace, which otherwise uses literal colors.
2 * Zero specificity lets marketing/auth's existing :root palettes win regardless
3 * of stylesheet order. Theme selection still belongs to the existing bootstrap.
4 * Success/error hues match WorkspaceSurface; warning/info remain neutral.
5 */
6:where(:root) {
7 --paper: #f6f3ee;
8 --panel: #ffffff;
9 --ink: #171916;
10 --muted: #686b65;
11 --line: rgba(23, 25, 22, 0.15);
12 --coral: #bd3e2e;
13 --coral-ink: #ffffff;
14 --comms-success: #466833;
15 --comms-danger: #8f3025;
16}
17
18:where(:root.dark) {
19 --paper: #111210;
20 --panel: #1b1c1a;
21 --ink: #f5f2ec;
22 --muted: #aaa9a3;
23 --line: rgba(255, 255, 255, 0.15);
24 --coral: #ff8a78;
25 --coral-ink: #191715;
26 --comms-success: #acd294;
27 --comms-danger: #ffab9a;
28}
stx.config.tsmodified+3-0
Changes to stx.config.ts
@@ -1,8 +1,11 @@
11import type { StxConfig } from '@stacksjs/stx'
2import ui from './config/ui'
23
34const config: Partial<StxConfig> = {
45 root: 'resources',
56 layoutsDir: 'views/layouts',
7 // This root config takes precedence over config/ui.ts on the serve/build path.
8 app: ui.app,
69 build: {
710 sitemapExclude: ['/dashboard/'],
811 },