From 698a6013de1ef0648d616261ead2f6e513bd24fc Mon Sep 17 00:00:00 2001 From: Antoine Clausse Date: Wed, 29 Oct 2025 11:18:15 +0100 Subject: [PATCH] [web] Create an initial implementation for the CIAM page layout (#29373) * Add a Storybook Layout page compiling all the "small pages" layouts * Add a CIAM page layout to Storybook and create an initial Layout * Use rem in font mixins * Add a `--ciam-` prefix to the new CSS variables * Fix linting GitOrigin-RevId: 7a89fd1531c87597a918a9170d174cce556d77c4 --- .../frontend/stories/page-layouts.stories.tsx | 297 ++++++++++++++++++ .../web/frontend/stylesheets/pages/all.scss | 1 + .../stylesheets/pages/ciam-colors.scss | 68 ++++ .../stylesheets/pages/ciam-mixins.scss | 107 +++++++ .../stylesheets/pages/ciam-variables.scss | 35 +++ .../web/frontend/stylesheets/pages/ciam.scss | 70 +++++ 6 files changed, 578 insertions(+) create mode 100644 services/web/frontend/stories/page-layouts.stories.tsx create mode 100644 services/web/frontend/stylesheets/pages/ciam-colors.scss create mode 100644 services/web/frontend/stylesheets/pages/ciam-mixins.scss create mode 100644 services/web/frontend/stylesheets/pages/ciam-variables.scss create mode 100644 services/web/frontend/stylesheets/pages/ciam.scss diff --git a/services/web/frontend/stories/page-layouts.stories.tsx b/services/web/frontend/stories/page-layouts.stories.tsx new file mode 100644 index 0000000000..d482fc641e --- /dev/null +++ b/services/web/frontend/stories/page-layouts.stories.tsx @@ -0,0 +1,297 @@ +import _ from 'lodash' +import { ComponentType } from 'react' +import { Navbar } from 'react-bootstrap' +import OLPageContentCard from '@/shared/components/ol/ol-page-content-card' +import OLRow from '@/shared/components/ol/ol-row' +import OLCol from '@/shared/components/ol/ol-col' +import OLButton from '@/shared/components/ol/ol-button' +import overleafLogo from '@/shared/svgs/overleaf-a-ds-solution-mallard.svg' + +const lorem = (n: number) => { + const quacks = ['quack', 'quack', 'quack', 'quak'] + let result = '' + if (n >= 1) result += 'Lorem' + if (n >= 2) result += ' epsom' + for (let i = 2; i < n; i++) { + const next = + result.at(-1) === '.' + ? ' ' + _.capitalize(quacks[Math.floor(Math.random() * quacks.length)]) + : quacks[Math.floor(Math.random() * (quacks.length + 1))] + result += next ? ' ' + next : '.' + } + if (result.at(-1) !== '.') result += '.' + return result +} + +const Nav = () => + +export const UnsuportedBrowser = () => ( +
+
+
+
+

Unsupported Browser

+

{lorem(60)}

+
+

{lorem(40)}

+
+
+
+
+) + +export const Error400 = () => ( +
+
+
+
+

Something went wrong, sorry.

+

{lorem(15)}

+
+
+
+
+) + +export const Error404 = () => ( + <> +