Commit Graph

27 Commits

Author SHA1 Message Date
Emmanuel Pelletier
95e24b7207 website: fix typescript warnings when running astro check
see
https://github.com/withastro/astro/issues/10174#issuecomment-2026297879
for the why the tsconfig.json change
2025-04-17 17:27:58 +02:00
Emmanuel Pelletier
b770c63e7c gaufre: slightly better mobile view close button a11y label
We already have a more explicit label with a sr-only class, announcing
"Fermer" again after it is too much
2025-04-17 17:27:58 +02:00
Emmanuel Pelletier
3f678131a8 gaufre: improve styling when gaufre is manually used in a popup
this is basically for tchap as of now, they are the only ones using this
2025-02-27 17:50:34 +01:00
Emmanuel Pelletier
ba17049528 gaufre: add an subtle active style 2025-02-27 17:25:09 +01:00
Emmanuel Pelletier
15b52ab2de gaufre: hide focus outline when opening gaufre without keyboard 2025-02-27 17:11:43 +01:00
Emmanuel Pelletier
9a281ea645 gaufre: better looking beta badge (matches la suite website design) 2025-02-27 16:52:59 +01:00
Emmanuel Pelletier
799a362f89 gaufre: better handle the marianne font subsetting
this should be easier to handle if the one doing it is not… me. Still
not that great but better than nothing!
2025-02-27 16:52:59 +01:00
Emmanuel Pelletier
43e2468154 gaufre: replace 'bêta' with 'beta' 2024-11-14 15:18:29 +01:00
Emmanuel Pelletier
d364a25ca5 gaufre: show 'beta' services with a badge on their icon 2024-11-14 15:18:29 +01:00
Emmanuel Pelletier
7d75902ae6 gaufre: temporarily use a full marianne webfont file
this is to allow a quick publish of the website later because I dont
have the tools to build the subsetted font right now…
2024-11-14 15:18:29 +01:00
Emmanuel Pelletier
7d9725be79 gaufre css reset: make sure to reset everything
this is made in case the gaufre is in a website doing stuff on
after/before pseudo elements by default (the dsfr on <a> for example)
2024-06-21 15:25:12 +02:00
Emmanuel Pelletier
937b8f6185 gaufre: open service links in a new window
thanks @MarcWadai for the heads up
2024-06-21 15:16:52 +02:00
Emmanuel Pelletier
f29325a7f4 gaufre: update font subset with new characters
command used (assuming Marianne-Regular.woff2 is in website/public/fonts
dir, taken from the dsfr):

glyphhanger \
  --subset="./Marianne-Regular.woff2" \
  --formats=woff2 \
--whitelist="DémarchessimplifiéesFranceTransfertGristNotepaddel'ÉtatRDVServicePublicResanaTchapWebConférencedel'ÉtatWebinairedel'ÉtatFermer✕
"

we had feedback where text in the popup was rendered with completely
random characters… adding the unicode range should help?
2024-06-21 15:12:45 +02:00
Emmanuel Pelletier
7eb38d93f7 gaufre: do not output everything in bold in modal mode
I actually don't know why I wrote that, surely a mistake
2024-06-21 15:12:45 +02:00
Emmanuel Pelletier
62b74a5445 gaufre: fix popup placement issues, simplify styling
this is done following up Tchap integration.

- the popup placement script was really dumb and assumed the gaufre
button was always placed at the top right of the page. Tchap can't do
that and uses it at the bottom left. Now the popup places itself
correctly wherever the button is on the page.
On mobile now we have a "modal" mode for the popup where it takes all
the viewport.
- Tchap uses the gaufre inside their own popup component. This was not
something we handled before. Now you can set up a
'lasuite--gaufre-borderless' class on your html or body tag so that the
gaufre doesn't render its box shadow or blue border, making it easier to
integrate in a already made popup.
2024-06-21 15:12:45 +02:00
Emmanuel Pelletier
f89d915e23 website: missed viewport meta for homepage examples… 2024-05-16 15:04:47 +02:00
Emmanuel Pelletier
1d7f52fce2 website: add homepage example pages 2024-05-16 11:34:14 +02:00
Emmanuel Pelletier
bdf31c94a0 gaufre: handle DSFR dark theme 2024-05-15 09:49:31 +02:00
Emmanuel Pelletier
89de926f9c gaufre: remove border radius to better match DSFR styles 2024-05-15 09:47:49 +02:00
Emmanuel Pelletier
3fcc774954 website: show html code example first
makes more sense as more people will use the HTML than the react code
2024-05-15 07:47:43 +02:00
Emmanuel Pelletier
63d34d2315 api/gaufre: make sure the popup is shown in the viewport
small test that anchors the popup to the left of the viewport, this
quickly fixes the popup going out of viewport if the Gaufre button is
used on the left of a header bar
2024-05-07 22:11:54 +02:00
Emmanuel Pelletier
087bc5a889 api/gaufre: stop using an iframe
iframe was great because we controlled our page context to style things
easily, handle assets easily.

But since it's not on the same domain as the services consuming it, it
implied configuration here and there. Also some behaviors were annoying
to implement (for example, keyboard navigation). I'm sure everything we
do is possible via iframe but I feel like I'll go from barrier to
barrier at every new thing we want to do…

I feel like, at the cost of handling style-conflicts, just rendering
everything in the real page context is more future-proof.
2024-05-07 21:59:58 +02:00
Emmanuel Pelletier
10203cf2bd homepage generator: logos are not available through api 2024-05-02 17:49:04 +02:00
Emmanuel Pelletier
c041c77360 adding 'la suite territoriale' specific gaufre button/endpoint 2024-05-02 12:58:24 +02:00
Emmanuel Pelletier
472e54237e stop using prettier only to indent our html
it weighted *a lot* just for that. now we use a tiny function
that only break lines between html tags, not as good but the JS
weight gain is huge
2024-05-02 10:52:58 +02:00
Emmanuel Pelletier
21521277b0 misc changes on website:
- correct a few content mistakes
- activate compression on production server
- suppress a few TS warnings (with anys, I know)
2024-05-02 09:48:59 +02:00
Emmanuel Pelletier
d9859f1564 first commit:
- we have a static astro website under /website. It has the
implementation docs of the homepage/gaufre templates, and it handles the
few API endpoints (the gaufre js, backgrounds, logos)
- we have a vite app under /packages/integration. It has the react
components generating the homepage and the gaufre button, and their css.
Its used to generate an npm package
2024-05-02 00:35:38 +02:00