presi-slides 1.0.0

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.
@@ -0,0 +1,48 @@
1
+ import { HtmlBasePlugin } from "@11ty/eleventy";
2
+ import slideTransform from "./transforms/slides.js";
3
+
4
+ const output = process.env.STATIC || "static";
5
+
6
+ export default async function (eleventyConfig) {
7
+
8
+ // pass through all assets
9
+ eleventyConfig.addPassthroughCopy(
10
+ "slide-decks/**/assets/*"
11
+ );
12
+ // make dist available from client
13
+ eleventyConfig.addPassthroughCopy("dist");
14
+
15
+ eleventyConfig.addPlugin(HtmlBasePlugin);
16
+
17
+ eleventyConfig.addTransform("slide", slideTransform);
18
+
19
+ eleventyConfig.addGlobalData("permalink", () => {
20
+ return (data) => {
21
+ const { filePathStem, outputFileExtension } = data.page;
22
+ const filePath = filePathStem.split("/");
23
+
24
+ if (
25
+ filePath[filePath.length - 1] === "text" &&
26
+ filePath[filePath.length - 2].endsWith(".textbundle")
27
+ ) {
28
+ // for textbundles, use the bundle directory
29
+ return filePath.slice(0, -1).join("/") + "/";
30
+ }
31
+
32
+ // for HTML create a directory and an index.html
33
+ return data.page.outputFileExtension === "html" &&
34
+ !data.page.filePathStem.endsWith("/index")
35
+ ? `${data.page.filePathStem}/index.${data.page.outputFileExtension}`
36
+ : `${data.page.filePathStem}.${data.page.outputFileExtension}`;
37
+ };
38
+ });
39
+
40
+ return {
41
+ dir: {
42
+ input: "slide-decks/",
43
+ output: output,
44
+ includes: "../dist",
45
+ layouts: "../layouts"
46
+ }
47
+ };
48
+ }
package/index.html ADDED
@@ -0,0 +1,42 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>{{ title }}</title>
6
+ <link
7
+ rel="preconnect"
8
+ href="https://fonts.googleapis.com" />
9
+ <link
10
+ rel="preconnect"
11
+ href="https://fonts.gstatic.com"
12
+ crossorigin />
13
+ <link
14
+ href="https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&family=Pridi:wght@300;400;600;700&display=swap"
15
+ rel="stylesheet" />
16
+ <link rel="stylesheet" href="/public/slides.css"/>
17
+ <link rel="stylesheet" href="/public/prism-theme.css"/>
18
+ </head>
19
+ <body>
20
+ <slide-presi>
21
+ <slide-view>
22
+ <h1 layout="title">Title Slide</h1>
23
+ </slide-view>
24
+ <slide-view>
25
+ <h1>Two-column Layout</h1>
26
+ <h3>Left side</h3>
27
+ <ul>
28
+ <li>One</li>
29
+ <li>Two</li>
30
+ <li>Three</li>
31
+ </ul>
32
+ <h3>Right side</h3>
33
+ <ol>
34
+ <li>Red</li>
35
+ <li>Green</li>
36
+ <li>Blue</li>
37
+ </ol>
38
+ </slide-view>
39
+ </slide-presi>
40
+ <script type="module" src="src/index.js"></script>
41
+ </body>
42
+ </html>
@@ -0,0 +1,23 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>{{ title }}</title>
6
+ <link
7
+ rel="preconnect"
8
+ href="https://fonts.googleapis.com" />
9
+ <link
10
+ rel="preconnect"
11
+ href="https://fonts.gstatic.com"
12
+ crossorigin />
13
+ <link
14
+ href="https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&family=Pridi:wght@300;400;600;700&display=swap"
15
+ rel="stylesheet" />
16
+ <link rel="stylesheet" href="/dist/slides.css"/>
17
+ <link rel="stylesheet" href="/dist/prism-theme.css"/>
18
+ </head>
19
+ <body>
20
+ {{ content | safe }}
21
+ </body>
22
+ <script type="module" src="/dist/presi-slides.js"></script>
23
+ </html>
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "presi-slides",
3
+ "version": "1.0.0",
4
+ "description": "Make slides with Markdown",
5
+ "keywords": [
6
+ "Presentation",
7
+ "Slides",
8
+ "Markdown"
9
+ ],
10
+ "homepage": "https://github.com/kubiak-calpoly/presi-slides#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/kubiak-calpoly/presi-slides/issues"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/kubiak-calpoly/presi-slides.git"
17
+ },
18
+ "license": "BSD-3-Clause",
19
+ "author": "kubiak@calpoly.edu",
20
+ "type": "module",
21
+ "main": "dist/index.js",
22
+ "scripts": {
23
+ "build": "vite build",
24
+ "dev": "npx @11ty/eleventy --serve",
25
+ "serve": "npx http-server ./dist",
26
+ "test": "echo \"Error: no test specified\" && exit 1"
27
+ },
28
+ "dependencies": {
29
+ "@unbndl/html": "^1.0.7",
30
+ "jsdom": "^29.1.1",
31
+ "konva": "^10.3.1",
32
+ "vite": "^8.2.2"
33
+ },
34
+ "devDependencies": {
35
+ "@11ty/eleventy": "^3.1.5",
36
+ "http-server": "^14.1.1"
37
+ }
38
+ }
@@ -0,0 +1,143 @@
1
+ /**
2
+ * Coy without shadows
3
+ * Based on Tim Shedor's Coy theme for prism.js
4
+ * Author: RunDevelopment
5
+ */
6
+
7
+ code[class*="language-"],
8
+ pre[class*="language-"] {
9
+ color: black;
10
+ background: none;
11
+ font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
12
+ font-size: 1em;
13
+ text-align: left;
14
+ white-space: pre;
15
+ word-spacing: normal;
16
+ word-break: normal;
17
+ word-wrap: normal;
18
+ line-height: 1.5;
19
+
20
+ -moz-tab-size: 4;
21
+ -o-tab-size: 4;
22
+ tab-size: 4;
23
+
24
+ -webkit-hyphens: none;
25
+ -moz-hyphens: none;
26
+ -ms-hyphens: none;
27
+ hyphens: none;
28
+ }
29
+
30
+ /* Code blocks */
31
+ pre[class*="language-"] {
32
+ position: relative;
33
+ border-left: 10px solid #358ccb;
34
+ box-shadow: -1px 0 0 0 #358ccb, 0 0 0 1px #dfdfdf;
35
+ background-color: #fdfdfd;
36
+ background-image: repeating-linear-gradient(
37
+ transparent,
38
+ transparent 1.5em,
39
+ rgba(69, 142, 209, 0.05) 1.5em,
40
+ rgba(69, 142, 209, 0.05) 3em);
41
+ background-origin: content-box;
42
+ background-attachment: local;
43
+ margin: .5em 0;
44
+ padding: 0 1em;
45
+ }
46
+
47
+ pre[class*="language-"] > code {
48
+ display: block;
49
+ }
50
+
51
+ /* Inline code */
52
+ :not(pre) > code[class*="language-"] {
53
+ position: relative;
54
+ padding: .2em;
55
+ border-radius: 0.3em;
56
+ color: #c92c2c;
57
+ border: 1px solid rgba(0, 0, 0, 0.1);
58
+ display: inline;
59
+ white-space: normal;
60
+ background-color: #fdfdfd;
61
+ -webkit-box-sizing: border-box;
62
+ -moz-box-sizing: border-box;
63
+ box-sizing: border-box;
64
+ }
65
+
66
+ .token.comment,
67
+ .token.block-comment,
68
+ .token.prolog,
69
+ .token.doctype,
70
+ .token.cdata {
71
+ color: #7D8B99;
72
+ }
73
+
74
+ .token.punctuation {
75
+ color: #5F6364;
76
+ }
77
+
78
+ .token.property,
79
+ .token.tag,
80
+ .token.boolean,
81
+ .token.number,
82
+ .token.function-name,
83
+ .token.constant,
84
+ .token.symbol,
85
+ .token.deleted {
86
+ color: #c92c2c;
87
+ }
88
+
89
+ .token.selector,
90
+ .token.attr-name,
91
+ .token.string,
92
+ .token.char,
93
+ .token.function,
94
+ .token.builtin,
95
+ .token.inserted {
96
+ color: #2f9c0a;
97
+ }
98
+
99
+ .token.operator,
100
+ .token.entity,
101
+ .token.url,
102
+ .token.variable {
103
+ color: #a67f59;
104
+ background: rgba(255, 255, 255, 0.5);
105
+ }
106
+
107
+ .token.atrule,
108
+ .token.attr-value,
109
+ .token.keyword,
110
+ .token.class-name {
111
+ color: #1990b8;
112
+ }
113
+
114
+ .token.regex,
115
+ .token.important {
116
+ color: #e90;
117
+ }
118
+
119
+ .language-css .token.string,
120
+ .style .token.string {
121
+ color: #a67f59;
122
+ background: rgba(255, 255, 255, 0.5);
123
+ }
124
+
125
+ .token.important {
126
+ font-weight: normal;
127
+ }
128
+
129
+ .token.bold {
130
+ font-weight: bold;
131
+ }
132
+
133
+ .token.italic {
134
+ font-style: italic;
135
+ }
136
+
137
+ .token.entity {
138
+ cursor: help;
139
+ }
140
+
141
+ .token.namespace {
142
+ opacity: .7;
143
+ }
@@ -0,0 +1,144 @@
1
+ /**
2
+ * prism.js default theme for JavaScript, CSS and HTML
3
+ * Based on dabblet (http://dabblet.com)
4
+ * @author Lea Verou
5
+ */
6
+
7
+ code[class*="language-"],
8
+ pre[class*="language-"] {
9
+ color: black;
10
+ background: none;
11
+ text-shadow: 0 1px white;
12
+ font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
13
+ font-size: 1em;
14
+ text-align: left;
15
+ white-space: pre;
16
+ word-spacing: normal;
17
+ word-break: normal;
18
+ word-wrap: normal;
19
+ line-height: 1.5;
20
+
21
+ -moz-tab-size: 4;
22
+ -o-tab-size: 4;
23
+ tab-size: 4;
24
+
25
+ -webkit-hyphens: none;
26
+ -moz-hyphens: none;
27
+ -ms-hyphens: none;
28
+ hyphens: none;
29
+ }
30
+
31
+ pre[class*="language-"]::-moz-selection,
32
+ pre[class*="language-"] ::-moz-selection,
33
+ code[class*="language-"]::-moz-selection,
34
+ code[class*="language-"] ::-moz-selection {
35
+ text-shadow: none;
36
+ background: #b3d4fc;
37
+ }
38
+
39
+ pre[class*="language-"]::selection,
40
+ pre[class*="language-"] ::selection,
41
+ code[class*="language-"]::selection,
42
+ code[class*="language-"] ::selection {
43
+ text-shadow: none;
44
+ background: #b3d4fc;
45
+ }
46
+
47
+ @media print {
48
+ code[class*="language-"],
49
+ pre[class*="language-"] {
50
+ text-shadow: none;
51
+ }
52
+ }
53
+
54
+ /* Code blocks */
55
+ pre[class*="language-"] {
56
+ padding: 1em;
57
+ margin: 0.5em 0;
58
+ overflow: auto;
59
+ }
60
+
61
+ :not(pre) > code[class*="language-"],
62
+ pre[class*="language-"] {
63
+ background: #f5f2f0;
64
+ }
65
+
66
+ /* Inline code */
67
+ :not(pre) > code[class*="language-"] {
68
+ padding: 0.1em;
69
+ border-radius: 0.3em;
70
+ white-space: normal;
71
+ }
72
+
73
+ .token.comment,
74
+ .token.prolog,
75
+ .token.doctype,
76
+ .token.cdata {
77
+ color: slategray;
78
+ }
79
+
80
+ .token.punctuation {
81
+ color: #999;
82
+ }
83
+
84
+ .token.namespace {
85
+ opacity: 0.7;
86
+ }
87
+
88
+ .token.property,
89
+ .token.tag,
90
+ .token.boolean,
91
+ .token.number,
92
+ .token.constant,
93
+ .token.symbol,
94
+ .token.deleted {
95
+ color: #905;
96
+ }
97
+
98
+ .token.selector,
99
+ .token.attr-name,
100
+ .token.string,
101
+ .token.char,
102
+ .token.builtin,
103
+ .token.inserted {
104
+ color: #690;
105
+ }
106
+
107
+ .token.operator,
108
+ .token.entity,
109
+ .token.url,
110
+ .language-css .token.string,
111
+ .style .token.string {
112
+ color: #9a6e3a;
113
+ /* This background color was intended by the author of this theme. */
114
+ background: hsla(0, 0%, 100%, 0.5);
115
+ }
116
+
117
+ .token.atrule,
118
+ .token.attr-value,
119
+ .token.keyword {
120
+ color: #07a;
121
+ }
122
+
123
+ .token.function,
124
+ .token.class-name {
125
+ color: #dd4a68;
126
+ }
127
+
128
+ .token.regex,
129
+ .token.important,
130
+ .token.variable {
131
+ color: #e90;
132
+ }
133
+
134
+ .token.important,
135
+ .token.bold {
136
+ font-weight: bold;
137
+ }
138
+ .token.italic {
139
+ font-style: italic;
140
+ }
141
+
142
+ .token.entity {
143
+ cursor: help;
144
+ }