Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion apps/website/astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import react from '@astrojs/react'
import { thumbnailIntegration } from '@explainer/thumbnail/integration'
import { siteCard } from '@explainer/thumbnail'
import { siteCard, whyCard } from '@explainer/thumbnail'
import tailwindcss from '@tailwindcss/vite'
import { defineConfig } from 'astro/config'

Expand All @@ -26,6 +26,18 @@ export default defineConfig({
description: 'Un IAM moderne conçu pour les systèmes distribués',
card: siteCard('fr'),
},
{
path: '/why',
title: 'Why an IAM?',
description: 'Who are you, and what are you allowed to do?',
card: whyCard('en'),
},
{
path: '/thumbnails/fr/why',
title: 'Pourquoi un IAM ?',
description: "Qui es-tu, et qu'as-tu le droit de faire ?",
card: whyCard('fr'),
},
],
},
}),
Expand Down
1 change: 1 addition & 0 deletions apps/website/src/components/website-navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export function WebsiteNavbar({ appUrlOverrides }: WebsiteNavbarProps) {
}, [])

const links: Link[] = [
{ label: t('nav.why'), href: '/why' },
{ label: t('nav.roadmap'), href: 'https://github.com/orgs/ferriskey/projects/1', external: true },
{ label: t('nav.releaseNotes'), href: '/release-notes' },
...(blogHref ? [{ label: 'Blog', href: blogHref }] : []),
Expand Down
15 changes: 15 additions & 0 deletions apps/website/src/components/why/t.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
import type { Text } from '../../lib/why'

// Rend les deux langues côte à côte. Le CSS de la page masque celle qui ne
// correspond pas à <html lang>, ce qui permet du texte riche (gras, liens).
interface Props {
text: Text
vars?: Record<string, string>
}

const { text, vars } = Astro.props
const fill = (s: string) => (vars ? s.replace(/\{(\w+)\}/g, (_, k: string) => vars[k] ?? '') : s)
---

<span data-l="en" set:html={fill(text.en)} /><span data-l="fr" lang="fr" set:html={fill(text.fr)} />
2 changes: 2 additions & 0 deletions apps/website/src/i18n/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const ui = {
'nav.modules': 'Modules',
'nav.allModules': 'All modules',
'nav.releaseNotes': 'Release Notes',
'nav.why': 'Why an IAM',
'nav.roadmap': 'Roadmap',
'nav.getStarted': 'Get Started',

Expand Down Expand Up @@ -306,6 +307,7 @@ export const ui = {
'nav.modules': 'Modules',
'nav.allModules': 'Tous les modules',
'nav.releaseNotes': 'Release notes',
'nav.why': 'Pourquoi un IAM',
'nav.roadmap': 'Roadmap',
'nav.getStarted': 'Démarrer',

Expand Down
711 changes: 711 additions & 0 deletions apps/website/src/lib/why.ts

Large diffs are not rendered by default.

496 changes: 496 additions & 0 deletions apps/website/src/pages/why.astro

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions packages/thumbnail/src/cards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,26 @@ export function siteCard(locale: 'en' | 'fr' = 'en'): PixelCardOptions {
}
}

/** La carte de la page /why : la question à laquelle répond un IAM. */
export function whyCard(locale: 'en' | 'fr' = 'en'): PixelCardOptions {
const fr = locale === 'fr'
return {
brand: 'FerrisKey',
eyebrow: fr ? 'POURQUOI UN IAM · SSO · MFA · AUDIT' : 'WHY AN IAM · SSO · MFA · AUDIT',
lines: fr ? ['Pourquoi un IAM ?', 'Qui es-tu, et qu’as-tu', 'le droit de faire ?'] : ['Why an IAM?', 'Who are you, and what', 'are you allowed to do?'],
titleSize: fr ? 48 : 50,
lede: fr ? 'Tous vos accès, au même endroit.' : 'Users, sign-in, MFA, passkeys, audit: in one place.',
site: SITE,
...scene(),
products: [
block('Audit', seawatch, '#a83e08', '#ff8c42'),
block('Passkeys', aegis, '#c2410c', '#ffb547'),
block('MFA', trident, '#7a2d06', '#f2670f'),
block('SSO', key, '#f2670f', '#ffb547'),
],
}
}

const TAG_SPRITES: Sprite[] = [key, compass, aegis]
const TAG_BLOCKS: Array<[string, string]> = [
['#a83e08', '#ff8c42'],
Expand Down
2 changes: 1 addition & 1 deletion packages/thumbnail/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export { generateThumbnail, type ThumbnailOptions } from './generator'
export { renderThumbnail, renderThumbnailToFile } from './renderer'
export { resolveColor, resolveTailwindColor } from './colors'
export { generateBrandCard, PIXEL_CARD_WIDTH, type PixelCardOptions } from './card'
export { siteCard, articleCard, type ArticleCardInput } from './cards'
export { siteCard, whyCard, articleCard, type ArticleCardInput } from './cards'
Loading