@vocdoni/skills 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +12 -2
- package/CHANGELOG.md +12 -0
- package/README.md +13 -0
- package/package.json +1 -1
- package/plugins/agentic-dev/.claude-plugin/plugin.json +1 -1
- package/plugins/agentic-dev/skills/subagent-driven-development/SKILL.md +10 -5
- package/plugins/agentic-dev/skills/subagent-driven-development/references/dispatch.md +20 -0
- package/plugins/agentic-dev/skills/subagent-driven-development/references/ledger.md +1 -0
- package/plugins/agentic-dev/skills/subagent-driven-development/scripts/task-brief.sh +2 -0
- package/plugins/agentic-dev/skills/subagent-driven-development/templates/plan.md +4 -0
- package/plugins/claude-pi-subagent/.claude-plugin/marketplace.json +1 -1
- package/plugins/claude-pi-subagent/plugins/pi-subagent/.claude-plugin/plugin.json +1 -1
- package/plugins/claude-pi-subagent/plugins/pi-subagent/dist/server.mjs +75 -12
- package/plugins/claude-pi-subagent/plugins/pi-subagent/package-lock.json +89 -89
- package/plugins/claude-pi-subagent/plugins/pi-subagent/package.json +2 -2
- package/plugins/claude-pi-subagent/plugins/pi-subagent/src/server.ts +1 -1
- package/plugins/vocdoni-ui-style/.claude-plugin/plugin.json +25 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/SKILL.md +99 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/components/chakra/product.tsx +263 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/components/shadcn/brand.tsx +195 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/components/shadcn/button.tsx +67 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/components/shadcn/status-badge.tsx +93 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/logo/vocdoni-logo-ink.svg +15 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/logo/vocdoni-logo-white.svg +15 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/logo/vocdoni-logo.svg +15 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/logo/vocdoni-mark-ink.svg +7 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/logo/vocdoni-mark-white.svg +7 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/logo/vocdoni-mark.svg +7 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/editorial-footer.webp +0 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/editorial-home-hero.webp +0 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/editorial-mobile.webp +0 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/editorial-stats-and-panels.webp +0 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/editorial-vertical-hero.webp +0 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/editorial-washes-and-comparison.webp +0 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/product-process-results.webp +0 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/reference/product-signin.webp +0 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/tokens/editorial.chakra.ts +285 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/tokens/editorial.css +847 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/tokens/editorial.tailwind.css +352 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/tokens/product.chakra.ts +410 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/tokens/product.css +1116 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/assets/tokens/product.tailwind.css +289 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/examples/editorial-landing.html +358 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/examples/email-vote-invitation.html +58 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/examples/product-auth.html +81 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/examples/product-builder.html +147 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/examples/product-dashboard.html +185 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/examples/product-voting.html +326 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/references/brand-core.md +166 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/references/editorial.md +198 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/references/product.md +173 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/references/recipes.md +264 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/references/stacks.md +196 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/references/ux-flows.md +110 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/bad-editorial.tsx +15 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/bad-product.tsx +9 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/doc.md +10 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/escaped.json +1 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/good-editorial.tsx +16 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/good-product.css +6 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/locale.json +1 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/multiline-attr.tsx +8 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/multiline-copy.tsx +10 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style-fixtures/regex-literal.tsx +5 -0
- package/plugins/vocdoni-ui-style/skills/vocdoni-ui-style/scripts/check-style.mjs +436 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# Editorial mode (vocdoni.io)
|
|
2
|
+
|
|
3
|
+
Warm, editorial, book-like. For marketing sites, landing and vertical pages, product launch pages, docs portals, blogs, case studies, pitch microsites, and any public page whose job is to persuade or explain. Source: vocdoni.io (`layouts/tailwind.css`, `DESIGN.md`, `components/`), values confirmed in the browser. Reference screenshots: `assets/reference/editorial-*.webp`.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- [The five pillars](#the-five-pillars)
|
|
8
|
+
- [Color](#color)
|
|
9
|
+
- [Typography](#typography)
|
|
10
|
+
- [Layout and spacing](#layout-and-spacing)
|
|
11
|
+
- [Radius and elevation](#radius-and-elevation)
|
|
12
|
+
- [Components](#components)
|
|
13
|
+
- [Page patterns](#page-patterns)
|
|
14
|
+
- [Motion](#motion)
|
|
15
|
+
- [Anti-patterns](#anti-patterns)
|
|
16
|
+
|
|
17
|
+
## The five pillars
|
|
18
|
+
|
|
19
|
+
1. **Cream, not white.** Every surface is warm cream `oklch(0.988 0.011 97)` (#fdfbf3). Pure white and neutral grays never appear.
|
|
20
|
+
2. **One ink, many alphas.** All text and lines are one warm ink `oklch(0.24 0.013 106)` (#202019) at fixed opacity tiers. There is no gray ramp.
|
|
21
|
+
3. **A single-weight display serif.** Headings are Fraunces at weight 400 with the SOFT axis at 100: rounded, warm, editorial. Never bold at display sizes.
|
|
22
|
+
4. **Deep green accent.** Vocdoni green `oklch(0.47 0.085 158)` (#296948) marks links, icons, chips, in-page CTAs. The top-level CTA is a dark ink button instead.
|
|
23
|
+
5. **Signal yellow as punctuation.** A butter-yellow dot (10px as rendered) precedes every section label (the eyebrow). That dot is the only place yellow exists.
|
|
24
|
+
|
|
25
|
+
## Color
|
|
26
|
+
|
|
27
|
+
Tokens (light; `.dark` values exist in the token files but vocdoni.io ships light-only):
|
|
28
|
+
|
|
29
|
+
| Token | OKLCH | Hex | Use |
|
|
30
|
+
| --- | --- | --- | --- |
|
|
31
|
+
| `--background` | `0.988 0.011 97` | #fdfbf3 | Page and card surfaces |
|
|
32
|
+
| `--foreground` | `0.24 0.013 106` | #202019 | Headings, primary copy |
|
|
33
|
+
| `--secondary` | `0.962 0.022 97` | #f6f3e2 | Tinted panels: dropdown intro columns, sidebars |
|
|
34
|
+
| `--muted` | `0.936 0.033 97` | #f0ead2 | Alternate section bands (often at 50%: `bg-muted/50`) |
|
|
35
|
+
| `--primary` | `0.47 0.085 158` | #296948 | Links, icons, chips, green CTAs, focus ring |
|
|
36
|
+
| `--surface-dark` | `0.235 0.012 107` | #1f1f18 | Dark CTA, dark panels |
|
|
37
|
+
| `--signal` | `0.93 0.11 102` | #f6eb93 | Eyebrow dots ONLY |
|
|
38
|
+
| `--success` | `0.45 0.12 152` | #006731 | Small status text/icons |
|
|
39
|
+
| `--warning` | `0.48 0.17 45` | #a52e00 | Small status text/icons |
|
|
40
|
+
| `--destructive` | `0.637 0.208 25.3` | #ef4444 | Errors, negative comparison marks |
|
|
41
|
+
|
|
42
|
+
Ink alpha tiers (text and lines on cream):
|
|
43
|
+
|
|
44
|
+
| Tier | Utility | Contrast | Use |
|
|
45
|
+
| --- | --- | --- | --- |
|
|
46
|
+
| 100% | `text-foreground` | 15.8:1 | Headings, primary copy, bold lead sentences |
|
|
47
|
+
| 65% | `text-foreground/65` | ~5.0:1 | Navbar links |
|
|
48
|
+
| 64% | `text-muted-foreground` | 4.9:1 | Ledes, descriptions, body on marketing pages |
|
|
49
|
+
| 68% | `text-faint` | 5.6:1 | Uppercase group labels, meta. A hierarchy convention: labels only, never paragraphs |
|
|
50
|
+
| 15% | `bg-foreground/15` | - | 1x12px navbar dividers |
|
|
51
|
+
| 10% | `border-border` | - | Every hairline |
|
|
52
|
+
| 7% | `bg-accent` | - | Hover fills (menu items, ghost buttons) |
|
|
53
|
+
|
|
54
|
+
Product washes: each Vocdoni product card gets one hue at 10% opacity, 20% on hover, with a round solid button of the same hue: green-600 (App), sky-600 (SDK), amber-600 (custom projects), red-600 (Petitions). These Tailwind hues appear nowhere else.
|
|
55
|
+
|
|
56
|
+
Data viz: `--chart-1..5` (muted blue/peach ramp). Hero mock results use `purple-500/80` bars; keep that to illustrations.
|
|
57
|
+
|
|
58
|
+
Code surfaces: `zinc-950` (#09090b) background, `zinc-100` text, JetBrains Mono, highlight.js colors (purple-400 keywords, emerald-400 strings, amber-400 types, blue-400 titles, zinc-500 italic comments).
|
|
59
|
+
|
|
60
|
+
## Typography
|
|
61
|
+
|
|
62
|
+
| Role | Face | Load |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| Body, UI, labels, card titles | Hanken Grotesk Variable | `@fontsource-variable/hanken-grotesk/wght.css` |
|
|
65
|
+
| Headings h1-h6 | Fraunces Variable | `@fontsource-variable/fraunces/full.css` (full = SOFT/WONK axes) |
|
|
66
|
+
| Code | JetBrains Mono Variable | `@fontsource-variable/jetbrains-mono/wght.css` |
|
|
67
|
+
|
|
68
|
+
Google Fonts equivalent: `family=Fraunces:opsz,wght,SOFT,WONK@9..144,100..900,0..100,0..1&family=Hanken+Grotesk:wght@100..900&family=JetBrains+Mono:wght@400;500`. Without the SOFT axis the serif renders sharp and generic instead of rounded.
|
|
69
|
+
|
|
70
|
+
Headings (global base layer): `font-family: serif; font-weight: 400; font-variation-settings: 'SOFT' 100, 'WONK' 0; letter-spacing: -0.03em; line-height: 1.02; text-wrap: balance`.
|
|
71
|
+
|
|
72
|
+
Scale (as rendered):
|
|
73
|
+
|
|
74
|
+
| Element | Size | Notes |
|
|
75
|
+
| --- | --- | --- |
|
|
76
|
+
| Hero h1 | `clamp(1.5rem, 9cqw, 4.75rem)`, leading 0.95 | Sized from its own container (`@container`, max-w-3xl) so it lands on three lines at every width (8.4cqw under a 20rem container). ~56px at 1440. The ratio is tuned for headlines of about 50-55 characters; a longer headline wraps to four lines on phones, so shorten the copy rather than shrinking the type. |
|
|
77
|
+
| Section h2, `display` | `text-4xl sm:text-5xl lg:text-6xl` (36/48/60px) | Page-opening sections |
|
|
78
|
+
| Section h2, `section` | `text-3xl sm:text-4xl lg:text-[2.75rem]` (30/36/44px) | Long pages with many sections |
|
|
79
|
+
| Dropdown intro title | 30px serif, leading 1.05, tracking -0.01em | |
|
|
80
|
+
| FAQ question / small serif heading | 16-18px serif, `font-medium` | Accordion triggers, panel headings |
|
|
81
|
+
| Card title | 18px sans `font-semibold`, leading snug | Feature cards, panels (sans, not serif) |
|
|
82
|
+
| Lede | 18px, `leading-relaxed`, `text-muted-foreground`, `max-w-2xl` | |
|
|
83
|
+
| Body | 16px (`text-base`), `leading-relaxed` | |
|
|
84
|
+
| UI text | 14-15px | Buttons 14px (the hero CTA adds `text-base`, 16px), nav 15px |
|
|
85
|
+
| Eyebrow | 14px `font-medium uppercase tracking-[0.11em] text-muted-foreground` | |
|
|
86
|
+
| Group label | 11-12px `font-semibold uppercase tracking-wider text-faint` | Panel group headers, "Built for", footer headings |
|
|
87
|
+
|
|
88
|
+
Weight rule: display headings (text-3xl and up) are always 400. At card-title and accordion sizes the site uses `font-medium`/`font-semibold`, mostly in the sans. Never `font-bold` or `font-black` on serif display text.
|
|
89
|
+
|
|
90
|
+
Globals: `text-wrap: pretty` on body, `balance` on headings, antialiasing, `optimizeLegibility`.
|
|
91
|
+
|
|
92
|
+
## Layout and spacing
|
|
93
|
+
|
|
94
|
+
- **Container**: `max-w-7xl` (1280px) centered, `px-4 sm:px-6 lg:px-8`. Navbar inner caps at 1408px. Narrow reading columns: `max-w-4xl`/`max-w-5xl`.
|
|
95
|
+
- **Section rhythm**: `py-section sm:py-section-md lg:py-section-lg` = 32 / 64 / 96px. Bands alternate `bg-background` with `bg-muted` or `bg-muted/50`, separated by color only (sometimes a hairline). Header-to-content gap: `mt-12 sm:mt-16`.
|
|
96
|
+
- **Spacing base**: Tailwind `--spacing: 0.3125rem` (5px), so `p-4` = 20px, `gap-6` = 30px, `h-9` = 45px, `size-2` = 10px, with explicit overrides (`1.5` = 8px, `3` = 14px, `3.5` = 17px, `5` = 26px, `7` = 34px, `11` = 54px, so `h-11` = 54px). vocdoni.io's own comment calls the base 6px; the value is 5px. Class strings copied from vocdoni.io assume this base; `editorial.tailwind.css` sets it.
|
|
97
|
+
- **Grids**: features `md:grid-cols-3 gap-4`; product washes `lg:grid-cols-2 gap-6`; hero `lg:grid-cols-2` with copy left, visual right.
|
|
98
|
+
- Overflow is clipped at `body` (`overflow-x: clip`, which keeps `position: sticky`); anchors offset by `scroll-padding-top: 5.5rem`.
|
|
99
|
+
|
|
100
|
+
## Radius and elevation
|
|
101
|
+
|
|
102
|
+
Radius: `--radius` 16px. `rounded-sm` 10px, `rounded-md` 12px (buttons, inputs), `rounded-lg` 16px (icon tiles, images), `rounded-xl`/`rounded-card` 20px (cards, panels), `rounded-3xl` 24px (FAQ shell, closing CTA box), `rounded-full` (chips, badges, icon buttons, closing pill CTA).
|
|
103
|
+
|
|
104
|
+
Shadows (restrained, ink-tinted):
|
|
105
|
+
|
|
106
|
+
| Token | Use |
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| `shadow-sm` (0 1px 2px / 8%) | Resting cards and raised panels |
|
|
109
|
+
| `shadow-lg` / `shadow-xl` | Hover lift (`.card-hover`), the featured mock card |
|
|
110
|
+
| `shadow-panel` | Dropdowns, popovers, cookie banner |
|
|
111
|
+
| `shadow-button` | Green primary button (ink ring + drop) |
|
|
112
|
+
| `shadow-inset-top` | 1px inner top highlight on the dark CTA |
|
|
113
|
+
|
|
114
|
+
Panel vocabulary (one card treatment per page, from `VerticalPanel`):
|
|
115
|
+
|
|
116
|
+
| Surface | Classes | Where |
|
|
117
|
+
| --- | --- | --- |
|
|
118
|
+
| `raised` | `bg-background border shadow-sm rounded-card` | Only on a tinted (`bg-muted`) section |
|
|
119
|
+
| `outline` | `border rounded-card` | Only on a plain section |
|
|
120
|
+
| `inset` | `bg-muted/50 border rounded-card` | Plain section, secondary grouping |
|
|
121
|
+
| `ledger` | `bg-border border grid gap-px overflow-hidden` | Many rows that read as one document; the 1px gaps draw the hairlines |
|
|
122
|
+
|
|
123
|
+
A panel never carries a shadow it cannot cast (no shadow on a transparent box). Interactive panels: `hover:border-primary/40` or `.card-hover`.
|
|
124
|
+
|
|
125
|
+
## Components
|
|
126
|
+
|
|
127
|
+
Implementations: `assets/components/shadcn/` (Tailwind + shadcn), `assets/tokens/editorial.css` (`vd-*` classes, no framework), `assets/tokens/editorial.chakra.ts` (Chakra v3).
|
|
128
|
+
|
|
129
|
+
**Buttons**
|
|
130
|
+
|
|
131
|
+
| Variant | Look | Use |
|
|
132
|
+
| --- | --- | --- |
|
|
133
|
+
| `dark` | `bg-surface-dark`, cream text, `font-semibold`, inset top highlight, 12px radius. Navbar: 45px tall (`size='sm'`, px-5 = 26px). Hero: 54px (`size='lg'` + `text-base`; px-6 = 30px because it carries an arrow icon, plain `lg` is px-8 = 40px). | The one top-level CTA per surface: navbar "Sign in", hero "Start for free". |
|
|
134
|
+
| `default` (green) | `bg-primary`, `shadow-button` | In-page CTAs, form submits, "Set up a test vote". As a closing CTA: `rounded-full h-12 px-8`. |
|
|
135
|
+
| `outline` | cream bg, 10% ink border, hover `bg-accent` | Secondary actions ("Talk to an election expert") |
|
|
136
|
+
| `ghost` / `secondary` / `link` | hover tints only / `bg-secondary` / green text, underline on hover | Tertiary |
|
|
137
|
+
| quiet text link | `text-sm font-medium text-muted-foreground hover:text-foreground`, min-h 44px, optional leading icon | Secondary hero action beside the dark CTA |
|
|
138
|
+
|
|
139
|
+
All buttons press to `scale(0.96)` on `:active` (150ms, `cubic-bezier(0.2,0,0,1)`); transitions list properties, never `all`. Trailing `ArrowRight` nudges `translate-x-0.5` on hover. Note: vocdoni.io's `DESIGN.md` calls the dark CTA a pill, but it renders with a 12px radius: the variant lists `rounded-full`, the size lists `rounded-md`, and tailwind-merge keeps the last one. Reproduce what renders; pass `rounded-full` explicitly for a real pill (as the closing CTA does).
|
|
140
|
+
|
|
141
|
+
**Eyebrow and section header**: `<SectionHeader eyebrow title lede align size />`. Eyebrow = `bg-signal` dot (`size-2`, 10px rendered) + uppercase label (`gap-2`), optional halo ring `0 0 0 4px signal/18%`. Then the serif heading, then the muted lede capped at `max-w-2xl`. Center-aligned by default; left-aligned when content follows in columns. A vertical page may put a lucide icon between dot and label ("FOR ASSOCIATIONS AND FEDERATIONS").
|
|
142
|
+
|
|
143
|
+
**Badges and chips**: badges `rounded-full px-2.5 py-0.5 text-xs font-semibold`; `secondary` (cream) for step labels, `success` (green 10% bg, 30% border, green text) for "Active election". Chips (hero "Built for" row): outlined pills 38px tall, 16px muted icon + 14px medium label, hover `bg-accent`.
|
|
144
|
+
|
|
145
|
+
**Cards**: `rounded-card border bg-card shadow-sm`; header `p-6`; title 18px sans semibold; description `text-sm text-muted-foreground`. Feature card = icon tile (`size-11 rounded-lg bg-primary/10 text-primary`, icon `size-5`) + title + description. Stat card = big green number (24px semibold `text-primary`) + two-line label.
|
|
146
|
+
|
|
147
|
+
**Inputs**: `h-10 rounded-md border border-input bg-background px-3`, 16px on mobile, 14px from `md`, placeholder `text-muted-foreground`, focus `ring-2 ring-ring ring-offset-2`.
|
|
148
|
+
|
|
149
|
+
**Navbar**: sticky, `bg-background/75 backdrop-blur-[14px] border-b`. Logo left (mark below `xl`, full lockup from `xl`). Centered links 15px at `text-foreground/65`, pill hover areas, separated by 1x12px dividers at ink 15%. Right: language switcher (globe + code), dark CTA. Mobile: ghost icon button opens a right `Sheet`; menu/close icons cross-fade with blur and scale.
|
|
150
|
+
|
|
151
|
+
**Dropdown panel** (MenuPanel): `rounded-2xl border bg-popover shadow-panel`, fades and rises in ~200ms. Left 264px `bg-secondary` intro column with a 30px serif title and a 14px (`text-sm`) muted description. Right: items `rounded-[10px] px-3 py-2 hover:bg-accent` with 15px medium title and 13px muted description; group labels 12px uppercase faint; optional hairline-topped "View all" footer with arrow.
|
|
152
|
+
|
|
153
|
+
**FAQ**: accordion inside `rounded-3xl border bg-background shadow-sm px-6 sm:px-8`; triggers 16-18px serif medium, `py-5`; answers `text-base leading-7 text-muted-foreground`; hairlines between items.
|
|
154
|
+
|
|
155
|
+
**Comparison table**: column heads in the serif (22px, muted), the Vocdoni column tinted `primary/8` with its head in green; cells pair a 20px `CircleCheck` (green) or `CircleX` (destructive) with 15px text; row labels muted; hairline rows.
|
|
156
|
+
|
|
157
|
+
**Footer**: cream, top hairline. Logo + 14px muted mission paragraph + social icons (muted, 24px). Three link columns with 12px uppercase faint headings; links 15px muted, hover ink; one "View all" link in ink medium. Centered uppercase legal row (12px, tracking 0.2em). Bottom row: "© 2026 Vocdoni. Made with ❤️ in Barcelona." (the one emoji on the site) and a GDPR badge.
|
|
158
|
+
|
|
159
|
+
**Marquee**: client logos scroll horizontally, edges faded with `.mask-gradient-x` (8%/92%), paused on hover.
|
|
160
|
+
|
|
161
|
+
## Page patterns
|
|
162
|
+
|
|
163
|
+
**Home hero** (`assets/reference/editorial-home-hero.webp`): left column = serif h1 (3 lines), lede with bold lead sentence, dark CTA with arrow + quiet secondary link (WhatsApp icon allowed), "Built for" group label + chip row ending in a green "All solutions →" link, "Trusted by" label + logo marquee. Right column (lg+) = three product-state cards on a vertical green gradient line with dashed connectors and ringed dots: census (eligible / not eligible rows), active election (participation bar, avatars), verified results (bars, "Legally valid" chip, hash). Cards enter with a spring from the right, staggered 0.3s.
|
|
164
|
+
|
|
165
|
+
**Vertical page** (e.g. associations, `editorial-vertical-hero.webp`): eyebrow with sector icon, sector-specific headline, sector lede, green CTA "Set up a test vote" + text link "Talk to an election expert", reassurance microline "Free account, no credit card.". Then a tinted trust band (sector logos, check row, three figures), problem section ("The position you are actually in"), guarantees as raised panels, numbered "how it runs" ledger (`01` in JetBrains Mono, serif row title, muted body, check list on the right), comparison table, legal section, FAQ, closing CTA pair.
|
|
166
|
+
|
|
167
|
+
**Section order for a landing**: hero, trust band, value/guarantees, product or how-it-works, comparison, testimonials/case studies, FAQ, closing CTA, footer. Alternate plain and muted bands.
|
|
168
|
+
|
|
169
|
+
**Docs** (vocdoni.io/developers):
|
|
170
|
+
|
|
171
|
+
- Grid: `lg:grid-cols-[15rem_minmax(0,1fr)] lg:gap-10`, adding a 14rem right TOC column at `xl` (`xl:grid-cols-[15rem_minmax(0,1fr)_14rem] xl:gap-12`). Below `lg` the sidebar moves into a sheet opened from a `PanelLeft` button.
|
|
172
|
+
- Sidebar: sticky `top-20 pb-10`, deliberately without its own scroll (the full section list always renders); group labels `text-xs font-semibold uppercase tracking-wide text-muted-foreground/80`; items `rounded-md px-3 py-1.5 text-sm`, idle `text-muted-foreground hover:bg-accent`, active `bg-primary/10 font-medium text-primary` with `aria-current="page"`.
|
|
173
|
+
- Article: breadcrumbs (`text-sm text-muted-foreground`, chevrons), serif h1, prose at `text-[15px] leading-7 text-muted-foreground`; h2 serif `text-2xl text-foreground mt-12 mb-4`; h3 `text-lg font-semibold`; strong in ink; links green `font-medium`, underline on hover; inline code `rounded-md border border-border/60 bg-muted/60 px-1.5 py-0.5 font-mono text-[0.85em]`; `hr` `my-10`.
|
|
174
|
+
- Code blocks: `rounded-xl border border-border/60 bg-zinc-950 shadow-sm`, optional tab strip (`bg-zinc-900/60`, `text-xs text-white/60`, active `bg-white/10 text-white`), body `p-4 font-mono text-[13px] leading-6 text-zinc-100`, copy button top right (`size-8 rounded-md border-white/10 bg-white/5`).
|
|
175
|
+
- TOC: sticky, scrolls on its own (`max-h-[calc(100vh-6rem)] overflow-y-auto`); "On this page" label, list with a left hairline; items `text-sm`, `pl-4` (h3 `pl-6`), active `border-l-2 border-primary font-medium text-primary`.
|
|
176
|
+
- Pager: two bordered cards (`rounded-xl border-border/60 p-4 hover:border-primary/40`), label `text-xs text-muted-foreground`, title `font-medium` turning green on hover.
|
|
177
|
+
|
|
178
|
+
## Motion
|
|
179
|
+
|
|
180
|
+
- Section reveals (`MotionPreset`): fade + slide (or blur) in when 240px from the viewport, once; springs (`stiffness 200, damping 20`), durations ~0.3-0.5s, small stagger (max 0.18s).
|
|
181
|
+
- Micro: `.press-scale` (0.96, 150ms), `.card-hover` (-4px + `shadow-xl`, 300ms), arrow nudge, rotating hero word (0.25s ease-out), shimmer for loading accents.
|
|
182
|
+
- Page transitions: content cross-fades 300ms.
|
|
183
|
+
- All of it disappears under `prefers-reduced-motion: reduce`; smooth scrolling only under `no-preference`.
|
|
184
|
+
- Transitions name their properties. Never `transition: all`.
|
|
185
|
+
|
|
186
|
+
## Anti-patterns
|
|
187
|
+
|
|
188
|
+
- White (`#fff`, `bg-white`) or neutral gray (`text-gray-*`, `bg-slate-*`) anywhere: use cream and ink alphas. The one exception is a small white tile behind a third-party logo that needs it.
|
|
189
|
+
- Hex literals in components instead of tokens.
|
|
190
|
+
- Yellow on anything larger than a dot.
|
|
191
|
+
- `text-faint` on paragraphs.
|
|
192
|
+
- Bold or black serif display headings; sans display headings where the serif belongs.
|
|
193
|
+
- Fraunces without the SOFT axis (loading `wght.css` instead of `full.css`).
|
|
194
|
+
- More than one dark CTA per view; green and dark competing as co-primaries.
|
|
195
|
+
- Gradient buttons, glass cards, glows, drop shadows on transparent boxes.
|
|
196
|
+
- Title Case, em dashes.
|
|
197
|
+
- `transition-all`, animations that ignore reduced motion.
|
|
198
|
+
- Version-suffixed components (`HeroV2`, `new-*`): extend variants instead.
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Product mode (vocdoni-app)
|
|
2
|
+
|
|
3
|
+
Neutral, light, white-label. For anything people use rather than read: organization dashboards, the election builder, public voting pages, voter authentication, results, member management, settings, pricing and checkout inside the app, admin and internal tools, embedded voting widgets. Source: vocdoni-app (`src/theme/*`, Chakra UI v3), values confirmed against computed styles on app.vocdoni.io. Reference screenshots: `assets/reference/product-*.webp`.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- [Principles](#principles)
|
|
8
|
+
- [Color](#color)
|
|
9
|
+
- [White-label accent](#white-label-accent)
|
|
10
|
+
- [Typography](#typography)
|
|
11
|
+
- [Radius, elevation, sizing](#radius-elevation-sizing)
|
|
12
|
+
- [Layouts](#layouts)
|
|
13
|
+
- [Components](#components)
|
|
14
|
+
- [Documents (results report PDF)](#documents-results-report-pdf)
|
|
15
|
+
- [Anti-patterns](#anti-patterns)
|
|
16
|
+
|
|
17
|
+
## Principles
|
|
18
|
+
|
|
19
|
+
1. **The organization is the protagonist.** Surfaces are white and neutral so an organization's logo, name and (optional) color carry the identity. Vocdoni's own presence is the logo in the top bar or a footer line.
|
|
20
|
+
2. **Light type, quiet chrome.** Inter at 300-400. Headings and buttons are weight 400; hierarchy comes from size, not weight. Borders are 1px zinc-200 hairlines; shadows are rare.
|
|
21
|
+
3. **Monochrome by default.** With no brand color the accent is near-black (#18181b): black buttons, black checked states, gray tints. Color is reserved for status (green/teal/yellow/red badges) and, on auth pages, the dark testimonial showcase.
|
|
22
|
+
4. **Dark mode is first-class.** Light, dark, and system preference (next-themes, `class` attribute, storage key `theme-preference`). Dark surfaces are near-black neutrals that are never tinted by the brand color.
|
|
23
|
+
|
|
24
|
+
## Color
|
|
25
|
+
|
|
26
|
+
Light (Chakra v3 defaults plus vocdoni-app overrides):
|
|
27
|
+
|
|
28
|
+
| Token (Chakra) | CSS var (`product.css`) | Value | Use |
|
|
29
|
+
| --- | --- | --- | --- |
|
|
30
|
+
| `bg` | `--bg` | #ffffff | Page, cards, dialogs |
|
|
31
|
+
| `bg.subtle` | `--bg-subtle` | #fcfcfc | Table headers, row hover |
|
|
32
|
+
| `bg.muted` | `--bg-muted` | #f5f5f5 | Tab rail, subtle buttons, filled sections |
|
|
33
|
+
| `bg.emphasized` | `--bg-emphasized` | #e4e4e7 | Pressed, active nav item (monochrome) |
|
|
34
|
+
| `fg` | `--fg` | #09090b | Text |
|
|
35
|
+
| `fg.muted` | `--fg-muted` | #52525b | Subtitles, descriptions, meta |
|
|
36
|
+
| `fg.subtle` | `--fg-subtle` | #b2b2b2 | Disabled text, faint icons |
|
|
37
|
+
| `border` | `--border` | #e4e4e7 | All hairlines, inputs, cards |
|
|
38
|
+
| `input.placeholder` | `--placeholder` | #737373 | Placeholders |
|
|
39
|
+
| `gray.solid` | `--brand-solid` | #18181b | Primary buttons, checked controls (monochrome) |
|
|
40
|
+
| `dashboard.menu` | `--dashboard-menu` | #fbfbfb | Sidebar background |
|
|
41
|
+
| `auth.bg` | `--auth-bg` | #fcfcfc | Auth page background |
|
|
42
|
+
|
|
43
|
+
Dark: page #0a0a0a (`ink.650`), panels #111111, `bg.muted` #3f3f3f, `fg` #fcfcfc, `fg.muted` #b2b2b2, `border` #27272a, sidebar #18181b, primary buttons white with black text.
|
|
44
|
+
|
|
45
|
+
Status palettes use Chakra's subtle pairs (palette.100 bg / palette.700 text in light; palette.900 / palette.300 in dark): green #dcfce7/#116932, teal #ccfbf1/#0c5d56, yellow #fef9c3/#845209, red #fee2e2/#991919, purple #f3e8ff/#641ba3, blue #dbeafe/#173da6, orange #ffedd5/#92310a. Mapping in `brand-core.md`.
|
|
46
|
+
|
|
47
|
+
## White-label accent
|
|
48
|
+
|
|
49
|
+
vocdoni-app reads one runtime value, `PRIMARY_COLOR` (`#rgb`/`#rrggbb`), and derives everything from it:
|
|
50
|
+
|
|
51
|
+
- A 50-950 scale by mixing toward white (tints 95/90/80/60/30%) and black (shades 15/30/45/60/75%) in OKLab; 500 is the color verbatim.
|
|
52
|
+
- Semantic slots per color mode: `solid` (500, or the first step reaching 3:1 against the page), `contrast` (white if it reaches 4.5:1 on solid, else black), `fg` 700/300, `muted` 200/800, `subtle` 100/900, `emphasized` 300/700, `focusRing` and `border` = solid. `product.chakra.ts` goes one step further than the app for `fg`: it walks 700→950 (300→50 in dark) until the text reaches 4.5:1, which only changes the result for pale brands such as white or yellow.
|
|
53
|
+
- The brand becomes the global `colorPalette`, so buttons, checkboxes, radios, switches, tabs, focus rings and the active nav item follow it. Surfaces never do.
|
|
54
|
+
|
|
55
|
+
Implementations: `createVocdoniProductSystem('#1a73e8')` in `assets/tokens/product.chakra.ts` (port with contrast picking); `<html data-brand style="--brand:#1a73e8">` with `product.css` / `product.tailwind.css` (OKLab `color-mix`, same tints). CSS cannot measure contrast: for very light or very dark brands also set `--brand-on` (label color), and in `product.css` `--brand-solid-light`/`--brand-solid-dark` and `--brand-fg-light`/`--brand-fg-dark`; compute them with `generatePaletteScale` and `contrastColor` from `product.chakra.ts`.
|
|
56
|
+
|
|
57
|
+
Leave the brand unset for Vocdoni's own surfaces. Set it only when the UI represents a specific organization.
|
|
58
|
+
|
|
59
|
+
## Typography
|
|
60
|
+
|
|
61
|
+
Inter everywhere (`body` and `heading` fonts), Menlo for code. Load 300, 400, 500 and 600 (`@fontsource/inter/{300,400,500,600}.css`); the app only loads up to 500, so its 600/800 spots render as faux bold, which you should not copy.
|
|
62
|
+
|
|
63
|
+
The weight tokens are shifted one step lighter: `normal` = 300, `medium` = 300, `bold` = 400, `bolder` = 500. As rendered:
|
|
64
|
+
|
|
65
|
+
| Element | Size / weight | Notes |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| Body | 16px / 400, line-height 1.5 | |
|
|
68
|
+
| Page heading (dashboard) | 24px (`2xl`) / 400 | With a 16px muted subtitle under it |
|
|
69
|
+
| Voting page title | 36px (`4xl`) / 400, left-aligned | |
|
|
70
|
+
| Section / auth title | 18-20px / 400, letter-spacing ~-0.03em | "Welcome" (sign-in), "Sign up" |
|
|
71
|
+
| Question title | 18px / 600 | Ballot questions |
|
|
72
|
+
| Choice label | 16px / 600 | Ballot options |
|
|
73
|
+
| Form label | 14px / 300 | Light labels are part of the look |
|
|
74
|
+
| Input, button text | 14px / 400 (16px inputs on mobile) | |
|
|
75
|
+
| Badge / tag | 12px / 300 | |
|
|
76
|
+
| Helper, meta | 12-14px / 400, `fg.muted` | |
|
|
77
|
+
| Overline | 12px uppercase, letter-spacing 0.1-0.16em, `fg.muted` | "VOTING IN PROGRESS", "SUCCESS STORIES" |
|
|
78
|
+
| Dialog title | 18px / 600 | The skill's normalization: the app asks for `extrabold` but loads Inter only up to 500, so it renders faux bold |
|
|
79
|
+
|
|
80
|
+
Text sizes (`text` recipe): xs 12/1.5, sm 14/1.43, md 16/1.5, lg 18/1.56, xl 20/1.5, 2xl 24/1.3. Links are underlined at rest (`from-font` thickness, 0.15em offset), gray-800, hover gray-500.
|
|
81
|
+
|
|
82
|
+
## Radius, elevation, sizing
|
|
83
|
+
|
|
84
|
+
Radii: `xs` 4px, `sm` 6px (buttons, inputs, tags, badges, tab triggers, nav items), `md` 8px (cards, boxes, dialogs, choice cards, results cards), `lg` 10px, `xl` 12px, `2xl` 16px, `full` (avatars, progress bars).
|
|
85
|
+
|
|
86
|
+
Elevation: almost none. Cards are flat with a 1px border. `shadow-xs` on the active tab, `shadow-md` on menus and popovers, `shadow-lg` on dialogs and toasts.
|
|
87
|
+
|
|
88
|
+
Sizes: control height 40px (`md`), 36px (`sm`), 32px (`xs`, sidebar CTA and table actions), 50px (sticky Vote button); sidebar 255px (48px collapsed); voting sidebar 320px; content max 1200px; voting page contents max 1560px (min 960px with the sidebar); top bar max 1920px; auth card max ~1152px.
|
|
89
|
+
|
|
90
|
+
## Layouts
|
|
91
|
+
|
|
92
|
+
**Dashboard shell** (`examples/product-dashboard.html`): sticky full-height left sidebar (255px, `#fbfbfb`, right border). Top to bottom: logo (mark when collapsed), full-width `xs` primary "+ New vote", section titles ("Platform", "Help") in small medium muted text, nav items (`listmenu`: 32px, 6px radius, 16px lucide icon + 14px label, hover `bg.muted`, active `colorPalette.200` + `aria-current="page"`), a dismissible "First steps" help card, and the user card (avatar, first name, organization, `ChevronsUpDown`) opening a popover with switch organization, account, theme, language, log out. Collapse toggle appears on hover; collapsed state persists in localStorage; collapsed items get right-side tooltips. Below 768px the sidebar becomes a start drawer behind a slim top bar (`PanelLeft` icon button, page action on the right). No global desktop top bar.
|
|
93
|
+
|
|
94
|
+
**Dashboard page**: `p-6`; heading 24px + muted subtitle; primary page action top right; sub-sections as the `settings` tab rail (gray `bg.muted` rail, p-1, white raised active tab with `shadow-xs`, 14px light labels, route-driven); content in bordered `DashboardBox`es (8px radius, p-4) or filled `DashboardSection`s.
|
|
95
|
+
|
|
96
|
+
**Public pages** (voting page, organization page): sticky blurred top bar (logo or the organization's logo left; language menu and color-mode toggle as `subtle` buttons right), content centered, footer with logo, "The global voting protocol"-style tagline, link columns, terms/privacy and social icon buttons. Voting page: main column + 320px sidebar from `xl`; below `xl` one column with the sidebar content after the header.
|
|
97
|
+
|
|
98
|
+
**Auth** (`examples/product-auth.html`): back link ("← Home" on sign-in, "← Back" elsewhere) and language menu above a bordered split card. Form column 52% (md) / 46% (lg); showcase 48% / 54%, hidden below `md`, min height 34rem/38rem. Showcase: deep desaturated tone derived from the quoted organization's logo (e.g. #302415, #251a42), white text at ~13:1, overline sector label, 24px quote, 16% white rule, author row with a white logo tile, logo watermark at ~9% bleeding off the bottom-right. Under the card: a trust sentence ending in a colon and a row of 48-52px logo tiles.
|
|
99
|
+
|
|
100
|
+
## Components
|
|
101
|
+
|
|
102
|
+
Implementations: `assets/tokens/product.chakra.ts` (system + recipes), `assets/components/chakra/product.tsx` (PageHeader, DashboardBox, DashboardSection, NavItem, DataListCard, StatusBadge, ResultsTag, ResultBar, SecurityLevel, ConfirmDialog), `assets/components/shadcn/status-badge.tsx`, `assets/tokens/product.css` (`vp-*` classes).
|
|
103
|
+
|
|
104
|
+
**Buttons**: 40px, 6px radius, 14px weight 400, px 16. `solid` (brand-solid bg, contrast text) for the primary; `outline` (zinc border, transparent) for secondary; `subtle` (#f5f5f5 bg, zinc-800 text) for chrome like language/theme toggles; `ghost` for Cancel/Back and icon buttons; `colorPalette="red"` solid for destructive confirms; red outline for "Delete" in toolbars. Full-width primaries in auth forms and voter flows. Buttons show Chakra `loading` during mutations and stay disabled until prerequisites resolve, with a visible hint.
|
|
105
|
+
|
|
106
|
+
**Inputs**: 40px, 6px radius, 1px zinc-200 border, transparent bg, 14px (16px under `md`), placeholder #737373, labels 14px light above with 6px gap, errors 12px red under the field. Password fields have an eye toggle. Builder titles use borderless inputs (24px, no border, no padding). OTP: 6-cell pin input, autofocus, auto-submit when complete.
|
|
107
|
+
|
|
108
|
+
**Badges / tags**: subtle palette pairs, 6px radius, 12px light text, `px-1 py-0.5` (xs). Count pills beside tab labels.
|
|
109
|
+
|
|
110
|
+
**Choice cards** (ballot): full-width `label` cards, 8px radius, 1px border, p-3, 12px gap between, native radio/checkbox, semibold label + muted description. Checked = border `fg` (black/white). Optional image cards in a 1/2/3-column grid with the control top-right; images 4:3 with a skeleton until loaded, opening a lightbox.
|
|
111
|
+
|
|
112
|
+
**Results**: per question a bordered card; for each choice the label left, "votes · percent" right (muted, tabular), a thin full-width bar under it (teal in the public view, gray in the SDK default). Hidden results: "The results will be made public when the process finishes on {date}."
|
|
113
|
+
|
|
114
|
+
**Alerts**: subtle palette backgrounds (info blue, success green, warning orange, error red), 8px radius, 20px icon, medium title + body.
|
|
115
|
+
|
|
116
|
+
**Toasts**: bottom center, `fit-content` up to 384px, indicator + short title + optional description and action. 3-5s for confirmations, 8-10s for actionable errors, persistent for connection loss and on-chain progress. Fixed ids so repeated triggers update one toast.
|
|
117
|
+
|
|
118
|
+
**Dialogs**: centered, 8px radius, 18px semibold title, muted 14px body, footer right-aligned with ghost Cancel then the confirm. Destructive confirms use red. Entity forms (add member, edit group, import) use end-placement drawers instead; short decisions use dialogs.
|
|
119
|
+
|
|
120
|
+
**Tables**: bordered wrapper (8px radius), `outline` variant, 12px medium muted headers on `bg.subtle`, 14px cells, numbers right-aligned tabular, last column a kebab (`EllipsisVertical`) menu with icon + label items. Pagination in the footer: rows-per-page select, "Page X of Y", `xs` outline buttons. Below 768px each row becomes a `data-list-item` card: title + kebab, badge row, "Label: value" lines.
|
|
121
|
+
|
|
122
|
+
**Security level**: three equal uppercase pills (Weak / Mid / Strong) with white text and a 2px border; only the current one colored (red-800/600, orange-800/600, green-800/600 bg/border), the others `gray.900`.
|
|
123
|
+
|
|
124
|
+
**Progress**: 8px rounded bar on `bg.muted`; indeterminate `xs` bar for loading lists. Usage meters orange at 80%, red at 100%.
|
|
125
|
+
|
|
126
|
+
**Empty states**: icon or illustration (48px), bold-ish 18px title, muted description, one CTA. For lists, an info alert above the list ("No voting processes found" / "Create a voting process to get started.").
|
|
127
|
+
|
|
128
|
+
**Loading**: thin indeterminate progress bar or small spinner with "Loading..."; skeletons only for images.
|
|
129
|
+
|
|
130
|
+
**Form controls** (`examples/product-builder.html` shows each one):
|
|
131
|
+
|
|
132
|
+
| Control | Spec |
|
|
133
|
+
| --- | --- |
|
|
134
|
+
| Text input / textarea | 40px, 6px radius, zinc-200 border, transparent bg, 14px (16px under `md`); focus = accent border + 1px ring; invalid = red border + 12px red message under the field (`aria-invalid`, `aria-describedby`). |
|
|
135
|
+
| Select | Same box as inputs with a chevron; react-select / Chakra `Select` for searchable lists (member groups) with counts in each option. |
|
|
136
|
+
| Checkbox / radio | 18px, accent-colored when checked, label 14px to the right; in ballots they live inside choice cards. |
|
|
137
|
+
| Switch | Track 36x20px, gray-200 off, accent on, white thumb; label left, control right, help text under the label. Used for "Start immediately", "Anonymous voting", "Extended info". |
|
|
138
|
+
| Radio cards | Bordered 8px cards with a title and one-line description; checked = `fg` border. Used for 2FA method and result visibility. |
|
|
139
|
+
| Date and time | Native `date` + `time` inputs side by side (two 40px fields), opening the picker on focus; validation messages under the pair. |
|
|
140
|
+
| Code (OTP) | One field, `inputmode="numeric"`, `autocomplete="one-time-code"`, letter-spaced 20px digits, auto-submit at 6 digits. The app renders six boxes (Chakra `PinInput`), which is fine only if each box is labeled and paste works. |
|
|
141
|
+
| Dropzone | Dashed 1px zinc-300 border, 8px radius, icon + "Drop a file or browse" + accepted types; drag-over state tints `bg.muted`. |
|
|
142
|
+
| Step marker | 24px circle with the step number: gray idle, orange current, red error, green done with a check. |
|
|
143
|
+
| Sentence with inline selects | "Voters must select at least [1] and at most [3] options." for min/max rules, instead of two labeled fields. |
|
|
144
|
+
|
|
145
|
+
**Charts and results**: result bars are thin (6-8px) rounded bars on `bg.muted`, one hue per question (teal in the public results, the brand color is fine in dashboards), label left, "votes · percent" right in tabular figures. Participation on the summary page is a blue striped bar. Avoid pies and donuts; for weighted votes show both "share of votes" and "share of voting power". Dark mode keeps the same hues one step lighter.
|
|
146
|
+
|
|
147
|
+
**Mobile voting**: one column; header, then the info block, then the ballot; the Vote button is sticky at the bottom with `padding-bottom: env(safe-area-inset-bottom)` and a white/`bg` backing so choices never hide behind it; dialogs go full width with 16px margins; banner images keep 3:1 and crop, never letterbox; choice cards keep a 48px minimum height.
|
|
148
|
+
|
|
149
|
+
## Documents (results report PDF)
|
|
150
|
+
|
|
151
|
+
The results certificate (vocdoni-app `Process/VotingReportPdf`, `@react-pdf/renderer`) has its own document look, closer to a legal report than to the app:
|
|
152
|
+
|
|
153
|
+
- A4 portrait; page padding 56pt sides, 36pt top, 56pt bottom; cover 62/52pt.
|
|
154
|
+
- Helvetica, 9.25pt body, 1.3 line height; ink `#172033` on paper `#fbfcfe`; secondary text `#4b5563`/`#5f6b7a`; hairlines `#d8dee8`/`#dde3eb`.
|
|
155
|
+
- One accent, teal `#18a3a8`: a 52x3pt hairline above the cover title, the underline of each section title, bullet markers; links `#0f7f86`.
|
|
156
|
+
- Cover: logo (128x28pt), uppercase document title ("TECHNICAL CERTIFICATION OF THE DIGITAL VOTING PROCESS"), process name in 24pt bold teal, "Process ID: …" subtitle above a hairline, an index, and the issue line.
|
|
157
|
+
- Running header on inner pages: small mark (18pt) over a bottom hairline.
|
|
158
|
+
- Numbered sections, 12.5pt bold with a teal underline: 1. Technical framework, 2. General information, 3. Authentication, 4. Census and participation, 5. Questions and results, 6. Verification, 7. Issuer.
|
|
159
|
+
- Key-value tables: white, 1pt `#dfe5ee` border, 2pt radius, 8pt labels, 9.25pt values. Results tables: option, votes, share of votes (and share of voting power / eligible power when weighted) with an inline bar.
|
|
160
|
+
- Close with the verification procedure (explorer link, process id) and the issuer statement and disclaimer.
|
|
161
|
+
|
|
162
|
+
Build other documents (minutes, invitations, receipts) on the same skeleton: white paper, one accent, numbered sections, key-value tables, a verification block.
|
|
163
|
+
|
|
164
|
+
## Anti-patterns
|
|
165
|
+
|
|
166
|
+
- Cream backgrounds, Fraunces, the yellow eyebrow dot or green brand CTAs in product mode (that is editorial mode).
|
|
167
|
+
- Semibold/bold headings and buttons: the product reads light (400).
|
|
168
|
+
- Tinting surfaces, sidebars or dark mode with the brand color.
|
|
169
|
+
- Colored primary buttons on Vocdoni's own surfaces (it is monochrome until an organization brand applies).
|
|
170
|
+
- Large radii (16px+) on controls; heavy shadows on cards.
|
|
171
|
+
- Title Case labels ("Add Member", "Confirm Vote"), even though older app strings use them.
|
|
172
|
+
- Status without text (color-only dots), or new status colors outside the mapping.
|
|
173
|
+
- Toasts for things that need a decision; dialogs for things that only need acknowledgment.
|