@gpichot/spectacle-deck 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/package.json +16 -21
  2. package/.turbo/turbo-build.log +0 -4
  3. package/.turbo/turbo-dev.log +0 -4
  4. package/publish.sh +0 -7
  5. package/scripts/bundle.ts +0 -84
  6. package/src/SlideWrapper.tsx +0 -25
  7. package/src/colors.ts +0 -42
  8. package/src/components/CodeStepper/CodeStepper.tsx +0 -228
  9. package/src/components/CodeStepper/code-directives.test.ts +0 -58
  10. package/src/components/CodeStepper/code-directives.ts +0 -129
  11. package/src/components/DocumentationItem.tsx +0 -85
  12. package/src/components/FilePane.tsx +0 -18
  13. package/src/components/HorizontalList.tsx +0 -141
  14. package/src/components/IconBox.tsx +0 -31
  15. package/src/components/Image.tsx +0 -39
  16. package/src/components/ItemsColumn.tsx +0 -60
  17. package/src/components/QRCode.tsx +0 -55
  18. package/src/components/Timeline.styled.tsx +0 -24
  19. package/src/components/Timeline.tsx +0 -159
  20. package/src/components/map.tsx +0 -128
  21. package/src/components/styled.tsx +0 -73
  22. package/src/context.tsx +0 -33
  23. package/src/front.png +0 -0
  24. package/src/index.tsx +0 -127
  25. package/src/layouts/BaseLayout.tsx +0 -52
  26. package/src/layouts/CenteredLayout.tsx +0 -40
  27. package/src/layouts/Default3Layout.tsx +0 -159
  28. package/src/layouts/MainSectionLayout.tsx +0 -31
  29. package/src/layouts/QuoteLayout.tsx +0 -107
  30. package/src/layouts/SectionLayout.tsx +0 -14
  31. package/src/layouts/SideCodeLayout.tsx +0 -44
  32. package/src/layouts/SideImageLayout.tsx +0 -82
  33. package/src/layouts/SideLayout.tsx +0 -31
  34. package/src/layouts/columns.tsx +0 -56
  35. package/src/layouts/index.tsx +0 -19
  36. package/src/layouts/styled.ts +0 -7
  37. package/src/layouts/utils.ts +0 -66
  38. package/src/node.d.ts +0 -5
  39. package/src/style.d.ts +0 -10
  40. package/src/template.tsx +0 -25
  41. package/src/theme.ts +0 -28
  42. package/tsconfig.json +0 -29
  43. /package/{dist/SlideWrapper.d.ts → SlideWrapper.d.ts} +0 -0
  44. /package/{dist/colors.d.ts → colors.d.ts} +0 -0
  45. /package/{dist/components → components}/CodeStepper/CodeStepper.d.ts +0 -0
  46. /package/{dist/components → components}/CodeStepper/code-directives.d.ts +0 -0
  47. /package/{dist/components → components}/DocumentationItem.d.ts +0 -0
  48. /package/{dist/components → components}/FilePane.d.ts +0 -0
  49. /package/{dist/components → components}/HorizontalList.d.ts +0 -0
  50. /package/{dist/components → components}/IconBox.d.ts +0 -0
  51. /package/{dist/components → components}/Image.d.ts +0 -0
  52. /package/{dist/components → components}/ItemsColumn.d.ts +0 -0
  53. /package/{dist/components → components}/QRCode.d.ts +0 -0
  54. /package/{dist/components → components}/Timeline.d.ts +0 -0
  55. /package/{dist/components → components}/Timeline.styled.d.ts +0 -0
  56. /package/{dist/components → components}/map.d.ts +0 -0
  57. /package/{dist/components → components}/styled.d.ts +0 -0
  58. /package/{dist/context.d.ts → context.d.ts} +0 -0
  59. /package/{dist/index.cjs → index.cjs} +0 -0
  60. /package/{dist/index.d.ts → index.d.ts} +0 -0
  61. /package/{dist/index.mjs → index.mjs} +0 -0
  62. /package/{dist/layouts → layouts}/BaseLayout.d.ts +0 -0
  63. /package/{dist/layouts → layouts}/CenteredLayout.d.ts +0 -0
  64. /package/{dist/layouts → layouts}/Default3Layout.d.ts +0 -0
  65. /package/{dist/layouts → layouts}/MainSectionLayout.d.ts +0 -0
  66. /package/{dist/layouts → layouts}/QuoteLayout.d.ts +0 -0
  67. /package/{dist/layouts → layouts}/SectionLayout.d.ts +0 -0
  68. /package/{dist/layouts → layouts}/SideCodeLayout.d.ts +0 -0
  69. /package/{dist/layouts → layouts}/SideImageLayout.d.ts +0 -0
  70. /package/{dist/layouts → layouts}/SideLayout.d.ts +0 -0
  71. /package/{dist/layouts → layouts}/columns.d.ts +0 -0
  72. /package/{dist/layouts → layouts}/index.d.ts +0 -0
  73. /package/{dist/layouts → layouts}/styled.d.ts +0 -0
  74. /package/{dist/layouts → layouts}/utils.d.ts +0 -0
  75. /package/{dist/template.d.ts → template.d.ts} +0 -0
  76. /package/{dist/theme.d.ts → theme.d.ts} +0 -0
