Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .claude/skills/marketing-site/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,20 @@ Load `frontend-design` and follow its plan → review → build → critique pro

1. Ground it in the product: read `README.md`, the three tours (`docs/gifs/`) and the app's real tokens (`crates/ui/src/theme/tokens.rs`: palette, amber accent, density, dark base). The site should feel made by the same hands as the app, not from a template.
2. Real content only: encrypted multi-library vault, snippets with `{{fields}}`, Markdown notes, todo lists, canvas/board, quick-paste palette, HTTP/JSON/tools. Show real UI captures or live demos, not icons in cards.
3. Avoid: identical feature cards, SaaS hero with gradient and big stat, fade-up on every section, decorative blobs. One memorable element; the rest stays quiet.
3. Avoid: identical feature cards, SaaS hero with gradient and big stat, fade-up on every section, decorative blobs, a hue per section, a window redrawn where a capture would do. One memorable element; the rest stays quiet.

## What the design rests on

Chosen in #1655 among nine proposals; a new page is drawn from these, not from a template.

- **A construction grid, drawn** (`src/styles/_frame.scss`): one column between two hairlines down the whole page, sections between rules with a cross where they meet, each headed by a mono row with its number and name (`01 / L'application`). Content sits in hairline cells (`.cells`), never in floating cards; a large screen is filled by the grid, not by empty bands.
- **The application itself**: a real capture at the top (`app::screens` at 2×, one per language and theme), with numbered marks and a legend that says what each part does. No animation at the top of a page.
- **A developer's day**: the home page's moments are rows, words on the left, a scene on the right that moves the application's own pieces in its own words (`src/styles/_pieces.scss`, `home/day/`). A scene is written in its end state and only plays, on screen, when script and motion allow; on a wide screen the hour stands in the right margin.
- The application's palette and its two faces, Inter and JetBrains Mono, self-hosted: no other face.

