From 7973d7e26dcf52c76f4795ec3ba0ddd2e8a7eff8 Mon Sep 17 00:00:00 2001 From: Natalia Sayang Date: Sun, 26 Nov 2023 18:54:03 +0000 Subject: [PATCH 1/2] Add Benjamin, Bent, and Bob line drawings --- .../designs/linedrawings/benjamin.mjs | 51 ++++++++++ .../components/designs/linedrawings/bent.mjs | 98 +++++++++++++++++++ .../components/designs/linedrawings/bob.mjs | 88 +++++++++++++++++ .../components/designs/linedrawings/index.mjs | 11 +++ 4 files changed, 248 insertions(+) create mode 100644 sites/shared/components/designs/linedrawings/benjamin.mjs create mode 100644 sites/shared/components/designs/linedrawings/bent.mjs create mode 100644 sites/shared/components/designs/linedrawings/bob.mjs diff --git a/sites/shared/components/designs/linedrawings/benjamin.mjs b/sites/shared/components/designs/linedrawings/benjamin.mjs new file mode 100644 index 00000000000..320667b6266 --- /dev/null +++ b/sites/shared/components/designs/linedrawings/benjamin.mjs @@ -0,0 +1,51 @@ +import { LineDrawingWrapper, thin, dashed } from './shared.mjs' + +const strokeScale = 0.5 + +export const Benjamin = ({ + className = 'w-64', // CSS classes to apply + stroke = 1, // Stroke width to use +}) => { + // Normalize stroke across designs + stroke = stroke * strokeScale + + return ( + + + + ) +} + +/* + * React component for the front + */ +export const BenjaminFront = ({ + className = 'w-64', // CSS classes to apply + stroke = 1, // Stroke width to use +}) => { + // Normalize stroke across designs + stroke = stroke * strokeScale + + return ( + + + + ) +} + +/* + * SVG elements for the front + */ +export const Front = ({ stroke }) => ( + <> + + + +) diff --git a/sites/shared/components/designs/linedrawings/bent.mjs b/sites/shared/components/designs/linedrawings/bent.mjs new file mode 100644 index 00000000000..e3a40f1a82d --- /dev/null +++ b/sites/shared/components/designs/linedrawings/bent.mjs @@ -0,0 +1,98 @@ +import { LineDrawingWrapper, thin, dashed } from './shared.mjs' + +const strokeScale = 0.5 + +export const Bent = ({ + className = 'w-64', // CSS classes to apply + stroke = 1, // Stroke width to use +}) => { + // Normalize stroke across designs + stroke = stroke * strokeScale + + return ( + + + + + ) +} + +/* + * React component for the front + */ +export const BentFront = ({ + className = 'w-64', // CSS classes to apply + stroke = 1, // Stroke width to use +}) => { + // Normalize stroke across designs + stroke = stroke * strokeScale + + return ( + + + + ) +} + +/* + * React component for the back + */ +export const BentBack = ({ + className = 'w-64', // CSS classes to apply + stroke = 1, // Stroke width to use +}) => { + // Normalize stroke across designs + stroke = stroke * strokeScale + + return ( + + + + ) +} + +/* + * SVG elements for the front + */ +export const Front = ({ stroke }) => ( + <> + + + + +) + +/* + * SVG elements for the back + */ +const Back = ({ stroke }) => ( + <> + + + + +) diff --git a/sites/shared/components/designs/linedrawings/bob.mjs b/sites/shared/components/designs/linedrawings/bob.mjs new file mode 100644 index 00000000000..a7cc9de29f4 --- /dev/null +++ b/sites/shared/components/designs/linedrawings/bob.mjs @@ -0,0 +1,88 @@ +import { LineDrawingWrapper, thin, dashed } from './shared.mjs' + +const strokeScale = 0.5 + +export const Bob = ({ + className = 'w-64', // CSS classes to apply + stroke = 1, // Stroke width to use +}) => { + // Normalize stroke across designs + stroke = stroke * strokeScale + + return ( + + + + + ) +} + +/* + * React component for the front + */ +export const BobFront = ({ + className = 'w-64', // CSS classes to apply + stroke = 1, // Stroke width to use +}) => { + // Normalize stroke across designs + stroke = stroke * strokeScale + + return ( + + + + ) +} + +/* + * React component for the back + */ +export const BobBack = ({ + className = 'w-64', // CSS classes to apply + stroke = 1, // Stroke width to use +}) => { + // Normalize stroke across designs + stroke = stroke * strokeScale + + return ( + + + + ) +} + +/* + * SVG elements for the front + */ +export const Front = ({ stroke }) => ( + <> + + + +) + +/* + * SVG elements for the back + */ +const Back = ({ stroke }) => ( + <> + + + +) diff --git a/sites/shared/components/designs/linedrawings/index.mjs b/sites/shared/components/designs/linedrawings/index.mjs index bb1b3e441d8..927a1862ccb 100644 --- a/sites/shared/components/designs/linedrawings/index.mjs +++ b/sites/shared/components/designs/linedrawings/index.mjs @@ -1,6 +1,9 @@ import { Aaron, AaronFront, AaronBack } from 'shared/components/designs/linedrawings/aaron.mjs' import { Albert, AlbertFront } from 'shared/components/designs/linedrawings/albert.mjs' import { Bella, BellaFront, BellaBack } from 'shared/components/designs/linedrawings/bella.mjs' +import { Benjamin, BenjaminFront } from 'shared/components/designs/linedrawings/benjamin.mjs' +import { Bent, BentFront, BentBack } from 'shared/components/designs/linedrawings/bent.mjs' +import { Bob, BobFront, BobBack } from 'shared/components/designs/linedrawings/bob.mjs' import { Bruce, BruceFront, BruceBack } from 'shared/components/designs/linedrawings/bruce.mjs' import { Simon, SimonFront, SimonBack } from 'shared/components/designs/linedrawings/simon.mjs' import { Wahid, WahidFront, WahidBack } from 'shared/components/designs/linedrawings/wahid.mjs' @@ -9,6 +12,9 @@ export const lineDrawingsFront = { aaron: AaronFront, albert: AlbertFront, bella: BellaFront, + benjamin: BenjaminFront, + bent: BentFront, + bob: BobFront, bruce: BruceFront, simon: SimonFront, wahid: WahidFront, @@ -17,6 +23,8 @@ export const lineDrawingsFront = { export const lineDrawingsBack = { aaron: AaronBack, bella: BellaBack, + bent: BentBack, + bob: BobBack, bruce: BruceBack, simon: SimonBack, wahid: WahidBack, @@ -26,6 +34,9 @@ export const lineDrawings = { aaron: Aaron, albert: Albert, bella: Bella, + benjamin: Benjamin, + bent: Bent, + bob: Bob, bruce: Bruce, simon: Simon, wahid: Wahid, From 102b518656bb35818b01433087844d4ce5fa2b92 Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Thu, 30 Nov 2023 16:49:37 +0100 Subject: [PATCH 2/2] Update benjamin.mjs --- sites/shared/components/designs/linedrawings/benjamin.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/shared/components/designs/linedrawings/benjamin.mjs b/sites/shared/components/designs/linedrawings/benjamin.mjs index 320667b6266..663eda366a2 100644 --- a/sites/shared/components/designs/linedrawings/benjamin.mjs +++ b/sites/shared/components/designs/linedrawings/benjamin.mjs @@ -1,4 +1,4 @@ -import { LineDrawingWrapper, thin, dashed } from './shared.mjs' +import { LineDrawingWrapper } from './shared.mjs' const strokeScale = 0.5