@vocdoni/skills 0.1.0 → 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 +19 -0
- package/README.md +13 -0
- package/package.json +10 -2
- 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,326 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<!--
|
|
3
|
+
Product mode reference: the public voting page (vocdoni-app /processes/:id), plain HTML +
|
|
4
|
+
assets/tokens/product.css. Interactive walk-through of the voter flow:
|
|
5
|
+
Identify (dialog) -> choose -> Vote -> confirm summary -> blocking "processing" -> receipt.
|
|
6
|
+
Try ?brand=%231a73e8 to see the white-label accent, and the moon button for dark mode.
|
|
7
|
+
-->
|
|
8
|
+
<html lang="en">
|
|
9
|
+
<head>
|
|
10
|
+
<meta charset="utf-8" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
12
|
+
<title>General assembly 2026 - Vocdoni</title>
|
|
13
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
14
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
15
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap" />
|
|
16
|
+
<link rel="stylesheet" href="../assets/tokens/product.css" />
|
|
17
|
+
<style>
|
|
18
|
+
.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
|
|
19
|
+
.logo { height: 26px; width: auto; color: var(--fg); display: block; }
|
|
20
|
+
/* One column on mobile with the vote info right after the header (so Identify is reachable
|
|
21
|
+
without scrolling past the ballot); header + ballot left and a sticky sidebar from 1280px. */
|
|
22
|
+
.page { display: grid; grid-template-areas: 'head' 'aside' 'ballot'; gap: 24px 48px; max-width: 1240px; margin: 0 auto; padding: 32px 16px 96px; }
|
|
23
|
+
.page > .head { grid-area: head; min-width: 0; }
|
|
24
|
+
.page > .aside { grid-area: aside; }
|
|
25
|
+
.page > .ballot-col { grid-area: ballot; min-width: 0; }
|
|
26
|
+
@media (min-width: 1280px) { .page { grid-template-columns: minmax(0, 1fr) var(--voting-sidebar-w); grid-template-areas: 'head aside' 'ballot aside'; grid-template-rows: auto 1fr; padding-inline: 40px; } }
|
|
27
|
+
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 20px; font-size: 14px; color: var(--fg-muted); }
|
|
28
|
+
.desc { max-height: 120px; overflow: hidden; position: relative; font-size: 15px; line-height: 1.6; color: var(--fg-muted); }
|
|
29
|
+
.desc::after { content: ''; position: absolute; inset: auto 0 0; height: 48px; background: linear-gradient(transparent, var(--bg)); }
|
|
30
|
+
.ballot { margin-top: 24px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-md); }
|
|
31
|
+
.question + .question { margin-top: 40px; }
|
|
32
|
+
.question h2 { font-size: 18px; font-weight: 600; letter-spacing: normal; margin-bottom: 4px; }
|
|
33
|
+
.choices { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
|
|
34
|
+
.tip { margin-top: 12px; text-align: right; font-size: 14px; font-weight: 600; }
|
|
35
|
+
.vote-bar { position: sticky; bottom: 0; padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); background: var(--bg); }
|
|
36
|
+
.aside { display: flex; flex-direction: column; gap: 16px; }
|
|
37
|
+
@media (min-width: 1280px) { .aside { position: sticky; top: 80px; align-self: start; } }
|
|
38
|
+
.info-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
|
|
39
|
+
.info-row .i { margin-top: 2px; color: var(--fg-muted); }
|
|
40
|
+
.count { font-size: 14px; color: var(--fg-muted); }
|
|
41
|
+
.count strong { display: block; font-size: 36px; font-weight: 400; color: var(--fg); line-height: 1.2; }
|
|
42
|
+
dialog { border: 0; padding: 0; background: transparent; max-width: calc(100vw - 32px); }
|
|
43
|
+
dialog::backdrop { background: rgb(0 0 0 / 0.4); }
|
|
44
|
+
.otp { height: 48px; font-size: 20px !important; letter-spacing: 0.5em; text-align: center; font-variant-numeric: tabular-nums; }
|
|
45
|
+
.summary-q { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); display: flex; gap: 10px; }
|
|
46
|
+
.summary-q + .summary-q { margin-top: 12px; }
|
|
47
|
+
.spinner { width: 32px; height: 32px; border: 3px solid var(--bg-muted); border-top-color: var(--brand-solid); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 8px auto 16px; }
|
|
48
|
+
@keyframes spin { to { rotate: 360deg; } }
|
|
49
|
+
.receipt { font-family: var(--font-mono); font-size: 12px; word-break: break-all; }
|
|
50
|
+
[hidden] { display: none !important; }
|
|
51
|
+
</style>
|
|
52
|
+
</head>
|
|
53
|
+
<body>
|
|
54
|
+
<svg style="display: none" aria-hidden="true">
|
|
55
|
+
<symbol id="i-globe" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" /><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /><path d="M2 12h20" /></symbol>
|
|
56
|
+
<symbol id="i-moon" viewBox="0 0 24 24"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" /></symbol>
|
|
57
|
+
<symbol id="i-clock" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" /><path d="M12 6v6l4 2" /></symbol>
|
|
58
|
+
<symbol id="i-users" viewBox="0 0 24 24"><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" /><circle cx="9" cy="7" r="4" /><path d="M22 21v-2a4 4 0 0 0-3-3.87" /><path d="M16 3.13a4 4 0 0 1 0 7.75" /></symbol>
|
|
59
|
+
<symbol id="i-lock" viewBox="0 0 24 24"><rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" /></symbol>
|
|
60
|
+
<symbol id="i-check" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" /><path d="m9 12 2 2 4-4" /></symbol>
|
|
61
|
+
<symbol id="i-ext" viewBox="0 0 24 24"><path d="M15 3h6v6" /><path d="M10 14 21 3" /><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /></symbol>
|
|
62
|
+
</svg>
|
|
63
|
+
|
|
64
|
+
<!-- Public chrome: sticky blurred bar, logo (or the organization's), language, color mode -->
|
|
65
|
+
<header class="vp-topbar">
|
|
66
|
+
<a href="#" aria-label="Vocdoni"><svg class="logo" viewBox="0 0 1000 215" fill="currentColor" aria-hidden="true"><g transform="translate(-460,-433.082)">
|
|
67
|
+
<path d="m 648.53,548.952 -62.85,36.29 -62.84,-36.28 -62.84,-36.29 v 62.85 l 62.84,36.28 62.84,36.28 62.84,-36.28 62.85,-36.28 v -62.85 z" />
|
|
68
|
+
<path d="m 614.16,433.082 -62.84,36.28 v 62.85 l 62.84,-36.29 z" />
|
|
69
|
+
<path d="m 875.09,512.702 -50.43,97.7 -50.45,-97.7 h 29.28 l 21.17,41.08 21.17,-41.08 z" />
|
|
70
|
+
<path d="m 878.57,559.802 c 0,-14 4.8,-25.76 14.22,-35.18 9.62,-9.42 21.54,-14.22 35.57,-14.22 14.03,0 26,4.8 35.37,14.22 9.613,9.42 14.42,21.147 14.42,35.18 0,14 -4.81,25.76 -14.23,35.18 -9.42,9.42 -21.33,14 -35.56,14 -14.23,0 -26.15,-4.62 -35.57,-14 -9.42,-9.38 -14.22,-21.14 -14.22,-35.18 z m 27.87,0 c 0,6.92 2.12,12.69 6.16,17.11 2.037,2.127 4.483,3.82 7.192,4.977 2.708,1.156 5.623,1.752 8.568,1.752 2.945,0 5.86,-0.596 8.568,-1.752 2.709,-1.157 5.155,-2.85 7.192,-4.977 4,-4.42 6.15,-10.19 6.15,-17.11 0,-6.92 -2.11,-12.68 -6.15,-17.11 -2.039,-2.125 -4.485,-3.815 -7.194,-4.97 -2.708,-1.155 -5.622,-1.75 -8.566,-1.75 -2.944,0 -5.858,0.595 -8.567,1.75 -2.708,1.155 -5.155,2.845 -7.193,4.97 -4.04,4.43 -6.16,10.19 -6.16,17.11 z" />
|
|
71
|
+
<path d="m 1084.23,589.022 c -10.19,13.27 -23.83,20 -41.33,20 -14.22,0 -26.14,-4.62 -35.56,-14 -9.42,-9.38 -14.23,-21.14 -14.23,-35.18 0,-14.04 4.81,-25.76 14.23,-35.18 9.61,-9.42 21.53,-14.22 35.56,-14.22 15,0 28.07,6.34 39.41,18.84 l -18.48,17.84 c -6,-7.31 -12.69,-11 -20,-11 -13.07,0 -22.87,9.8 -22.87,23.64 0,13.84 9.8,23.65 22.87,23.65 8.27,0 15.57,-4 21.92,-12.3 z" />
|
|
72
|
+
<path d="m 1107.94,524.242 c 9,-9.23 20.38,-13.84 33.64,-13.84 9.81,0 17.88,2.69 24.22,8.26 v -46.52 h 27.3 v 134.76 h -26.91 v -6.73 c -6.15,6 -14.42,8.85 -24.61,8.85 -13.26,0 -24.61,-4.42 -33.64,-13.46 -9.03,-9.04 -13.46,-21 -13.46,-35.76 0,-14.61 4.42,-26.52 13.46,-35.56 z m 58.25,35.56 c 0,-7.11 -2.12,-13.07 -6.35,-17.68 -1.91,-2.245 -4.3,-4.032 -7,-5.229 -2.69,-1.198 -5.62,-1.776 -8.57,-1.691 -2.97,-0.065 -5.92,0.521 -8.65,1.717 -2.72,1.195 -5.15,2.971 -7.11,5.203 -4,4.61 -6.15,10.57 -6.15,17.68 0,7.11 2.11,13.08 6.15,17.69 1.97,2.231 4.39,4.006 7.12,5.201 2.72,1.195 5.67,1.782 8.64,1.719 2.95,0.083 5.88,-0.496 8.57,-1.693 2.69,-1.198 5.09,-2.984 7,-5.227 4.23,-4.61 6.35,-10.57 6.35,-17.69 z" />
|
|
73
|
+
<path d="m 1210,559.802 c 0,-14 4.81,-25.76 14.23,-35.18 9.61,-9.42 21.53,-14.22 35.57,-14.22 14.04,0 26,4.8 35.37,14.22 9.61,9.42 14.42,21.147 14.42,35.18 0,14 -4.81,25.76 -14.23,35.18 -9.42,9.42 -21.34,14 -35.56,14 -14.22,0 -26.15,-4.62 -35.57,-14 -9.42,-9.38 -14.23,-21.14 -14.23,-35.18 z m 27.88,0 c 0,6.92 2.11,12.69 6.15,17.11 2.04,2.128 4.48,3.821 7.19,4.977 2.71,1.157 5.63,1.753 8.57,1.753 2.95,0 5.87,-0.596 8.58,-1.753 2.7,-1.156 5.15,-2.849 7.19,-4.977 4,-4.42 6.15,-10.19 6.15,-17.11 0,-6.92 -2.11,-12.68 -6.15,-17.11 -2.04,-2.125 -4.49,-3.816 -7.2,-4.971 -2.71,-1.154 -5.62,-1.75 -8.57,-1.75 -2.94,0 -5.85,0.596 -8.56,1.75 -2.71,1.155 -5.16,2.846 -7.2,4.971 -4.04,4.43 -6.15,10.19 -6.15,17.11 z" />
|
|
74
|
+
<path d="m 1324.83,512.702 h 46.09 c 11.07,0.003 21.68,4.402 29.51,12.229 7.82,7.828 12.22,18.443 12.22,29.511 v 52.46 h -27.52 v -52.32 c -0.07,-4.423 -1.87,-8.643 -5.02,-11.756 -3.14,-3.113 -7.38,-4.873 -11.8,-4.904 h -16.21 v 69 h -27.27 z" />
|
|
75
|
+
<path d="m 1432.51,606.902 v -94.2 H 1460 v 94.2 z" />
|
|
76
|
+
<path d="m 1460,472.152 h -27.44 v 27.44 H 1460 Z" />
|
|
77
|
+
</g></svg></a>
|
|
78
|
+
<div style="display: flex; gap: 8px">
|
|
79
|
+
<button class="vp-btn vp-btn--subtle" aria-label="Change language"><svg class="i"><use href="#i-globe" /></svg> EN</button>
|
|
80
|
+
<button class="vp-btn vp-btn--subtle vp-btn--icon" aria-label="Toggle color mode" onclick="document.documentElement.classList.toggle('dark')"><svg class="i"><use href="#i-moon" /></svg></button>
|
|
81
|
+
</div>
|
|
82
|
+
</header>
|
|
83
|
+
|
|
84
|
+
<main class="page">
|
|
85
|
+
<div class="head">
|
|
86
|
+
<div style="display: flex; gap: 8px">
|
|
87
|
+
<span class="vp-badge vp-badge--green">Ongoing</span>
|
|
88
|
+
<span class="vp-badge vp-badge--purple">Hidden until the end</span>
|
|
89
|
+
</div>
|
|
90
|
+
<h1 class="vp-title-4xl" style="margin-top: 12px">General assembly 2026</h1>
|
|
91
|
+
<p class="meta">Voting from 20 Oct 2026, 09:00 to 30 Oct 2026, 20:00</p>
|
|
92
|
+
<div class="desc">
|
|
93
|
+
<p>The board submits the 2025 accounts, the 2026 budget and the renewal of two board seats to the members. Read the attached documents before voting. You can change your vote until polls close; only your last vote counts.</p>
|
|
94
|
+
</div>
|
|
95
|
+
<button class="vp-btn vp-btn--ghost vp-btn--sm" style="padding: 0; margin-top: 4px">Read more</button>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<aside class="aside" aria-label="Vote information">
|
|
99
|
+
<div class="vp-card"><div class="vp-card__body" style="display: grid; gap: 14px">
|
|
100
|
+
<div class="info-row"><svg class="i"><use href="#i-clock" /></svg><span>Ends in 6 days</span></div>
|
|
101
|
+
<div class="info-row"><svg class="i"><use href="#i-lock" /></svg><span><strong style="font-weight: 500">Anonymous vote</strong><br /><span class="vp-muted">Nobody, not even the organization, can see who voted what.</span></span></div>
|
|
102
|
+
<div class="info-row"><svg class="i"><use href="#i-users" /></svg><span>Census: 905 people</span></div>
|
|
103
|
+
</div></div>
|
|
104
|
+
<div class="vp-card"><div class="vp-card__body" style="display: grid; gap: 16px; text-align: center">
|
|
105
|
+
<span class="vp-overline">Voting in progress</span>
|
|
106
|
+
<p class="count"><strong>711</strong> votes</p>
|
|
107
|
+
<button class="vp-btn vp-btn--block" id="identifyBtn">Identify</button>
|
|
108
|
+
<div class="vp-alert vp-alert--success ph-no-capture" id="votedNote" hidden><svg class="i"><use href="#i-check" /></svg><span>Your vote is properly cast</span></div>
|
|
109
|
+
</div></div>
|
|
110
|
+
<a class="vp-btn vp-btn--outline vp-btn--block" href="#">Follow the process</a>
|
|
111
|
+
</aside>
|
|
112
|
+
|
|
113
|
+
<div class="ballot-col">
|
|
114
|
+
|
|
115
|
+
<div class="vp-tabs-line" role="tablist" style="margin-top: 24px">
|
|
116
|
+
<button class="vp-tab" role="tab" aria-selected="true">Questions</button>
|
|
117
|
+
<button class="vp-tab" role="tab" aria-selected="false" disabled>Results</button>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<form class="ballot ph-no-capture" id="ballot" novalidate>
|
|
121
|
+
<fieldset class="question" id="q1set" style="border: 0; margin: 0; padding: 0" aria-describedby="q1err">
|
|
122
|
+
<legend><h2>Do you approve the 2025 accounts?</h2></legend>
|
|
123
|
+
<div class="choices">
|
|
124
|
+
<label class="vp-choice"><input type="radio" name="q1" value="0" /><span><span class="vp-choice__label">Yes</span></span></label>
|
|
125
|
+
<label class="vp-choice"><input type="radio" name="q1" value="1" /><span><span class="vp-choice__label">No</span></span></label>
|
|
126
|
+
<label class="vp-choice"><input type="radio" name="q1" value="2" /><span><span class="vp-choice__label">Abstain</span></span></label>
|
|
127
|
+
</div>
|
|
128
|
+
<p class="vp-field-error" id="q1err" role="alert" hidden style="margin-top: 8px">Select one option</p>
|
|
129
|
+
</fieldset>
|
|
130
|
+
<fieldset class="question" id="q2set" style="border: 0; margin: 40px 0 0; padding: 0" aria-describedby="q2err">
|
|
131
|
+
<legend><h2>Elect two board members</h2></legend>
|
|
132
|
+
<p class="vp-muted vp-text-sm">Select up to 2 candidates.</p>
|
|
133
|
+
<div class="choices">
|
|
134
|
+
<label class="vp-choice"><input type="checkbox" name="q2" value="0" /><span><span class="vp-choice__label">Teresa Jordà</span><br /><span class="vp-choice__desc">Treasurer since 2022. Proposes quarterly open accounts.</span></span></label>
|
|
135
|
+
<label class="vp-choice"><input type="checkbox" name="q2" value="1" /><span><span class="vp-choice__label">Etna Estrems</span><br /><span class="vp-choice__desc">Coordinates the volunteer network.</span></span></label>
|
|
136
|
+
<label class="vp-choice"><input type="checkbox" name="q2" value="2" /><span><span class="vp-choice__label">Marc Puig</span><br /><span class="vp-choice__desc">New candidate. Focus on member services.</span></span></label>
|
|
137
|
+
</div>
|
|
138
|
+
<p class="tip" id="q2tip">0/2 selected</p>
|
|
139
|
+
<p class="vp-field-error" id="q2err" role="alert" hidden>Select at least one option</p>
|
|
140
|
+
</fieldset>
|
|
141
|
+
<div class="vote-bar">
|
|
142
|
+
<button class="vp-btn vp-btn--lg vp-btn--block" type="submit" id="voteBtn" disabled>Vote</button>
|
|
143
|
+
</div>
|
|
144
|
+
</form>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
</main>
|
|
148
|
+
|
|
149
|
+
<!-- 1. Voter authentication (CSP): census fields, then a 6-digit code -->
|
|
150
|
+
<dialog id="authDlg" aria-labelledby="authTitle">
|
|
151
|
+
<form class="vp-dialog ph-no-capture" id="authForm" novalidate>
|
|
152
|
+
<div class="vp-dialog__header" id="authTitle">Authentication</div>
|
|
153
|
+
<div class="vp-dialog__body" style="display: grid; gap: 14px; color: var(--fg)">
|
|
154
|
+
<div id="authStep0" style="display: grid; gap: 14px">
|
|
155
|
+
<div class="vp-field"><label class="vp-label" for="memberNo">Member number</label><input class="vp-input" id="memberNo" placeholder="12345" required aria-describedby="memberNoErr" /><span class="vp-field-error" id="memberNoErr" hidden>This field is required</span></div>
|
|
156
|
+
<div class="vp-field"><label class="vp-label" for="email">Email</label><input class="vp-input" id="email" type="email" placeholder="your@email.com" autocomplete="email" required aria-describedby="emailHelp emailErr" /><span class="vp-helper" id="emailHelp"><strong style="font-weight: 500">Important:</strong> must match the one registered in the system.</span><span class="vp-field-error" id="emailErr" hidden>Enter a valid email address</span></div>
|
|
157
|
+
<label class="vp-check"><input type="checkbox" id="terms" required aria-describedby="termsErr" /> <span>I accept the <a class="vp-link" href="#">terms of use</a></span></label>
|
|
158
|
+
<span class="vp-field-error" id="termsErr" hidden>Accept the terms to continue</span>
|
|
159
|
+
</div>
|
|
160
|
+
<div id="authStep1" hidden style="display: grid; gap: 8px">
|
|
161
|
+
<label class="vp-label" for="otp">Verification code</label>
|
|
162
|
+
<!-- One field, not six boxes: one label, paste and autofill work, screen readers announce it once -->
|
|
163
|
+
<input class="vp-input otp" id="otp" inputmode="numeric" autocomplete="one-time-code" pattern="[0-9]{6}" placeholder="000000" disabled aria-describedby="otpHelp otpErr" />
|
|
164
|
+
<span class="vp-helper" id="otpHelp">We sent a 6-digit code to your email.</span>
|
|
165
|
+
<span class="vp-field-error" id="otpErr" hidden>Enter the 6 digits of the code</span>
|
|
166
|
+
<p class="vp-helper">Didn't receive the code? <button class="vp-btn vp-btn--ghost vp-btn--xs" type="button">Resend it</button></p>
|
|
167
|
+
<p class="vp-helper">Wrong details? <button class="vp-btn vp-btn--ghost vp-btn--xs" type="button" id="startOver">Start over</button></p>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
<div class="vp-dialog__footer">
|
|
171
|
+
<button class="vp-btn vp-btn--ghost" type="button" id="authCancel">Cancel</button>
|
|
172
|
+
<button class="vp-btn" id="authNext" type="submit">Receive code</button>
|
|
173
|
+
</div>
|
|
174
|
+
</form>
|
|
175
|
+
</dialog>
|
|
176
|
+
|
|
177
|
+
<!-- 2. Confirm: what will be cast, per question -->
|
|
178
|
+
<dialog id="confirmDlg" aria-labelledby="confirmTitle">
|
|
179
|
+
<div class="vp-dialog ph-no-capture" style="max-width: 520px">
|
|
180
|
+
<div class="vp-dialog__header" id="confirmTitle">Confirm your vote</div>
|
|
181
|
+
<div class="vp-dialog__body"><p style="margin-bottom: 12px">General assembly 2026. You are voting for:</p><div id="summary"></div></div>
|
|
182
|
+
<div class="vp-dialog__footer">
|
|
183
|
+
<button class="vp-btn vp-btn--ghost" id="confirmCancel">Cancel</button>
|
|
184
|
+
<button class="vp-btn" id="confirmOk">Confirm vote</button>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</dialog>
|
|
188
|
+
|
|
189
|
+
<!-- 3. Blocking progress: no Escape, no backdrop close -->
|
|
190
|
+
<dialog id="busyDlg" aria-labelledby="busyTitle">
|
|
191
|
+
<div class="vp-dialog" style="text-align: center; padding: 24px">
|
|
192
|
+
<div class="spinner" aria-hidden="true"></div>
|
|
193
|
+
<p id="busyTitle" style="font-weight: 500">We are processing your vote</p>
|
|
194
|
+
<p class="vp-muted vp-text-sm" style="margin-top: 6px">This takes a few seconds. Please do not close or refresh this page.</p>
|
|
195
|
+
</div>
|
|
196
|
+
</dialog>
|
|
197
|
+
|
|
198
|
+
<!-- 4. Receipt -->
|
|
199
|
+
<dialog id="doneDlg" aria-labelledby="doneTitle">
|
|
200
|
+
<div class="vp-dialog ph-no-capture">
|
|
201
|
+
<div class="vp-dialog__header" id="doneTitle">Vote submitted</div>
|
|
202
|
+
<div class="vp-dialog__body" style="display: grid; gap: 12px">
|
|
203
|
+
<p>Your vote has been securely cast. You can verify it on the explorer:</p>
|
|
204
|
+
<a class="vp-link receipt" href="#">0x7f3a9c1e5b2d48f0a6c3e9b1d7f2a4c8e6b0d3f5a9c1e7b2d4f6a8c0e3b5d7f9 <svg class="i" style="width: 12px; height: 12px; vertical-align: -1px"><use href="#i-ext" /></svg></a>
|
|
205
|
+
<div class="vp-alert vp-alert--warning"><span><span class="vp-alert__title">Anonymous vote:</span> save this receipt now. The platform cannot show it to you again.</span></div>
|
|
206
|
+
</div>
|
|
207
|
+
<div class="vp-dialog__footer"><button class="vp-btn" onclick="this.closest('dialog').close()">Close</button></div>
|
|
208
|
+
</div>
|
|
209
|
+
</dialog>
|
|
210
|
+
|
|
211
|
+
<script>
|
|
212
|
+
// Demo-only state machine. The real flow calls the voting SDK at each step.
|
|
213
|
+
const brand = new URLSearchParams(location.search).get('brand')
|
|
214
|
+
if (brand) {
|
|
215
|
+
document.documentElement.style.setProperty('--brand', brand)
|
|
216
|
+
document.documentElement.setAttribute('data-brand', '')
|
|
217
|
+
}
|
|
218
|
+
const $ = (id) => document.getElementById(id)
|
|
219
|
+
const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches
|
|
220
|
+
$('identifyBtn').onclick = () => $('authDlg').showModal()
|
|
221
|
+
// Inline errors on submit; the first invalid field gets focus.
|
|
222
|
+
const check = (fields) => {
|
|
223
|
+
let first = null
|
|
224
|
+
for (const [input, err] of fields) {
|
|
225
|
+
const ok = input.checkValidity()
|
|
226
|
+
$(err).hidden = ok
|
|
227
|
+
input.setAttribute('aria-invalid', String(!ok))
|
|
228
|
+
if (!ok && !first) first = input
|
|
229
|
+
}
|
|
230
|
+
first?.focus()
|
|
231
|
+
return !first
|
|
232
|
+
}
|
|
233
|
+
$('authForm').onsubmit = (e) => {
|
|
234
|
+
e.preventDefault()
|
|
235
|
+
if ($('authStep1').hidden) {
|
|
236
|
+
if (!check([[$('memberNo'), 'memberNoErr'], [$('email'), 'emailErr'], [$('terms'), 'termsErr']])) return
|
|
237
|
+
$('authStep0').hidden = true
|
|
238
|
+
$('authStep1').hidden = false
|
|
239
|
+
$('otp').disabled = false
|
|
240
|
+
$('otp').required = true
|
|
241
|
+
$('otp').focus()
|
|
242
|
+
$('authNext').textContent = 'Identify'
|
|
243
|
+
return
|
|
244
|
+
}
|
|
245
|
+
if (!check([[$('otp'), 'otpErr']])) return
|
|
246
|
+
$('authDlg').close()
|
|
247
|
+
// No success toast: the enabled Vote button is the confirmation.
|
|
248
|
+
$('identifyBtn').hidden = true
|
|
249
|
+
$('voteBtn').disabled = false
|
|
250
|
+
$('voteBtn').focus()
|
|
251
|
+
}
|
|
252
|
+
// Accept pasted codes like "481 902": keep digits only, then auto-submit at six, as the app does.
|
|
253
|
+
$('otp').addEventListener('input', (e) => {
|
|
254
|
+
const digits = e.target.value.replace(/\D/g, '').slice(0, 6)
|
|
255
|
+
if (e.target.value !== digits) e.target.value = digits
|
|
256
|
+
if (digits.length === 6) $('authForm').requestSubmit()
|
|
257
|
+
})
|
|
258
|
+
const resetAuth = () => {
|
|
259
|
+
$('authStep1').hidden = true
|
|
260
|
+
$('authStep0').hidden = false
|
|
261
|
+
$('otp').value = ''
|
|
262
|
+
$('otp').disabled = true
|
|
263
|
+
$('otp').required = false
|
|
264
|
+
$('otpErr').hidden = true
|
|
265
|
+
$('authNext').textContent = 'Receive code'
|
|
266
|
+
}
|
|
267
|
+
$('startOver').onclick = () => {
|
|
268
|
+
resetAuth()
|
|
269
|
+
$('memberNo').focus()
|
|
270
|
+
}
|
|
271
|
+
$('authCancel').onclick = () => {
|
|
272
|
+
resetAuth()
|
|
273
|
+
$('authDlg').close()
|
|
274
|
+
}
|
|
275
|
+
const q2 = [...document.querySelectorAll('input[name=q2]')]
|
|
276
|
+
q2.forEach((c) =>
|
|
277
|
+
c.addEventListener('change', () => {
|
|
278
|
+
const n = q2.filter((x) => x.checked).length
|
|
279
|
+
if (n > 2) c.checked = false
|
|
280
|
+
$('q2tip').textContent = `${Math.min(n, 2)}/2 selected`
|
|
281
|
+
})
|
|
282
|
+
)
|
|
283
|
+
$('ballot').onsubmit = (e) => {
|
|
284
|
+
e.preventDefault()
|
|
285
|
+
const q1 = document.querySelector('input[name=q1]:checked')
|
|
286
|
+
const picked = q2.filter((x) => x.checked)
|
|
287
|
+
// One error per question, next to it; focus the first invalid choice.
|
|
288
|
+
$('q1err').hidden = !!q1
|
|
289
|
+
$('q2err').hidden = picked.length > 0
|
|
290
|
+
const firstInvalid = !q1 ? document.querySelector('input[name=q1]') : !picked.length ? q2[0] : null
|
|
291
|
+
if (firstInvalid) {
|
|
292
|
+
firstInvalid.closest('fieldset').scrollIntoView({ behavior: reduceMotion ? 'auto' : 'smooth', block: 'center' })
|
|
293
|
+
firstInvalid.focus({ preventScroll: true })
|
|
294
|
+
return
|
|
295
|
+
}
|
|
296
|
+
const label = (i) => i.closest('label').querySelector('.vp-choice__label').textContent
|
|
297
|
+
// Build with textContent: choice labels come from the organizer, never parse them as HTML.
|
|
298
|
+
const rows = [
|
|
299
|
+
['Do you approve the 2025 accounts?', label(q1)],
|
|
300
|
+
['Elect two board members', picked.map(label).join(', ')],
|
|
301
|
+
].map(([q, a]) => {
|
|
302
|
+
const row = document.createElement('div')
|
|
303
|
+
row.className = 'summary-q'
|
|
304
|
+
row.innerHTML = '<svg class="i" style="color: var(--green-fg); margin-top: 2px" aria-hidden="true"><use href="#i-check"/></svg><div><div class="q" style="font-weight: 500; color: var(--fg)"></div><div class="a"></div></div>'
|
|
305
|
+
row.querySelector('.q').textContent = q
|
|
306
|
+
row.querySelector('.a').textContent = a
|
|
307
|
+
return row
|
|
308
|
+
})
|
|
309
|
+
$('summary').replaceChildren(...rows)
|
|
310
|
+
$('confirmDlg').showModal()
|
|
311
|
+
}
|
|
312
|
+
$('confirmCancel').onclick = () => $('confirmDlg').close()
|
|
313
|
+
$('busyDlg').addEventListener('cancel', (e) => e.preventDefault())
|
|
314
|
+
$('confirmOk').onclick = () => {
|
|
315
|
+
$('confirmDlg').close()
|
|
316
|
+
$('busyDlg').showModal()
|
|
317
|
+
setTimeout(() => {
|
|
318
|
+
$('busyDlg').close()
|
|
319
|
+
$('doneDlg').showModal()
|
|
320
|
+
$('votedNote').hidden = false
|
|
321
|
+
$('voteBtn').textContent = 'Vote again'
|
|
322
|
+
}, 1600)
|
|
323
|
+
}
|
|
324
|
+
</script>
|
|
325
|
+
</body>
|
|
326
|
+
</html>
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Brand core (both modes)
|
|
2
|
+
|
|
3
|
+
What stays the same whether a surface is editorial (vocdoni.io) or product (vocdoni-app). Read this before either mode reference.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- [What the brand is](#what-the-brand-is)
|
|
8
|
+
- [Logo](#logo)
|
|
9
|
+
- [Voice and copy](#voice-and-copy)
|
|
10
|
+
- [Microcopy patterns](#microcopy-patterns)
|
|
11
|
+
- [Domain vocabulary](#domain-vocabulary)
|
|
12
|
+
- [Status semantics](#status-semantics)
|
|
13
|
+
- [Iconography](#iconography)
|
|
14
|
+
- [Accessibility](#accessibility)
|
|
15
|
+
- [Internationalization](#internationalization)
|
|
16
|
+
- [Imagery](#imagery)
|
|
17
|
+
|
|
18
|
+
## What the brand is
|
|
19
|
+
|
|
20
|
+
Vocdoni sells trust in a decision: that a vote was secret, counted correctly, and can be checked by anyone. Every visual and verbal choice serves that. The look is calm and precise rather than exciting; the voice explains consequences rather than selling. Proof beats claims: show a real product state, a number, a verification link, never a vague "military-grade security" badge.
|
|
21
|
+
|
|
22
|
+
Three consequences that hold in both modes:
|
|
23
|
+
|
|
24
|
+
- **Restraint.** One accent per surface, one primary action per view, no gradients on UI chrome, no decorative glassmorphism or neon. Emphasis comes from type size and whitespace.
|
|
25
|
+
- **Verifiability is a UI feature.** Receipts, explorer links, "results hidden until the end", census size, audit trails. Surface them; do not bury them in a footer.
|
|
26
|
+
- **Neutral toward the organization.** In product mode the organization voting is the protagonist (its name, logo, colors); Vocdoni recedes to the footer line "uses the Vocdoni platform".
|
|
27
|
+
|
|
28
|
+
## Logo
|
|
29
|
+
|
|
30
|
+
Files in `assets/logo/`:
|
|
31
|
+
|
|
32
|
+
| File | Use |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| `vocdoni-logo.svg` | Full lockup (mark + wordmark), `fill="currentColor"`. Inline it so it inherits text color. |
|
|
35
|
+
| `vocdoni-mark.svg` | Mark only: navbar below `xl`, collapsed sidebars, favicons, avatars. |
|
|
36
|
+
| `*-ink.svg` / `*-white.svg` | Fixed-color copies for `<img>`, email, PDF, where `currentColor` is unavailable. |
|
|
37
|
+
|
|
38
|
+
React: `VocdoniLogo` in `assets/components/shadcn/brand.tsx` (`minimal` prop for the mark).
|
|
39
|
+
|
|
40
|
+
Rules:
|
|
41
|
+
|
|
42
|
+
- Height 28px in navbars (`h-7`), 24-26px in product top bars and sidebars, 40px in footers. Width is always `auto`.
|
|
43
|
+
- Color is the text color of the surface: warm ink `#202019` on cream (editorial), `#09090b`/black on white and white on dark (product). Never green, never yellow, never a gradient, never outlined.
|
|
44
|
+
- Clear space: at least the height of the small mark block on every side. Do not place it on busy photography.
|
|
45
|
+
- The mark is two shapes: an open chevron (a ballot box seen from above) and a single bar (the ballot). Do not rotate, re-space or redraw them.
|
|
46
|
+
- Swap the full lockup for the mark when width is tight; do not shrink the wordmark below 20px height.
|
|
47
|
+
- In white-label product surfaces the organization's own logo replaces Vocdoni's in the top bar; Vocdoni appears as "Powered by" text or a small footer lockup.
|
|
48
|
+
|
|
49
|
+
## Voice and copy
|
|
50
|
+
|
|
51
|
+
Rules (enforced by `scripts/check-style.mjs` where mechanical):
|
|
52
|
+
|
|
53
|
+
1. **Sentence case everywhere.** Headings, buttons, menu items, tabs, dialog titles, table headers: only the first word, proper nouns, acronyms (GDPR, SDK, API, CSV) and "Vocdoni" are capitalized. "Configure voter authentication", not "Configure Voter Authentication". (Parts of vocdoni-app still use Title Case; that is legacy, not the rule.)
|
|
54
|
+
2. **No em dash (`—`) or en dash (`–`) as punctuation.** Use a spaced hyphen (` - `), a colon, or two sentences.
|
|
55
|
+
3. **Plain, concrete, calm.** Say what happens and what it means for the reader. Short sentences. No hype words ("revolutionary", "seamless", "cutting-edge", "unleash"), no exclamation marks except a rare success moment, no emoji in UI (the vocdoni.io footer line "Made with ❤️ in Barcelona" is the one exception).
|
|
56
|
+
4. **Explain consequences before irreversible actions.** Name the object and the effect: `Ending "General assembly 2026" is irreversible. Voters will no longer be able to vote.`
|
|
57
|
+
5. **Reassure with facts, not adjectives.** "Nobody, not even the organization, can see who voted what." (recommended wording) beats "Your vote is 100% secure."
|
|
58
|
+
6. **Second person, active voice.** "You can change your vote until polls close." The organization is "your organization"; voters are "members" or "voters".
|
|
59
|
+
|
|
60
|
+
Tone by surface (examples are live copy from vocdoni.io and vocdoni-app):
|
|
61
|
+
|
|
62
|
+
| Surface | Register | Example |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| Editorial headline | Confident, editorial, a little literary | "Trust is not a promise. It is a structural property." |
|
|
65
|
+
| Editorial lede | Concrete benefit + proof | "Most digital voting tools ask you to trust their results. Vocdoni gives you proof." |
|
|
66
|
+
| Vertical page | Speaks the sector's language | "Assemblies that reach quorum, and decisions that hold" |
|
|
67
|
+
| Product heading | Literal noun phrase | "Voting processes", "Memberbase", "Account information" |
|
|
68
|
+
| Product helper | One instructive sentence | "Pick the member details voters must enter to vote, like their ID or member number." |
|
|
69
|
+
| Voter-facing | Simplest words, zero jargon | "Your vote is properly cast" |
|
|
70
|
+
|
|
71
|
+
Editorial hero lede pattern: a bold (`font-medium text-foreground`) lead sentence followed by muted explanation in the same paragraph. "**Take your voting processes online without taking on the risk.** Vocdoni combines legal compliance, voter privacy, and results that you and your members can check independently."
|
|
72
|
+
|
|
73
|
+
## Microcopy patterns
|
|
74
|
+
|
|
75
|
+
| Situation | Pattern | Examples |
|
|
76
|
+
| --- | --- | --- |
|
|
77
|
+
| Primary CTA | Verb + object, 1-3 words | "Start for free", "New vote", "Create organization", "Save changes", "Set up a test vote" |
|
|
78
|
+
| Secondary editorial CTA | Human, low-commitment | "Talk to an expert", "Talk to an election expert", "See use cases and success stories" |
|
|
79
|
+
| Voter auth CTA | "Identify", never "Log in" (voters have no account) | "Identify", "Receive code" |
|
|
80
|
+
| Success toast | Short past tense, no exclamation | "Draft saved", "Organization created", "Voter authentication configured" |
|
|
81
|
+
| Error toast | What failed + server message as description | "Couldn't load API keys" / description from API |
|
|
82
|
+
| Empty state | What is missing + how to fix it | "No voting processes found" / "Create a voting process to get started." |
|
|
83
|
+
| Disabled control | Visible hint saying why | "Select a group first to configure authentication." |
|
|
84
|
+
| Destructive confirm | Title = action; body = object + consequence; confirm label repeats the action | "End vote" / `Ending "X" is irreversible...` / [Cancel] [End vote] |
|
|
85
|
+
| Plan gate | Name the limit and the way out | "Your current Free plan does not include anonymous voting" / "Unlock anonymous voting" |
|
|
86
|
+
| Validation | Inline under the field, imperative | "This field is required", "Select between 1 and 2 options" |
|
|
87
|
+
| Closing CTA (editorial) | A question | "Ready to see it for yourself?" |
|
|
88
|
+
|
|
89
|
+
Numbers: tabular figures (`font-variant-numeric: tabular-nums`) for counts, percentages, prices. Format with the locale (`Intl.NumberFormat`, `Intl.DateTimeFormat`): "711 votes", "59.8%", "17 Oct 2026". Results read "425 · 59.8%" (votes, middle dot, percent).
|
|
90
|
+
|
|
91
|
+
## Domain vocabulary
|
|
92
|
+
|
|
93
|
+
| Use | Avoid | Notes |
|
|
94
|
+
| --- | --- | --- |
|
|
95
|
+
| vote, voting process | poll, survey, ballot campaign | "Process" alone in admin UI is fine ("Process paused"). |
|
|
96
|
+
| census | voter list, whitelist | Voter-facing copy may say "the list of eligible voters". |
|
|
97
|
+
| memberbase, members, groups | contacts, users (for voters) | |
|
|
98
|
+
| voter authentication, identify | login (for voters) | Organizers log in; voters identify. |
|
|
99
|
+
| anonymous vote / private vote | "encrypted" as a feature name | Anonymous = nobody can link vote to voter. |
|
|
100
|
+
| results hidden until the end / live results | secret results | |
|
|
101
|
+
| verify, receipt, explorer | blockchain (in voter-facing copy) | Say "public record" or "explorer"; reserve "blockchain" for technical pages. |
|
|
102
|
+
| organization | company, client, tenant | |
|
|
103
|
+
|
|
104
|
+
## Status semantics
|
|
105
|
+
|
|
106
|
+
Two independent badges, each with one mapping for every surface (lists, voting page, dashboard, cards, PDFs). Subtle style: tinted background, darker text of the same hue, always with a text label.
|
|
107
|
+
|
|
108
|
+
**Process status** (where the vote is in its lifecycle):
|
|
109
|
+
|
|
110
|
+
| Status | Hue | Label |
|
|
111
|
+
| --- | --- | --- |
|
|
112
|
+
| Upcoming | yellow | Upcoming |
|
|
113
|
+
| Ongoing | green | Ongoing |
|
|
114
|
+
| Paused | orange | Paused |
|
|
115
|
+
| Ended | gray | Ended |
|
|
116
|
+
| Results available | teal | Results available |
|
|
117
|
+
| Canceled | red | Canceled |
|
|
118
|
+
|
|
119
|
+
**Results disclosure** (shown beside the status, or on a results tab):
|
|
120
|
+
|
|
121
|
+
| State | Hue | Label |
|
|
122
|
+
| --- | --- | --- |
|
|
123
|
+
| Live results | blue | Live results |
|
|
124
|
+
| Hidden until the end | purple | Hidden until the end |
|
|
125
|
+
| Awaiting results (ended, not yet tallied) | orange | Awaiting results |
|
|
126
|
+
| Results available | teal | Results available |
|
|
127
|
+
|
|
128
|
+
This is the skill's normalization. vocdoni-app is not fully consistent: its archive view paints upcoming gray and labels ongoing "Active" (`Process/Archive/View.tsx`), its admin results tab paints "Results available" green (`Process/Dashboard/ProcessView.tsx`), and the public status badge from `@vocdoni/react-components` uses green/yellow/red tones and labels the final state "Results". New UIs should follow the tables above. When the process status is already "Results available", omit the disclosure tag: never show two identical teal badges side by side.
|
|
129
|
+
|
|
130
|
+
Other meanings: usage meters go orange at 80% and red at 100%; voter-authentication strength is weak red, mid orange, strong green, with only the active level colored.
|
|
131
|
+
|
|
132
|
+
Editorial mode has fewer statuses; it uses `success` (green) and `warning` (amber-red) at small scale only, e.g. "Eligible" / "Not eligible" chips in product mock cards.
|
|
133
|
+
|
|
134
|
+
## Iconography
|
|
135
|
+
|
|
136
|
+
- **Lucide** in both modes (`lucide-react` on the site, `react-icons/lu` in the app). Stroke 2, round caps and joins. Do not mix icon families on one surface.
|
|
137
|
+
- Sizes: 16px inline in buttons, menus and metadata; 14px in dense rows; 20px in feature icon tiles (inside a 44px tile); 24-32px only for empty or error states.
|
|
138
|
+
- Icons inherit `currentColor`. In editorial mode they sit in `text-muted-foreground` or `text-primary`; in product mode `fg` or `fg.muted`.
|
|
139
|
+
- Every icon-only button has an `aria-label`. Decorative icons get `aria-hidden="true"`.
|
|
140
|
+
- Recurring meanings: `ArrowRight` = go forward / CTA, `ArrowUpRight` = external, `Check`/`CircleCheck` = guaranteed / eligible, `CircleX` = missing / not provided, `ShieldCheck` = verified, `EyeOff` = secret ballot, `Lock` = anonymous / plan-locked, `Users` = census or members, `Vote` = voting processes.
|
|
141
|
+
|
|
142
|
+
## Accessibility
|
|
143
|
+
|
|
144
|
+
- Text contrast AA minimum. Editorial: ink 100% (15.8:1), muted 64% (4.9:1), faint 68% (5.6:1), green 6.3:1. `text-faint` is reserved for uppercase labels as a hierarchy convention (vocdoni.io's DESIGN.md still cites an older 55% / 3.7:1 value; the code uses 68%). Product: `fg` #09090b, `fg.muted` #52525b (7.7:1). A white-label brand color must reach 3:1 as a surface and its label 4.5:1; `product.chakra.ts` picks readable steps automatically.
|
|
145
|
+
- Visible focus on every interactive element: 2px ring in the accent color with 2px offset.
|
|
146
|
+
- Full `prefers-reduced-motion` support: all animation collapses to ~0ms; in-view reveals render static.
|
|
147
|
+
- Hit targets at least 40px tall (buttons 40-54px; inputs 40px).
|
|
148
|
+
- Inputs are 16px on mobile so iOS does not zoom on focus; 14px from 768px up.
|
|
149
|
+
- Ballot choices are real `<input type="radio|checkbox">` inside `<label>`; a question is a `<fieldset>` with the question as `<legend>`.
|
|
150
|
+
- Never rely on color alone: status badges carry text; results carry numbers; errors carry a message.
|
|
151
|
+
- Ballot, member data and receipts are excluded from session replay (`className="ph-no-capture"` in PostHog).
|
|
152
|
+
|
|
153
|
+
## Internationalization
|
|
154
|
+
|
|
155
|
+
- Every user-facing string goes through i18n (`react-i18next`): `t('process.status.ongoing', 'Ongoing')` with an English default. Keys are `snake_case`, nested by domain.
|
|
156
|
+
- Vocdoni ships in many locales (ca, es, en, de, el, eu, fr, gl, it, pt, pt-br, hi...). Design for 30-40% longer strings: no fixed-width buttons, wrap chip rows, `text-wrap: balance` on headings.
|
|
157
|
+
- Brand and product names are never translated: Vocdoni, Vocdoni App, Vocdoni SDK, DAVINCI, Decidim.
|
|
158
|
+
- Hindi needs a Devanagari fallback font (Noto Sans Devanagari) in both font stacks.
|
|
159
|
+
|
|
160
|
+
## Imagery
|
|
161
|
+
|
|
162
|
+
- Photography is warm and human: real assemblies, hands holding phones, community spaces. No stock handshakes, no glowing padlocks, no circuit-board "blockchain" art.
|
|
163
|
+
- Product screenshots and photos sit in rounded panels (16-20px radius) with a 1px inset hairline (`.image-outline`).
|
|
164
|
+
- Product mocks on marketing pages show real states (eligibility chips, participation bars, verified results), not abstract shapes.
|
|
165
|
+
- Customer logos appear as a quiet marquee or tile row; grayscale or low-contrast in editorial mode, on white tiles in product mode.
|
|
166
|
+
- Code is always a dark "terminal window" block (`#09090b`, JetBrains Mono) even on cream pages.
|