4. It is an Angular project of its own in `website/`, outside the Cargo workspace: its own `package.json` and lockfile, `npm ci` from `website/`, and a dependency the site alone needs is still one the user approves first. It imports nothing from the application: the design tokens are a copy of `crates/ui/src/theme/tokens.rs` (`scripts/tokens.test.mjs` keeps them equal). The in-app desktop rules (egui, no router) do not apply there. A workflow publishes the build to the site's own repository; the public URL is a build input, never hard-coded, and canonical URLs, the sitemap and Open Graph tags are built from it.
5. Every route is prerendered (SSG): a client-rendered Angular page hands a crawler an empty `<app-root>`. Prove it on the build output: each route's built HTML carries its text without running JavaScript.
6. SEO, per route (`seo`): its own `<title>` and meta description, a canonical URL, an Open Graph image, a descriptive `<h1>`, real text rather than text in images, alt text on captures. `robots.txt` and `sitemap.xml` at the root. JSON-LD only for what the page shows (`SoftwareApplication` is the type that fits). `lang` on `<html>`, and `hreflang` pairs if the site ships in French and English.
7. Performance (`core-web-vitals`): the largest element above the fold, usually the hero capture, is in the initial HTML with explicit dimensions and priority (`NgOptimizedImage`: `ngSrc`, `width`, `height`, `priority`); fonts are self-hosted; nothing shifts when captures or fonts arrive. Measure before quoting a number.
7. Performance (`core-web-vitals`): the largest element above the fold, usually the hero capture, is in the initial HTML with explicit dimensions, `srcset` widths and `fetchpriority="high"`. A capture that differs by theme is a `<picture>` whose light source follows the system's theme until the site's is known: one file fetched, so no preload (it would fetch the other half's file). Fonts are self-hosted; nothing shifts when captures or fonts arrive. Measure before quoting a number.
8. Quality floor (`accessibility`): mobile to desktop, keyboard focus, reduced motion, AA contrast, 24×24 targets, no third-party trackers, download links to GitHub releases.
9. Tests assert the rendering, not the logic: Vitest + jsdom on the rendered page (heading outline, landmarks, accessible names, `alt` and dimensions, both locales holding the same keys), plus a check over the prerendered output. No HTML snapshots, and no e2e suite for the site; `webapp-testing` is only for looking at a built page in a real browser.
36 changes: 25 additions & 11 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -6769,17 +6769,31 @@ specs, `npm run lint` ESLint, `npm run test:scripts` the Node tests of the token
home page's canonical link, checks every page (one `h1`, a title, a canonical, no local
address, download links that answer, languages that name each other, structured data that
parses, a social image of 1200 × 630), and writes `sitemap.xml`, with each page's languages,
`robots.txt` and `404.html`. The two social images, `public/social-{fr,en}.png`, are captures of
the home page's window under its headline, made by hand in a browser: made again when it changes.
`public/.htaccess` serves `/docs/x` from `docs/x/index.html` without a redirect on the Apache
host.
- **The home page redraws the application in HTML** rather than showing screenshots. Each
feature (`home/feature.ts`) is a section whose scene is a pure function of a step and its
progress `t` (`ScenePlayer`): it plays once well in view, rests when it leaves the
screen, and a step clicked shows that step. The scroll is never held, except by the hero
board, which stays centred while its cards are filed; a phone gets a window drawn for its
width. Code inside a scene is data (`home/code-view.ts`): the template compiler drops the
whitespace between two elements, and a formatter would reflow it.
`robots.txt` and `404.html`. The two social images, `public/social-{fr,en}.png`, show the home
page's headline over the capture of the notes list, drawn by hand in a browser: made again when
either changes. `public/.htaccess` serves `/docs/x` from `docs/x/index.html` without a redirect
on the Apache host.
- **Every page stands on one construction grid** (`styles/_frame.scss`): a column between two
hairlines down the whole page, drawn by the root (`app.ts`), sections between rules with a cross
where they meet each hairline, and above each section a mono row with its number and name. `.col`
sets text inside the column, `.cells` lays cells edge to edge against the hairlines; the line
between two cells is the hairline's colour showing through a one-pixel gap. The column grows with
the screen up to 1600 px; from 1380 px the right gutter is wide enough to hold a page's own index.
- **The home page shows the application itself**: a capture of the notes list (`public/shots/`,
`app::screens`' `notes-list` drawn at twice its size by hand, the locale set and the seed
translated for each language, in both themes, at two widths). A `<picture>` fetches one file: the
light one when the system's theme is light, until the site's own theme is known. Six numbered
marks stand on it, at each language's places (`MARKS`: English keeps the search on the toolbar's
first row), and a legend of six cells says what each part does.
- **The day** (`home/day/`): ten moments, each a row whose scene moves the application's pieces
(`styles/_pieces.scss`). A scene is written in its end state, which is what a crawler, a page
without script and reduced motion show; `SceneLoop` puts it back to its start (`anim`) and plays
it (`run`) while it is on screen, again and again, each piece at its own `--d`; what CSS cannot
move (the arrows of a dragged shape) is moved on its `replay`. The words are the application's
own (`scene-words.ts`, from `crates/i18n` and the capture's seed). The hour follows the reading
point, in the right margin from 1380 px, in a bar under the header below. Text inside a scene is
interpolated where its spaces matter: the template compiler drops the whitespace between two
elements and collapses the rest.
- **The documentation is the Markdown of `docs/content/`**, one file per page and per language,
under one `index.json` (the pages in reading order, their group, colour, address and name);
`docs/content/README.md` says how to write a page, add one, add a language. Nothing is generated
Expand Down
Binary file added website/public/shots/notes-en-dark-1084.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/public/shots/notes-en-dark-2168.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/public/shots/notes-en-light-1084.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/public/shots/notes-en-light-2168.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/public/shots/notes-fr-dark-1084.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/public/shots/notes-fr-dark-2168.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/public/shots/notes-fr-light-1084.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added website/public/shots/notes-fr-light-2168.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified website/public/social-en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified website/public/social-fr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 68 additions & 24 deletions website/src/app/accessibility/accessibility-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const FR = {
description:
'Ce que devnotes.fr vise en matière d’accessibilité, ce qui est vérifié, ce qui ne l’est pas encore, et comment signaler un problème.',
heading: 'Accessibilité',
level: 'WCAG 2.2, niveau AA',
lede: 'Ce site vise le niveau AA des WCAG 2.2. Voici ce qui est vérifié, ce qui ne l’est pas encore, et comment signaler un problème.',
done: 'Ce qui est vérifié',
checks: [
Expand All @@ -35,6 +36,7 @@ const EN: typeof FR = {
description:
'What devnotes.fr aims at for accessibility, what is checked, what is not yet, and how to report a problem.',
heading: 'Accessibility',
level: 'WCAG 2.2, level AA',
lede: 'This site aims at WCAG 2.2, level AA. Here is what is checked, what is not yet, and how to report a problem.',
done: 'What is checked',
checks: [
Expand All @@ -60,41 +62,77 @@ const TEXT: Readonly<Record<Lang, typeof FR>> = { fr: FR, en: EN };
@Component({
selector: 'app-accessibility-page',
template: `
<section class="wrap statement" aria-labelledby="statement-h">
<h1 id="statement-h">{{ text().heading }}</h1>
<p class="lede">{{ text().lede }}</p>
<h2>{{ text().done }}</h2>
<ul>
@for (check of text().checks; track $index) {
<li>{{ check }}</li>
}
</ul>
<h2>{{ text().limits }}</h2>
<ul>
@for (limit of text().missing; track $index) {
<li>{{ limit }}</li>
}
</ul>
<h2>{{ text().report }}</h2>
<p>
{{ text().reportBefore }}<a [href]="issues">{{ text().reportLink }}</a
>{{ text().reportAfter }}
</p>
<section class="sec" aria-labelledby="statement-h">
<div class="sec-h col">
<span><b>01</b> / {{ text().heading }}</span
><span>{{ text().level }}</span>
</div>
<div class="head col">
<h1 id="statement-h">{{ text().heading }}</h1>
<p class="lede">{{ text().lede }}</p>
</div>
<div class="parts cells">
<div class="part">
<h2>{{ text().done }}</h2>
<ul>
@for (check of text().checks; track $index) {
<li>{{ check }}</li>
}
</ul>
</div>
<div class="part">
<h2>{{ text().limits }}</h2>
<ul>
@for (limit of text().missing; track $index) {
<li>{{ limit }}</li>
}
</ul>
</div>
</div>
<div class="report col">
<h2>{{ text().report }}</h2>
<p>
{{ text().reportBefore }}<a [href]="issues">{{ text().reportLink }}</a
>{{ text().reportAfter }}
</p>
</div>
</section>
`,
styles: `
.statement {
.head {
display: grid;
gap: 18px;
padding-block: clamp(48px, 8vw, 96px) 0;
padding-block: clamp(44px, 5vw, 64px) clamp(32px, 4vw, 48px);
}

.statement > * {
.head > *,
.report > * {
max-width: 44rem;
}

.parts {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1px;
border-block: 1px solid var(--line-soft);
background: var(--line-soft) content-box;
}

.part {
display: grid;
align-content: start;
gap: 14px;
padding: 32px var(--pad) 40px;
background: var(--bg-0);
}

.report {
display: grid;
gap: 12px;
padding-block: 36px 56px;
}

h2 {
margin-top: 22px;
font-size: 1.5rem;
letter-spacing: -0.02em;
}
Expand All @@ -116,6 +154,12 @@ const TEXT: Readonly<Record<Lang, typeof FR>> = { fr: FR, en: EN };
color: var(--amber-text);
text-underline-offset: 3px;
}

@media (max-width: 860px) {
.parts {
grid-template-columns: minmax(0, 1fr);
}
}
`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
Expand Down
2 changes: 1 addition & 1 deletion website/src/app/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ describe('App', () => {
const page = await renderPage(App);
const links = [...page.querySelectorAll<HTMLAnchorElement>('nav[aria-label="Principale"] a')];

expect(links.map((link) => link.getAttribute('href'))).toEqual(['/#snippets', '/docs', '/telecharger']);
expect(links.map((link) => link.getAttribute('href'))).toEqual(['/#journee', '/docs', '/telecharger']);
});
});
15 changes: 15 additions & 0 deletions website/src/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ import { SiteHeader } from './shell/site-header';
<app-site-footer />
`,
styles: `
/* The two hairlines of the construction grid, down every page, header and footer included. */
:host {
position: relative;
display: block;
}

:host::before {
content: '';
position: absolute;
inset: 0 var(--gr) 0 var(--gl);
z-index: 1;
border-inline: 1px solid var(--line-soft);
pointer-events: none;
}

.skip-link {
position: absolute;
left: 16px;
Expand Down
52 changes: 0 additions & 52 deletions website/src/app/core/page-progress.ts

This file was deleted.

12 changes: 9 additions & 3 deletions website/src/app/core/seo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@ export interface PageMeta {

const SITE_NAME = 'DevNotes';

/** The image of a shared link: the home page's window under its headline, one per language. */
/** The image of a shared link: the home page's headline over the application's capture, one per language. */
const SOCIAL: Readonly<Record<Lang, { readonly file: string; readonly alt: string }>> = {
fr: { file: '/social-fr.png', alt: 'La fenêtre de DevNotes : un espace et ses dossiers, en tableau.' },
en: { file: '/social-en.png', alt: 'The DevNotes window: a space and its folders, on a board.' },
fr: {
file: '/social-fr.png',
alt: 'DevNotes : « Vos snippets, vos notes, vos requêtes. », au-dessus de la liste des notes de l’application.',
},
en: {
file: '/social-en.png',
alt: 'DevNotes: “Your snippets, your notes, your requests.”, above the application’s list of notes.',
},
};

/**
Expand Down
4 changes: 3 additions & 1 deletion website/src/app/docs/doc-index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import index from '../../../../docs/content/index.json';
import { Lang } from '../core/lang';
import { Tone } from '../core/page-progress';

type PerLang = Readonly<Record<Lang, string>>;

/** A page's colour in the sidebar, as the tokens name its RGB triplet (`--green-rgb`). */
export type Tone = 'green' | 'blue' | 'purple' | 'teal' | 'olive' | 'pink' | 'grey' | 'amber';

/** `docs/content/index.json`, as it is written there. */
interface DocsIndex {
/** The version the pages were last checked against, by hand, in the application itself. */
Expand Down
2 changes: 1 addition & 1 deletion website/src/app/docs/docs-page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@let current = page();
<div class="wrap docs">
<div class="docs cells">
<div class="side">
<div class="find" role="search">
<label class="visually-hidden" for="docs-search">{{ text().search }}</label>
Expand Down
29 changes: 18 additions & 11 deletions website/src/app/docs/docs-page.scss
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
// The sidebar is drawn as the application's rail of spaces; the page, as a note opened beside it.
// Three columns kept together and centred: on a large screen the page grows wider and its text
// larger, rather than drifting apart.
// Three cells of the grid, the page between two hairlines: on a large screen it grows wider and its
// text larger, rather than drifting apart.
.docs {
display: grid;
grid-template-columns: minmax(220px, 264px) minmax(0, 62rem) minmax(180px, 220px);
justify-content: center;
gap: clamp(28px, 3.5vw, 64px);
max-width: clamp(86rem, 92vw, 120rem);
padding-top: clamp(28px, 4vw, 48px);
grid-template-columns: minmax(220px, 264px) minmax(0, 1fr) minmax(180px, 220px);
}

.side,
.toc {
position: sticky;
top: calc(var(--head-h) + 24px);
top: var(--head-h);
padding: 28px clamp(14px, 1.4vw, 22px);
align-self: start;
max-height: calc(100vh - var(--head-h) - 48px);
max-height: calc(100vh - var(--head-h));
overflow-y: auto;
}

Expand Down Expand Up @@ -151,6 +148,8 @@

.article {
min-width: 0;
padding: clamp(28px, 4vw, 48px) clamp(20px, 3.4vw, 56px) 72px;
border-inline: 1px solid var(--line-soft);
font-size: clamp(16px, 0.3vw + 11px, 18px);
display: grid;
gap: 22px;
Expand Down Expand Up @@ -263,7 +262,10 @@
@media (max-width: 1200px) {
.docs {
grid-template-columns: 220px minmax(0, 1fr);
justify-content: stretch;
}

.article {
border-right: 0;
}

.toc {
Expand All @@ -274,13 +276,18 @@
@media (max-width: 860px) {
.docs {
grid-template-columns: minmax(0, 1fr);
gap: 20px;
}

.side {
position: static;
max-height: none;
overflow: visible;
padding-block: 20px;
border-bottom: 1px solid var(--line-soft);
}

.article {
border-left: 0;
}

.side-toggle {
Expand Down
Loading