@gpichot/spectacle-deck 1.2.1 → 1.2.3
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.
- package/{dist/index.cjs → index.cjs} +2 -1
- package/{dist/index.mjs → index.mjs} +2 -1
- package/package.json +16 -21
- package/.turbo/turbo-build.log +0 -4
- package/.turbo/turbo-dev.log +0 -4
- package/publish.sh +0 -7
- package/scripts/bundle.ts +0 -84
- package/src/SlideWrapper.tsx +0 -25
- package/src/colors.ts +0 -42
- package/src/components/CodeStepper/CodeStepper.tsx +0 -228
- package/src/components/CodeStepper/code-directives.test.ts +0 -58
- package/src/components/CodeStepper/code-directives.ts +0 -129
- package/src/components/DocumentationItem.tsx +0 -85
- package/src/components/FilePane.tsx +0 -18
- package/src/components/HorizontalList.tsx +0 -141
- package/src/components/IconBox.tsx +0 -31
- package/src/components/Image.tsx +0 -39
- package/src/components/ItemsColumn.tsx +0 -60
- package/src/components/QRCode.tsx +0 -55
- package/src/components/Timeline.styled.tsx +0 -24
- package/src/components/Timeline.tsx +0 -159
- package/src/components/map.tsx +0 -128
- package/src/components/styled.tsx +0 -73
- package/src/context.tsx +0 -33
- package/src/front.png +0 -0
- package/src/index.tsx +0 -127
- package/src/layouts/BaseLayout.tsx +0 -52
- package/src/layouts/CenteredLayout.tsx +0 -40
- package/src/layouts/Default3Layout.tsx +0 -159
- package/src/layouts/MainSectionLayout.tsx +0 -31
- package/src/layouts/QuoteLayout.tsx +0 -107
- package/src/layouts/SectionLayout.tsx +0 -14
- package/src/layouts/SideCodeLayout.tsx +0 -44
- package/src/layouts/SideImageLayout.tsx +0 -82
- package/src/layouts/SideLayout.tsx +0 -31
- package/src/layouts/columns.tsx +0 -56
- package/src/layouts/index.tsx +0 -19
- package/src/layouts/styled.ts +0 -7
- package/src/layouts/utils.ts +0 -66
- package/src/node.d.ts +0 -5
- package/src/style.d.ts +0 -10
- package/src/template.tsx +0 -25
- package/src/theme.ts +0 -28
- package/tsconfig.json +0 -29
- /package/{dist/SlideWrapper.d.ts → SlideWrapper.d.ts} +0 -0
- /package/{dist/colors.d.ts → colors.d.ts} +0 -0
- /package/{dist/components → components}/CodeStepper/CodeStepper.d.ts +0 -0
- /package/{dist/components → components}/CodeStepper/code-directives.d.ts +0 -0
- /package/{dist/components → components}/DocumentationItem.d.ts +0 -0
- /package/{dist/components → components}/FilePane.d.ts +0 -0
- /package/{dist/components → components}/HorizontalList.d.ts +0 -0
- /package/{dist/components → components}/IconBox.d.ts +0 -0
- /package/{dist/components → components}/Image.d.ts +0 -0
- /package/{dist/components → components}/ItemsColumn.d.ts +0 -0
- /package/{dist/components → components}/QRCode.d.ts +0 -0
- /package/{dist/components → components}/Timeline.d.ts +0 -0
- /package/{dist/components → components}/Timeline.styled.d.ts +0 -0
- /package/{dist/components → components}/map.d.ts +0 -0
- /package/{dist/components → components}/styled.d.ts +0 -0
- /package/{dist/context.d.ts → context.d.ts} +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/layouts → layouts}/BaseLayout.d.ts +0 -0
- /package/{dist/layouts → layouts}/CenteredLayout.d.ts +0 -0
- /package/{dist/layouts → layouts}/Default3Layout.d.ts +0 -0
- /package/{dist/layouts → layouts}/MainSectionLayout.d.ts +0 -0
- /package/{dist/layouts → layouts}/QuoteLayout.d.ts +0 -0
- /package/{dist/layouts → layouts}/SectionLayout.d.ts +0 -0
- /package/{dist/layouts → layouts}/SideCodeLayout.d.ts +0 -0
- /package/{dist/layouts → layouts}/SideImageLayout.d.ts +0 -0
- /package/{dist/layouts → layouts}/SideLayout.d.ts +0 -0
- /package/{dist/layouts → layouts}/columns.d.ts +0 -0
- /package/{dist/layouts → layouts}/index.d.ts +0 -0
- /package/{dist/layouts → layouts}/styled.d.ts +0 -0
- /package/{dist/layouts → layouts}/utils.d.ts +0 -0
- /package/{dist/template.d.ts → template.d.ts} +0 -0
- /package/{dist/theme.d.ts → theme.d.ts} +0 -0
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { getMatchingMdxType } from "./utils";
|
|
4
|
-
import { BaseLayout } from "./BaseLayout";
|
|
5
|
-
|
|
6
|
-
function invariant(condition: any, message: string) {
|
|
7
|
-
if (!condition) {
|
|
8
|
-
throw new Error(message);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const QuoteBaseLayout = styled.div`
|
|
13
|
-
position: absolute;
|
|
14
|
-
inset: 0;
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-flow: column nowrap;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
.blockquote > * {
|
|
19
|
-
border-left: 0;
|
|
20
|
-
}
|
|
21
|
-
.blockquote {
|
|
22
|
-
text-align: justify;
|
|
23
|
-
position: relative;
|
|
24
|
-
}
|
|
25
|
-
.blockquote > :first-child {
|
|
26
|
-
&:before {
|
|
27
|
-
content: "“";
|
|
28
|
-
position: absolute;
|
|
29
|
-
font-size: 16rem;
|
|
30
|
-
left: -5rem;
|
|
31
|
-
font-family: serif;
|
|
32
|
-
top: 50%;
|
|
33
|
-
transform: translateY(-50%);
|
|
34
|
-
color: #ffffff22;
|
|
35
|
-
}
|
|
36
|
-
&:after {
|
|
37
|
-
content: "”";
|
|
38
|
-
position: absolute;
|
|
39
|
-
font-size: 16rem;
|
|
40
|
-
right: 3rem;
|
|
41
|
-
bottom: -5rem;
|
|
42
|
-
font-family: serif;
|
|
43
|
-
color: #ffffff22;
|
|
44
|
-
pointer-events: none;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
.blockquote * {
|
|
48
|
-
line-height: 3.5rem !important;
|
|
49
|
-
font-size: 2.5rem;
|
|
50
|
-
}
|
|
51
|
-
.source {
|
|
52
|
-
font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
53
|
-
box-sizing: border-box;
|
|
54
|
-
width: 100%;
|
|
55
|
-
margin-top: 4rem;
|
|
56
|
-
text-align: right;
|
|
57
|
-
font-size: 2rem;
|
|
58
|
-
a {
|
|
59
|
-
text-decoration: none;
|
|
60
|
-
color: #ffffff77;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
`;
|
|
64
|
-
export function QuoteLayout({
|
|
65
|
-
children,
|
|
66
|
-
author,
|
|
67
|
-
sourceUrl,
|
|
68
|
-
}: {
|
|
69
|
-
children: React.ReactNode;
|
|
70
|
-
author: string;
|
|
71
|
-
sourceUrl?: string;
|
|
72
|
-
}) {
|
|
73
|
-
const [blockquote, rest] = getMatchingMdxType(children, "blockquote");
|
|
74
|
-
invariant(rest, "QuoteLayout can only have one blockquote");
|
|
75
|
-
return (
|
|
76
|
-
<QuoteBaseLayout>
|
|
77
|
-
<div
|
|
78
|
-
style={{
|
|
79
|
-
display: "flex",
|
|
80
|
-
flexDirection: "column",
|
|
81
|
-
alignItems: "flex-start",
|
|
82
|
-
justifyContent: "center",
|
|
83
|
-
textAlign: "center",
|
|
84
|
-
margin: "0 4rem 0 12rem",
|
|
85
|
-
}}
|
|
86
|
-
>
|
|
87
|
-
<div
|
|
88
|
-
style={{
|
|
89
|
-
flex: 1,
|
|
90
|
-
padding: "0 12rem 0 2rem",
|
|
91
|
-
boxSizing: "border-box",
|
|
92
|
-
}}
|
|
93
|
-
className="blockquote"
|
|
94
|
-
>
|
|
95
|
-
{blockquote}
|
|
96
|
-
</div>
|
|
97
|
-
<div className="source" style={{ flex: 1, padding: "0 4rem" }}>
|
|
98
|
-
{
|
|
99
|
-
<a href={sourceUrl} target="_blank" rel="noopener noreferrer">
|
|
100
|
-
{author}
|
|
101
|
-
</a>
|
|
102
|
-
}
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
</QuoteBaseLayout>
|
|
106
|
-
);
|
|
107
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
|
|
3
|
-
export const SectionLayout = styled.div`
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: space-between;
|
|
8
|
-
height: 100%;
|
|
9
|
-
padding-left: 9rem;
|
|
10
|
-
|
|
11
|
-
h2 {
|
|
12
|
-
color: white;
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ColumnsLayout } from "./columns";
|
|
3
|
-
import { Margins, getCodeChildren } from "./utils";
|
|
4
|
-
import styled from "styled-components";
|
|
5
|
-
|
|
6
|
-
const CodeSide = styled.div`
|
|
7
|
-
pre {
|
|
8
|
-
font-size: 0.9rem;
|
|
9
|
-
}
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
export function SidedCodeLayout({
|
|
13
|
-
children,
|
|
14
|
-
position = "right",
|
|
15
|
-
}: {
|
|
16
|
-
children: React.ReactNode;
|
|
17
|
-
position?: "left" | "right";
|
|
18
|
-
}) {
|
|
19
|
-
const [code, rest] = getCodeChildren(children);
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<ColumnsLayout reverse={position === "left"}>
|
|
23
|
-
<div
|
|
24
|
-
style={{
|
|
25
|
-
marginLeft: Margins.horizontal,
|
|
26
|
-
paddingRight: Margins.horizontalInternal,
|
|
27
|
-
}}
|
|
28
|
-
>
|
|
29
|
-
{rest}
|
|
30
|
-
</div>
|
|
31
|
-
<CodeSide
|
|
32
|
-
style={{
|
|
33
|
-
backgroundColor: "#1d2021",
|
|
34
|
-
height: "100%",
|
|
35
|
-
display: "flex",
|
|
36
|
-
flexDirection: "column",
|
|
37
|
-
justifyContent: "center",
|
|
38
|
-
}}
|
|
39
|
-
>
|
|
40
|
-
{code}
|
|
41
|
-
</CodeSide>
|
|
42
|
-
</ColumnsLayout>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { SVGObject } from "./styled";
|
|
4
|
-
import { getMatchingMdxType } from "./utils";
|
|
5
|
-
import { Image } from "../components/Image";
|
|
6
|
-
|
|
7
|
-
const DivWithHeading = styled.div`
|
|
8
|
-
h2 {
|
|
9
|
-
margin-top: 0;
|
|
10
|
-
}
|
|
11
|
-
h2 strong {
|
|
12
|
-
color: var(--color-secondary);
|
|
13
|
-
font-weight: 400;
|
|
14
|
-
}
|
|
15
|
-
`;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Parse a ratio like 6/5
|
|
19
|
-
*/
|
|
20
|
-
function parseRatio(ratio: string) {
|
|
21
|
-
const [a, b] = ratio.split("/");
|
|
22
|
-
return { left: parseInt(a), right: parseInt(b) };
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const SidedImageLayout = ({
|
|
26
|
-
children,
|
|
27
|
-
image,
|
|
28
|
-
position,
|
|
29
|
-
height,
|
|
30
|
-
ratio: ratioProp,
|
|
31
|
-
}: {
|
|
32
|
-
children: React.ReactNode;
|
|
33
|
-
image?: string;
|
|
34
|
-
position?: "left" | "right";
|
|
35
|
-
ratio?: string;
|
|
36
|
-
height?: number;
|
|
37
|
-
}) => {
|
|
38
|
-
const isReversed = position === "left";
|
|
39
|
-
const [component, rest] = getMatchingMdxType(children, "Image") || image;
|
|
40
|
-
const ratio = parseRatio(ratioProp || "6/4");
|
|
41
|
-
|
|
42
|
-
if (!image && !component.length) {
|
|
43
|
-
console.error("No image provided for SidedImageLayout");
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
return (
|
|
47
|
-
<DivWithHeading
|
|
48
|
-
style={{
|
|
49
|
-
display: "flex",
|
|
50
|
-
flexDirection: isReversed ? "row-reverse" : "row",
|
|
51
|
-
position: "absolute",
|
|
52
|
-
left: 0,
|
|
53
|
-
right: 0,
|
|
54
|
-
bottom: 0,
|
|
55
|
-
top: 0,
|
|
56
|
-
}}
|
|
57
|
-
>
|
|
58
|
-
<div
|
|
59
|
-
style={{
|
|
60
|
-
flex: `${ratio.left || 6} 0`,
|
|
61
|
-
display: "flex",
|
|
62
|
-
flexDirection: "column",
|
|
63
|
-
justifyContent: "center",
|
|
64
|
-
padding: isReversed ? "0 7rem 0 4rem" : "0 4rem 0 7rem",
|
|
65
|
-
}}
|
|
66
|
-
>
|
|
67
|
-
{rest}
|
|
68
|
-
</div>
|
|
69
|
-
<div
|
|
70
|
-
style={{
|
|
71
|
-
flex: `${ratio.right || 4} 0`,
|
|
72
|
-
display: "flex",
|
|
73
|
-
flexDirection: "column",
|
|
74
|
-
justifyContent: "center",
|
|
75
|
-
backgroundColor: "white",
|
|
76
|
-
}}
|
|
77
|
-
>
|
|
78
|
-
{component || <Image src={image} />}
|
|
79
|
-
</div>
|
|
80
|
-
</DivWithHeading>
|
|
81
|
-
);
|
|
82
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ColumnsLayout } from "./columns";
|
|
3
|
-
import { Margins, getMatchingMdxType } from "./utils";
|
|
4
|
-
|
|
5
|
-
export function SideLayout({
|
|
6
|
-
children,
|
|
7
|
-
position = "right",
|
|
8
|
-
}: {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
position?: "right" | "left";
|
|
11
|
-
}) {
|
|
12
|
-
const [side, rest] = getMatchingMdxType(children, "Side");
|
|
13
|
-
return (
|
|
14
|
-
<ColumnsLayout reverse={position === "left"}>
|
|
15
|
-
<div style={{ marginLeft: Margins.horizontal }}>{rest}</div>
|
|
16
|
-
<div
|
|
17
|
-
style={{
|
|
18
|
-
marginLeft: Margins.horizontalInternal,
|
|
19
|
-
padding: `0 ${Margins.vertical}`,
|
|
20
|
-
backgroundColor: "#00000044",
|
|
21
|
-
display: "flex",
|
|
22
|
-
flexDirection: "column",
|
|
23
|
-
justifyContent: "center",
|
|
24
|
-
height: "100%",
|
|
25
|
-
}}
|
|
26
|
-
>
|
|
27
|
-
{side}
|
|
28
|
-
</div>
|
|
29
|
-
</ColumnsLayout>
|
|
30
|
-
);
|
|
31
|
-
}
|
package/src/layouts/columns.tsx
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
|
|
4
|
-
const DivWithHeading = styled.div`
|
|
5
|
-
h2 {
|
|
6
|
-
margin-top: 0;
|
|
7
|
-
}
|
|
8
|
-
h2 strong {
|
|
9
|
-
color: var(--color-secondary);
|
|
10
|
-
font-weight: 400;
|
|
11
|
-
}
|
|
12
|
-
`;
|
|
13
|
-
|
|
14
|
-
const ColumnsContainer = styled(DivWithHeading)`
|
|
15
|
-
display: flex;
|
|
16
|
-
flex-direction: row;
|
|
17
|
-
position: absolute;
|
|
18
|
-
left: 0;
|
|
19
|
-
right: 0;
|
|
20
|
-
top: 0;
|
|
21
|
-
bottom: 0;
|
|
22
|
-
alignitems: center;
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
export function ColumnsLayout({
|
|
26
|
-
children,
|
|
27
|
-
reverse,
|
|
28
|
-
}: {
|
|
29
|
-
children: React.ReactNode;
|
|
30
|
-
reverse?: boolean;
|
|
31
|
-
}) {
|
|
32
|
-
const childrenArray = React.Children.toArray(children);
|
|
33
|
-
return (
|
|
34
|
-
<ColumnsContainer
|
|
35
|
-
style={{
|
|
36
|
-
flexDirection: reverse ? "row-reverse" : "row",
|
|
37
|
-
}}
|
|
38
|
-
>
|
|
39
|
-
{childrenArray.map((child, i) => (
|
|
40
|
-
<div
|
|
41
|
-
key={i}
|
|
42
|
-
style={{
|
|
43
|
-
flex: 1,
|
|
44
|
-
height: "100%",
|
|
45
|
-
display: "flex",
|
|
46
|
-
flexFlow: "column",
|
|
47
|
-
justifyContent: "center",
|
|
48
|
-
boxSizing: "border-box",
|
|
49
|
-
}}
|
|
50
|
-
>
|
|
51
|
-
{child}
|
|
52
|
-
</div>
|
|
53
|
-
))}
|
|
54
|
-
</ColumnsContainer>
|
|
55
|
-
);
|
|
56
|
-
}
|
package/src/layouts/index.tsx
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CenteredLayout } from "./CenteredLayout";
|
|
2
|
-
import { Default3Layout } from "./Default3Layout";
|
|
3
|
-
import { MainSectionLayout } from "./MainSectionLayout";
|
|
4
|
-
import { QuoteLayout } from "./QuoteLayout";
|
|
5
|
-
import { SectionLayout } from "./SectionLayout";
|
|
6
|
-
import { SidedCodeLayout } from "./SideCodeLayout";
|
|
7
|
-
import { SidedImageLayout } from "./SideImageLayout";
|
|
8
|
-
import { SideLayout } from "./SideLayout";
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
mainSection: MainSectionLayout,
|
|
12
|
-
centered: CenteredLayout,
|
|
13
|
-
default3: Default3Layout,
|
|
14
|
-
quote: QuoteLayout,
|
|
15
|
-
sidedCode: SidedCodeLayout,
|
|
16
|
-
sidedImage: SidedImageLayout,
|
|
17
|
-
side: SideLayout,
|
|
18
|
-
section: SectionLayout,
|
|
19
|
-
};
|
package/src/layouts/styled.ts
DELETED
package/src/layouts/utils.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
export const Margins = {
|
|
4
|
-
vertical: "4rem",
|
|
5
|
-
horizontal: "7rem",
|
|
6
|
-
horizontalInternal: "2rem",
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export function getHeading(children: React.ReactNode) {
|
|
10
|
-
const allChild = React.Children.toArray(children);
|
|
11
|
-
if (allChild.length === 0) return [null, allChild];
|
|
12
|
-
const [candidate, ...rest] = allChild;
|
|
13
|
-
if (!React.isValidElement(candidate)) return [null, allChild];
|
|
14
|
-
if (["h2", "h3"].includes(candidate.props.originalType)) {
|
|
15
|
-
return [candidate, rest];
|
|
16
|
-
}
|
|
17
|
-
return [null, allChild];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function getCode(children: React.ReactNode) {
|
|
21
|
-
const allChild = React.Children.toArray(children);
|
|
22
|
-
|
|
23
|
-
if (allChild.length === 0) return [null, allChild];
|
|
24
|
-
|
|
25
|
-
const index = allChild.findIndex((child) => {
|
|
26
|
-
if (!React.isValidElement(child)) return false;
|
|
27
|
-
return child.props.originalType === "pre";
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
if (index === -1) return [null, allChild];
|
|
31
|
-
|
|
32
|
-
const candidate = allChild[index];
|
|
33
|
-
const rest = allChild.filter((_, i) => i !== index);
|
|
34
|
-
return [candidate, rest];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function getMatchingMdxType(children: React.ReactNode, mdxType: string) {
|
|
38
|
-
const allChild = React.Children.toArray(children);
|
|
39
|
-
|
|
40
|
-
const matchFn = (child: React.ReactNode) => {
|
|
41
|
-
if (!React.isValidElement(child)) return false;
|
|
42
|
-
if (typeof child.type !== "function") return false;
|
|
43
|
-
if (child.type.name === mdxType) return true;
|
|
44
|
-
if ("mdxType" in child.type === false) return false;
|
|
45
|
-
|
|
46
|
-
return child.type.mdxType === mdxType;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const matches = allChild.filter(matchFn);
|
|
50
|
-
|
|
51
|
-
const rest = allChild.filter((child) => !matchFn(child));
|
|
52
|
-
|
|
53
|
-
return [matches, rest];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function getCodeChildren(children: React.ReactNode) {
|
|
57
|
-
const [code, rest] = getCode(children);
|
|
58
|
-
if (code) return [code, rest];
|
|
59
|
-
|
|
60
|
-
const [codeStepper, rest2] = getMatchingMdxType(children, "CodeStepper");
|
|
61
|
-
if (codeStepper.length > 0) return [codeStepper, rest2];
|
|
62
|
-
|
|
63
|
-
const [codes, rest3] = getMatchingMdxType(children, "FilePane");
|
|
64
|
-
|
|
65
|
-
return [codes, rest3];
|
|
66
|
-
}
|
package/src/node.d.ts
DELETED
package/src/style.d.ts
DELETED
package/src/template.tsx
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import { Box, FullScreen } from "spectacle";
|
|
4
|
-
|
|
5
|
-
export const template = ({ slideNumber, numberOfSlides }) => {
|
|
6
|
-
const percentage = (slideNumber / numberOfSlides) * 100;
|
|
7
|
-
return (
|
|
8
|
-
<div style={{ position: "absolute", bottom: 0, left: 0, right: 0 }}>
|
|
9
|
-
<Box padding="0 0 0.5em 0.7em">
|
|
10
|
-
<FullScreen />
|
|
11
|
-
</Box>
|
|
12
|
-
|
|
13
|
-
<div style={{ width: "100%", height: "4px", background: "#ffffff11" }}>
|
|
14
|
-
<div
|
|
15
|
-
style={{
|
|
16
|
-
width: `${percentage}%`,
|
|
17
|
-
height: "2px",
|
|
18
|
-
background: "#ffffff77",
|
|
19
|
-
transition: "width 0.3s ease",
|
|
20
|
-
}}
|
|
21
|
-
/>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
};
|
package/src/theme.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import "@fontsource/bitter/300.css";
|
|
2
|
-
import "@fontsource/bitter/400.css";
|
|
3
|
-
import "@fontsource/bitter/500.css";
|
|
4
|
-
import "@fontsource/bitter/700.css";
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
colors: {
|
|
8
|
-
//primary: "white",
|
|
9
|
-
primary: "rgb(43,19,90)",
|
|
10
|
-
|
|
11
|
-
secondary: "rgb(86,212,248)",
|
|
12
|
-
// secondary: "#F49676",
|
|
13
|
-
// tertiary: "#042F3B",
|
|
14
|
-
tertiary: "rgb(43,19,90)",
|
|
15
|
-
},
|
|
16
|
-
fonts: {
|
|
17
|
-
header: 'Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif',
|
|
18
|
-
text: 'Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif',
|
|
19
|
-
},
|
|
20
|
-
fontSizes: {
|
|
21
|
-
h1: "48px",
|
|
22
|
-
h2: "32px",
|
|
23
|
-
h3: "24px",
|
|
24
|
-
text: "24px",
|
|
25
|
-
monospace: "16px",
|
|
26
|
-
},
|
|
27
|
-
space: [8, 16, 24],
|
|
28
|
-
};
|
package/tsconfig.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Target node 14 */
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"lib": ["ES2020", "DOM"],
|
|
6
|
-
"target": "ES2020",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
|
|
9
|
-
/* Transpile with esbuild */
|
|
10
|
-
"moduleResolution": "bundler",
|
|
11
|
-
"allowSyntheticDefaultImports": true,
|
|
12
|
-
|
|
13
|
-
/* Linting */
|
|
14
|
-
"strict": true,
|
|
15
|
-
"noUnusedLocals": true,
|
|
16
|
-
"noFallthroughCasesInSwitch": true,
|
|
17
|
-
"useUnknownInCatchVariables": true,
|
|
18
|
-
|
|
19
|
-
// Options
|
|
20
|
-
"outDir": "dist",
|
|
21
|
-
"baseUrl": "./src",
|
|
22
|
-
"esModuleInterop": true,
|
|
23
|
-
"declaration": true,
|
|
24
|
-
"jsx": "react",
|
|
25
|
-
"types": ["./src/node.d.ts"],
|
|
26
|
-
},
|
|
27
|
-
"include": ["src/**/*"],
|
|
28
|
-
"files": ["src/style.d.ts"],
|
|
29
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|