Commit Graph
21 Commits
Author SHA1 Message Date
Quentin Gliech ee1a104705 Render the CAPTCHA widgets with React on server-rendered pages
Instead of provider-specific markup and script tags in the head, the
captcha.form() template macro now emits a placeholder element carrying
the CAPTCHA configuration in data attributes, on which a new entrypoint
mounts the React Captcha component. The widget still injects its hidden
response field inside the form, so the server-side verification flow is
unchanged.

This is the first use of inline React components to progressively
enhance server-rendered pages.
2026-08-14 15:47:19 +02:00
Quentin Gliech 8e65bf198e frontend: migrate to Tailwind 4
Tailwind 4 ships its own Vite plugin and no longer needs PostCSS plumbing.
Drop postcss/autoprefixer/postcss-import/postcss-nesting and the .postcssrc.json,
wire @tailwindcss/vite into vite.config.ts, replace the @tailwind directives
with @import "tailwindcss", and convert the JS tailwind.config.cjs theme
into a CSS @theme block in shared.css. An @source directive points back at
the SSR templates so the Jinja-rendered HTML in templates/ still gets scanned
for utility classes.

The third-party CSS (compound design tokens, compound-web, fontsource) moves
into a new vendor.css entrypoint, loaded ahead of shared.css from main.tsx,
storybook, and base.html. Tailwind v4's @import bundler silently drops the
nested `@import url(...) layer(cpd-base) screen` statements inside the
compound-design-tokens.css barrel, so we have to keep those imports out of
any file that contains Tailwind directives and let Vite's normal CSS pipeline
resolve them instead.
2026-05-25 16:31:36 +02:00
Quentin Gliech f0b408ef5a Interactively guide users for selecting a valid username 2025-11-18 18:25:23 +01:00
Quentin Gliech 2caa6e7f04 Move all the frontend entrypoints to a dedicated directory
This will make it easier to add new entrypoints in the future without
having to change the vite config
2025-11-18 16:22:40 +01:00
Olivier 'reivilibre adad55161b templates: fix reliance on lax undefined behaviour 2025-10-24 14:27:35 +01:00
Quentin Gliech 3d96dc9d47 Update license headers to match the actual license 2025-06-12 10:32:16 +02:00
Quentin Gliech b51a6c02ab Tweak the login page to match the design 2025-01-07 11:49:01 +01:00
Quentin Gliech 15c02fa643 Manual license edit of remaining files 2024-09-10 14:28:55 +02:00
Quentin Gliech e937ea8fa8 Rework assets loading to fix splitting CSS chunks 2024-07-25 12:59:29 +02:00
Quentin Gliech a3beeb2398 Render reCAPTCHA challenge on the registration form 2024-05-15 09:38:10 +02:00
Quentin Gliech 8984cc703b Add instance privacy policy, TOS and imprint, and loads of design cleanups 2023-10-30 15:55:15 +01:00
Quentin Gliech 6ff549f5df templates: fix the _ function not working in macros 2023-10-05 19:29:23 +02:00
Quentin Gliech ebdb8eb30e templates: more translations 2023-10-05 19:29:23 +02:00
Quentin Gliech 15ad89aa82 templates: add translations function 2023-10-05 19:29:23 +02:00
Quentin Gliech 995bdfc13b templates: replace tera with minijinja 2023-10-05 19:29:23 +02:00
Quentin Gliech b0fb3281b0 Compoundify the consent screens 2023-09-06 15:58:54 +02:00
Quentin Gliech 7a9a873271 Compoundify the templates 2023-09-01 15:57:13 +02:00
Hugh Nimmo-SmithandGitHub 86d53c969f Standardise consent screens (#1674) 2023-09-01 13:19:33 +01:00
Quentin Gliech 652217ec9b frontend: work around the CSS split issue 2023-08-08 21:22:27 +02:00
Quentin GliechandGitHub 76653f9638 Better frontend assets handling and move the react app to /account/ (#1324)
This makes the Vite assets handling better, namely:

 - make it possible to include any vite assets in the templates
 - include the right `<link rel="preload">` tags for assets
 - include Subresource Integrity hashes
 - pre-compress assets and remove on-the-fly compression by the Rust server
 - build the CSS used by templates through Vite

It also moves the React app from /app/ to /account/, and remove some of the old SSR account screens.
2023-07-06 15:30:26 +02:00
Quentin Gliech 9c0ece7512 Do not embed the templates and static files in the binary 2022-11-18 22:37:55 +01:00