@@ -1,128 +0,0 @@
1
- import React from "react";
2
- import { mdxComponentMap } from "spectacle";
3
- import {
4
- CustomHeading,
5
- CustomQuote,
6
- HeadingThree,
7
- HeadingTwo,
8
- InlineCode,
9
- Image,
10
- } from "./styled";
11
-
12
- import CodeStepper from "./CodeStepper/CodeStepper";
13
- import { QRCode } from "./QRCode";
14
-
15
- const componentsMap = {
16
- ...mdxComponentMap,
17
- inlineCode: (props: React.ComponentPropsWithoutRef<"code">) => (
18
- <InlineCode
19
- {...props}
20
- style={{
21
- fontWeight: 500,
22
- display: "inline-block",
23
- }}
24
- />
25
- ),
26
- table: (props: React.ComponentPropsWithoutRef<"table">) => (
27
- <table
28
- {...props}
29
- style={{
30
- borderCollapse: "collapse",
31
- width: "100%",
32
- textAlign: "center",
33
- }}
34
- />
35
- ),
36
- tr: (props: React.ComponentPropsWithoutRef<"tr">) => (
37
- <tr
38
- {...props}
39
- style={{
40
- textAlign: "center",
41
- color: "white",
42
- fontFamily: 'Bitter,"Helvetica Neue",Helvetica,Arial,sans-serif',
43
- fontSize: 24,
44
- }}
45
- />
46
- ),
47
- td: (props: React.ComponentPropsWithoutRef<"td">) => (
48
- <td
49
- {...props}
50
- style={{
51
- textAlign: "center",
52
- padding: "0.3rem 0",
53
- color: "white",
54
- fontFamily: 'Bitter,"Helvetica Neue",Helvetica,Arial,sans-serif',
55
- fontSize: 24,
56
- }}
57
- />
58
- ),
59
- h1: (props: React.ComponentProps<"h1">) => (
60
- <CustomHeading
61
- fontSize="h1"
62
- color="white"
63
- style={{
64
- fontWeight: 500,
65
- fontFamily: 'Bitter,"Helvetica Neue",Helvetica,Arial,sans-serif',
66
- fontSize: 67,
67
- flex: "0 1 65vw",
68
- maxWidth: "65%",
69
- textAlign: "left",
70
- }}
71
- >
72
- {props.children}
73
- </CustomHeading>
74
- ),
75
- h2: (props: React.ComponentProps<"h2">) => (
76
- <HeadingTwo>{props.children}</HeadingTwo>
77
- ),
78
- h3: (props: React.ComponentPropsWithoutRef<"h3">) => (
79
- <HeadingThree {...props} />
80
- ),
81
- img: (props: React.ComponentProps<typeof Image>) => <Image {...props} />,
82
- pre: CodeStepper,
83
- li: (props: React.ComponentProps<"li">) => (
84
- <li {...props} style={{ margin: "24px 0" }} />
85
- ),
86
- Side: (props: React.ComponentProps<"div">) => <div {...props} />,
87
- p: (props: React.ComponentProps<"p">) => {
88
- const Text = mdxComponentMap.p!;
89
- return (
90
- <Text
91
- style={{ margin: "8px 0", padding: "8px 0", lineHeight: "2rem" }}
92
- {...props}
93
- />
94
- );
95
- },
96
- blockquote: (props: React.ComponentProps<"blockquote">) => (
97
- <CustomQuote {...props} />
98
- ),
99
- a: ({ children, ...props }: React.ComponentProps<"a">) => {
100
- const domain = new URL(props.href || "").hostname;
101
- return (
102
- <a
103
- {...props}
104
- style={{ color: "var(--color-secondary)", textDecoration: "none" }}
105
- >
106
- {children}{" "}
107
- <small
108
- style={{
109
- color: "#ffffff44",
110
- }}
111
- >
112
- ({domain})
113
- </small>
114
- </a>
115
- );
116
- },
117
- directive: (props: React.ComponentProps<"div">) => {
118
- // @ts-expect-error
119
- if (props._name === "qrcode") {
120
- // @ts-expect-error
121
- const url = React.Children.toArray(props.children)[0].props.href;
122
- return <QRCode url={url} />;
123
- }
124
- return <div {...props} />;
125
- },
126
- } as const;
127
-
128
- export default componentsMap;
@@ -1,73 +0,0 @@
1
- import React from "react";
2
- import {
3
- Link as SpectacleLink,
4
- Image as SpectacleImage,
5
- Heading,
6
- FlexBox,
7
- } from "spectacle";
8
- import styled from "styled-components";
9
-
10
- export const Link = (props: { href: string; children: React.ReactNode }) => (
11
- <SpectacleLink href={props.href} target="_blank" rel="noopener noreferrer">
12
- {props.children} [{props.href}]
13
- </SpectacleLink>
14
- );
15
-
16
- const StyledImage = styled(SpectacleImage)`
17
- object-fit: contain;
18
- max-height: 30vh;
19
- max-width: 70vw;
20
- `;
21
-
22
- export const Image = (props: React.ComponentProps<typeof SpectacleImage>) => (
23
- <FlexBox margin="0 0" padding="0 0">
24
- <StyledImage {...props} />
25
- </FlexBox>
26
- );
27
-
28
- export const CustomHeading = styled(Heading)`
29
- strong {
30
- color: var(--color-secondary);
31
- font-weight: 500;
32
- }
33
- `;
34
-
35
- export const CustomQuote = styled.blockquote`
36
- margin: 1rem 0;
37
- padding-left: 1.5rem;
38
- padding-top: 0;
39
- padding-bottom: 0;
40
- opacity: 0.8;
41
-
42
- > * {
43
- padding: 0 !important;
44
- }
45
- `;
46
-
47
- export const InlineCode = styled.code`
48
- filter: brightness(1.05);
49
- zoom: 1.1;
50
- &:before,
51
- &:after {
52
- content: "\`";
53
- font-size: 0.8em;
54
- }
55
- `;
56
-
57
- export const HeadingTwo = styled.h2`
58
- font-family: Bitter, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
59
- font-size: 55px;
60
- font-weight: 400;
61
- `;
62
-
63
- export const HeadingThree = styled.h3`
64
- font-family: Bitter, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
65
- font-size: 40px;
66
- font-weight: 400;
67
- margin-top: 0;
68
-
69
- strong {
70
- color: var(--color-secondary);
71
- font-weight: 500;
72
- }
73
- `;
package/src/context.tsx DELETED
@@ -1,33 +0,0 @@
1
- import React from "react";
2
-
3
- export type LayoutComponent = React.ComponentType<any>;
4
-
5
- export interface IPestacleContext {
6
- layouts: Record<string, LayoutComponent>;
7
- }
8
-
9
- export const PestacleContext = React.createContext<
10
- IPestacleContext | undefined
11
- >(undefined);
12
-
13
- export function usePestacle() {
14
- const context = React.useContext(PestacleContext);
15
- if (!context) {
16
- throw new Error("usePestacle must be used within a PestacleProvider");
17
- }
18
- return context;
19
- }
20
-
21
- export function PestacleProvider({
22
- children,
23
- layouts,
24
- }: {
25
- children: React.ReactNode;
26
- layouts: Record<string, LayoutComponent>;
27
- }) {
28
- return (
29
- <PestacleContext.Provider value={{ layouts }}>
30
- {children}
31
- </PestacleContext.Provider>
32
- );
33
- }
package/src/front.png DELETED
Binary file
package/src/index.tsx DELETED
@@ -1,127 +0,0 @@
1
- import React from "react";
2
- import { MDXProvider } from "@mdx-js/react";
3
- import { Deck as SpectacleDeck, Slide } from "spectacle";
4
-
5
- import Layouts from "./layouts";
6
- import { default as baseTheme } from "./theme";
7
- import { template } from "./template";
8
- import customComponents from "./components/map";
9
- import { createGlobalStyle } from "styled-components";
10
- import { SlideWrapper } from "./SlideWrapper";
11
- import { LayoutComponent, PestacleProvider } from "./context";
12
- import { createCssVariables } from "./colors";
13
-
14
- export * from "spectacle";
15
-
16
- export { default as FilePane } from "./components/FilePane";
17
- export { ItemsColumn } from "./components/ItemsColumn";
18
- export { Doc, DocItem } from "./components/DocumentationItem";
19
- export { Image } from "./components/Image";
20
- export {
21
- default as HorizontalList,
22
- HorizontalListItem,
23
- } from "./components/HorizontalList";
24
- export { default as Timeline, TimelineItem } from "./components/Timeline";
25
- export { IconBox } from "./components/IconBox";
26
-
27
- export type SlideType = {
28
- metadata: Record<string, unknown> & { layout?: string };
29
- slideComponent: React.ElementType<unknown>;
30
- };
31
-
32
- export type DeckType = {
33
- metadata: Record<string, unknown>;
34
- slides: SlideType[];
35
- };
36
-
37
- export function PassThrough({ children }: { children: React.ReactNode }) {
38
- return <>{children}</>;
39
- }
40
-
41
- export const layouts = Layouts;
42
-
43
- interface ThemeOptions {
44
- themeTokens: {
45
- colors: Record<string, string>;
46
- };
47
- }
48
-
49
- const componentsMap = {
50
- ...customComponents,
51
- wrapper: SlideWrapper,
52
- };
53
- export function Deck({
54
- deck,
55
- theme,
56
- layouts = Layouts,
57
- }: {
58
- deck: DeckType;
59
- theme: ThemeOptions;
60
- layouts?: Record<string, LayoutComponent>;
61
- }) {
62
- React.useEffect(() => {
63
- document.title = (deck.metadata.title as string) || "Untitled";
64
- }, [deck.metadata.title]);
65
-
66
- const GlobalStyle = React.useMemo(() => {
67
- const cssVariables = createCssVariables(theme.themeTokens.colors);
68
- return createGlobalStyle`
69
- :root {
70
- ${cssVariables}
71
- --font-family: ${baseTheme.fonts.text}
72
- }
73
- `;
74
- }, [theme]);
75
-
76
- return (
77
- <React.StrictMode>
78
- <PestacleProvider layouts={layouts}>
79
- <MDXProvider components={componentsMap}>
80
- <GlobalStyle />
81
- <SpectacleDeck
82
- theme={{ ...baseTheme, ...theme.themeTokens }}
83
- template={template}
84
- >
85
- {deck.slides.map((slide, i) => {
86
- const Component = slide.slideComponent;
87
- return (
88
- <Slide key={i}>
89
- <Component />
90
- </Slide>
91
- );
92
- })}
93
- </SpectacleDeck>
94
- </MDXProvider>
95
- </PestacleProvider>
96
- </React.StrictMode>
97
- );
98
- }
99
-
100
- export function Danger({ children }: { children: React.ReactNode }) {
101
- return <div style={{ color: "red" }}>{children}</div>;
102
- }
103
-
104
- export function Information({ children }: { children: React.ReactNode }) {
105
- return <div style={{ color: "orange" }}>{children}</div>;
106
- }
107
-
108
- export function Success({ children }: { children: React.ReactNode }) {
109
- return <div style={{ color: "green" }}>{children}</div>;
110
- }
111
- export function Warning({ children }: { children: React.ReactNode }) {
112
- return <div style={{ color: "yellow" }}>{children}</div>;
113
- }
114
-
115
- export function Side({ children }: { children: React.ReactNode }) {
116
- return <div>{children}</div>;
117
- }
118
-
119
- Side.mdxType = "Side";
120
-
121
- export function Documentation({ children }: { children: React.ReactNode }) {
122
- return <div>{children}</div>;
123
- }
124
-
125
- export function Box({ children }: { children: React.ReactNode }) {
126
- return <div>{children}</div>;
127
- }
@@ -1,52 +0,0 @@
1
- import React from "react";
2
- import styled from "styled-components";
3
-
4
- const DefaultLayoutHeading = styled.div`
5
- background-color: #ffffff11;
6
- padding: 2rem 5rem;
7
- margin-bottom: 1rem;
8
-
9
- h2 {
10
- margin: 0;
11
- }
12
- `;
13
-
14
-
15
- export const BaseLayout = ({
16
- children,
17
- title,
18
- ...otherProps
19
- }: {
20
- children: React.ReactNode;
21
- title?: React.ReactNode;
22
- } & Omit<React.ComponentPropsWithoutRef<"div">, "title">) => {
23
- return (
24
- <div
25
- {...otherProps}
26
- style={{
27
- position: "absolute",
28
- top: 0,
29
- right: 0,
30
- bottom: 0,
31
- left: 0,
32
- display: "flex",
33
- flexDirection: "column",
34
- marginBottom: "5rem",
35
- }}
36
- >
37
- {title && <DefaultLayoutHeading>{title}</DefaultLayoutHeading>}
38
- <div
39
- style={{
40
- display: "flex",
41
- flexDirection: "column",
42
- justifyContent: "center",
43
- height: "100%",
44
- padding: "0 4rem",
45
- flex: 1,
46
- }}
47
- >
48
- {children}
49
- </div>
50
- </div>
51
- );
52
- };
@@ -1,40 +0,0 @@
1
- import React from "react";
2
- import styled from "styled-components";
3
- import { Margins, getHeading } from "./utils";
4
-
5
- const CenteredLayoutContent = styled.div`
6
- h2,
7
- h3 {
8
- }
9
- `;
10
- export const CenteredLayout = (
11
- props: React.ComponentPropsWithoutRef<"div">
12
- ) => {
13
- const [heading, rest] = getHeading(props.children);
14
- return (
15
- <div
16
- {...props}
17
- style={{
18
- height: "100%",
19
- display: "flex",
20
- flexFlow: "column",
21
- alignItems: "center",
22
- justifyContent: "center",
23
- margin: `0 ${Margins.horizontal}`,
24
- }}
25
- >
26
- {rest}
27
- <CenteredLayoutContent
28
- style={{
29
- position: "absolute",
30
- opacity: 0.8,
31
- marginBottom: "2rem",
32
- marginTop: "2rem",
33
- bottom: 0,
34
- }}
35
- >
36
- {heading}
37
- </CenteredLayoutContent>
38
- </div>
39
- );
40
- };
@@ -1,159 +0,0 @@
1
- import React from "react";
2
- import styled from "styled-components";
3
- import { Margins } from "./utils";
4
-
5
- function MultipleHexagons({ position }: { position: "left" | "right" }) {
6
- return (
7
- <svg
8
- viewBox={`${position === "left" ? "0" : "2"} 0 12 20`}
9
- width="12"
10
- height="20"
11
- fill="none"
12
- xmlns="http://www.w3.org/2000/svg"
13
- >
14
- <path
15
- d="M 3.913 5.381 L 2.063 4.314 L 2.063 2.173 L 3.913 1.103 L 5.761 2.173 L 5.761 4.314 L 3.913 5.381 Z M 2.38 4.128 L 3.913 5.014 L 5.444 4.128 L 5.444 2.356 L 3.913 1.47 L 2.38 2.356 L 2.38 4.128 Z"
16
- fill="#F49676"
17
- />
18
- <path
19
- d="M 8.047 5.401 L 6.197 4.334 L 6.197 2.193 L 8.047 1.123 L 9.895 2.193 L 9.895 4.334 L 8.047 5.401 Z M 6.514 4.148 L 8.047 5.034 L 9.578 4.148 L 9.578 2.376 L 8.047 1.49 L 6.514 2.376 L 6.514 4.148 Z"
20
- fill="#F49676"
21
- />
22
- <path
23
- d="M 8.071 4.548 L 6.956 3.905 L 6.956 2.615 L 8.071 1.97 L 9.184 2.615 L 9.184 3.905 L 8.071 4.548 Z"
24
- fill="#F49676"
25
- />
26
- <path
27
- d="M 5.982 8.898 L 4.132 7.831 L 4.132 5.69 L 5.982 4.62 L 7.83 5.69 L 7.83 7.831 L 5.982 8.898 Z M 4.449 7.645 L 5.982 8.531 L 7.513 7.645 L 7.513 5.873 L 5.982 4.987 L 4.449 5.873 L 4.449 7.645 Z"
28
- fill="#F49676"
29
- />
30
- <path
31
- d="M 6.006 8.045 L 4.891 7.402 L 4.891 6.112 L 6.006 5.467 L 7.119 6.112 L 7.119 7.402 L 6.006 8.045 Z"
32
- fill="#F49676"
33
- />
34
- <path
35
- d="M 8.056 12.323 L 6.206 11.256 L 6.206 9.115 L 8.056 8.045 L 9.904 9.115 L 9.904 11.256 L 8.056 12.323 Z M 6.523 11.07 L 8.056 11.956 L 9.587 11.07 L 9.587 9.298 L 8.056 8.412 L 6.523 9.298 L 6.523 11.07 Z"
36
- fill="#F49676"
37
- />
38
- <path
39
- d="M 8.08 11.47 L 6.965 10.827 L 6.965 9.537 L 8.08 8.892 L 9.193 9.537 L 9.193 10.827 L 8.08 11.47 Z"
40
- fill="#F49676"
41
- />
42
- <path
43
- d="M 10.101 8.878 L 8.251 7.811 L 8.251 5.67 L 10.101 4.6 L 11.949 5.67 L 11.949 7.811 L 10.101 8.878 Z M 8.568 7.625 L 10.101 8.511 L 11.632 7.625 L 11.632 5.853 L 10.101 4.967 L 8.568 5.853 L 8.568 7.625 Z"
44
- fill="#F49676"
45
- />
46
- <path
47
- d="M 10.125 8.025 L 9.01 7.382 L 9.01 6.092 L 10.125 5.447 L 11.238 6.092 L 11.238 7.382 L 10.125 8.025 Z"
48
- fill="#F49676"
49
- />
50
- <path
51
- d="M 12.077 12.301 L 10.227 11.234 L 10.227 9.093 L 12.077 8.023 L 13.925 9.093 L 13.925 11.234 L 12.077 12.301 Z M 10.544 11.048 L 12.077 11.934 L 13.608 11.048 L 13.608 9.276 L 12.077 8.39 L 10.544 9.276 L 10.544 11.048 Z"
52
- fill="#F49676"
53
- />
54
- <path
55
- d="M 12.101 11.448 L 10.986 10.805 L 10.986 9.515 L 12.101 8.87 L 13.214 9.515 L 13.214 10.805 L 12.101 11.448 Z"
56
- fill="#F49676"
57
- />
58
- <path
59
- d="M 10.062 15.781 L 8.212 14.714 L 8.212 12.573 L 10.062 11.503 L 11.91 12.573 L 11.91 14.714 L 10.062 15.781 Z M 8.529 14.528 L 10.062 15.414 L 11.593 14.528 L 11.593 12.756 L 10.062 11.87 L 8.529 12.756 L 8.529 14.528 Z"
60
- fill="#F49676"
61
- />
62
- <path
63
- d="M 8.029 19.193 L 6.179 18.126 L 6.179 15.985 L 8.029 14.915 L 9.877 15.985 L 9.877 18.126 L 8.029 19.193 Z M 6.496 17.94 L 8.029 18.826 L 9.56 17.94 L 9.56 16.168 L 8.029 15.282 L 6.496 16.168 L 6.496 17.94 Z"
64
- fill="#F49676"
65
- />
66
- <path
67
- d="M 6.068 15.716 L 4.218 14.649 L 4.218 12.508 L 6.068 11.438 L 7.916 12.508 L 7.916 14.649 L 6.068 15.716 Z M 4.535 14.463 L 6.068 15.349 L 7.599 14.463 L 7.599 12.691 L 6.068 11.805 L 4.535 12.691 L 4.535 14.463 Z"
68
- fill="#F49676"
69
- />
70
- <path
71
- d="M 6.092 14.863 L 4.977 14.22 L 4.977 12.93 L 6.092 12.285 L 7.205 12.93 L 7.205 14.22 L 6.092 14.863 Z"
72
- fill="#F49676"
73
- />
74
- <path
75
- d="M 4.011 12.393 L 2.161 11.326 L 2.161 9.185 L 4.011 8.115 L 5.859 9.185 L 5.859 11.326 L 4.011 12.393 Z M 2.478 11.14 L 4.011 12.026 L 5.542 11.14 L 5.542 9.368 L 4.011 8.482 L 2.478 9.368 L 2.478 11.14 Z"
76
- fill="#F49676"
77
- />
78
- <path
79
- d="M 2.083 15.773 L 0.233 14.706 L 0.233 12.565 L 2.083 11.495 L 3.931 12.565 L 3.931 14.706 L 2.083 15.773 Z M 0.55 14.52 L 2.083 15.406 L 3.614 14.52 L 3.614 12.748 L 2.083 11.862 L 0.55 12.748 L 0.55 14.52 Z"
80
- fill="#F49676"
81
- />
82
- <path
83
- d="M 2.107 14.92 L 0.992 14.277 L 0.992 12.987 L 2.107 12.342 L 3.22 12.987 L 3.22 14.277 L 2.107 14.92 Z"
84
- fill="#F49676"
85
- />
86
- <path
87
- d="M 3.966 19.231 L 2.116 18.164 L 2.116 16.023 L 3.966 14.953 L 5.814 16.023 L 5.814 18.164 L 3.966 19.231 Z M 2.433 17.978 L 3.966 18.864 L 5.497 17.978 L 5.497 16.206 L 3.966 15.32 L 2.433 16.206 L 2.433 17.978 Z"
88
- fill="#F49676"
89
- />
90
- <path
91
- d="M 3.99 18.378 L 2.875 17.735 L 2.875 16.445 L 3.99 15.8 L 5.103 16.445 L 5.103 17.735 L 3.99 18.378 Z"
92
- fill="#F49676"
93
- />
94
- </svg>
95
- );
96
- }
97
-
98
- const Default3SideContainer = styled.div`
99
- svg {
100
- height: 100%;
101
- width: auto;
102
- path {
103
- fill: #ffffff22;
104
- transition: fill 3s;
105
- &:hover {
106
- fill: #ffffffbb;
107
- }
108
- }
109
- }
110
- `;
111
- const Default2LayoutContainer = styled.div`
112
- h2,
113
- h3 {
114
- text-align: left;
115
- color: white;
116
- }
117
- `;
118
- export const Default3Layout = ({
119
- children,
120
- position = "right",
121
- }: {
122
- children: React.ReactNode;
123
- position?: "left" | "right";
124
- }) => {
125
- const isReversed = position === "left";
126
- return (
127
- <Default2LayoutContainer
128
- style={{
129
- display: "flex",
130
- position: "absolute",
131
- flexDirection: isReversed ? "row-reverse" : "row",
132
- inset: 0,
133
- alignItems: "center",
134
- }}
135
- >
136
- <Default3SideContainer
137
- style={{
138
- flex: 1,
139
- height: "100%",
140
- padding: "2rem",
141
- transform: isReversed
142
- ? "scale(2) translate(25%, 4%)"
143
- : "scale(2) translate(-25%, 15%)",
144
- }}
145
- >
146
- <MultipleHexagons position={position} />
147
- </Default3SideContainer>
148
- <div
149
- style={{
150
- flex: 4,
151
- marginLeft: isReversed ? Margins.horizontal : "2rem",
152
- marginRight: isReversed ? "2rem" : Margins.horizontal,
153
- }}
154
- >
155
- {children}
156
- </div>
157
- </Default2LayoutContainer>
158
- );
159
- };
@@ -1,31 +0,0 @@
1
- import React from "react";
2
-
3
- import { FlexBox } from "spectacle";
4
-
5
- import frontImage from "../front.png";
6
-
7
- export const MainSectionLayout = ({
8
- children,
9
- }: {
10
- children: React.ReactNode;
11
- }) => {
12
- return (
13
- <FlexBox
14
- height="100%"
15
- width="100%"
16
- flexDirection="row"
17
- style={{
18
- position: "absolute",
19
- inset: "none",
20
- right: 0,
21
- top: 0,
22
- bottom: 0,
23
- }}
24
- >
25
- <div style={{ paddingLeft: "8rem", flex: 1 }}>{children}</div>
26
- <div style={{ flex: "0 0", height: "100%", paddingLeft: "5rem" }}>
27
- <img src={frontImage} alt="Front" style={{ height: "100%" }} />
28
- </div>
29
- </FlexBox>
30
- );
31
- };