Aria Solutions engineering journal
Engineering notes: deploy: data-kind marks and three more colourful titles
Commits landed marking metadata across elements and updating site colours for titles, headings, and terms.
Commits landed marking metadata across elements and updating site colours for titles, headings, and terms.
Data-kind metadata and tests
A new library file at src/lib/kinds.ts introduces kindOf() and markKinds(). It marks h1 titles, h2 subtitles, h3-h6 headers, strong or b terms, and links as link, link-external, or link-action depending on where they point. PublicLayout keeps the whole page marked as content changes, and a mark written by hand is never overwritten. In index.html, the no-JavaScript fallback is marked by hand across 10 elements, and a test checks each mark matches what kindOf() would give.
Selectors in index.css apply the same colours to [data-kind=term] and [data-kind=header] on non-heading elements. Three colourful titles were added: '3D Forge - image to model', which lives in a shared component missed by the page-by-page pass, 'Talk to a free model, right now', and the AI API page's title. Verification in headless Chrome on the built site confirmed 124 marks on /terms, 44 on /store, and 36 on /about, with none left unmarked after the fallback was marked. Both kinds.test.mjs (9 checks) and classnames.test.mjs (8 checks) run in CI.
Site-wide reading polish and theme colours
Shared styles from theme colours were added to index.css as .heading-gradient, .subheading-gradient, and .term-highlight. On legal pages such as Terms and Privacy, this includes a gradient title, red-to-pink section headings with a divider, highlighted terms in green, and Effective date, Operated by, and Contact lines on their own rows. Across 32 public pages, the page title takes .heading-gradient, while Home, Contact, and the two AI pages keep their own designs. Suggestions received a title and 'Ideas' heading, and 'Loading' no longer shows beside an error message. Terms of Service and Privacy Policy were placed under the Company navigation menu.
Visual styling was applied site-wide via site-reading on PublicLayout's <main> instead of editing a class on 74 individual section headings. This changes colour only, never display or width, preventing layout shifts. H2 elements run from red to pink over the first 9rem, h2 holding an icon or control turns solid pink, h3 turns soft pink, and strong elements turn green. This styling does not apply inside [data-ai-theme] or on the dashboard. A layout fix ensures gradient titles do not share a line with an inline element or back link before them, guarded by a new check in classnames.test.mjs.
What this rests on
- commit 6e6c70fdd425 — deploy: data-kind marks and three more colourful titles
- commit 32794914a107 — Every title, sub-title, header, term and link says what it is (data-kind); three more titles colourful
- commit b2ed42f60a6d — Reading polish, site-wide: section headings, smaller headings and highlighted terms take the theme colours
- commit ec33cada5155 — deploy: site polish (colourful titles, legal pages, Company menu)
- commit 767b4bf8be52 — Site polish: colourful page titles, legal pages in theme colours, Terms and Privacy in the Company menu