create-marp-presentation 1.1.0 → 1.2.1
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/README.md +45 -37
- package/cli/commands/add-themes-cli.js +85 -0
- package/cli/commands/create-project.js +199 -0
- package/cli/utils/file-utils.js +106 -0
- package/cli/utils/prompt-utils.js +89 -0
- package/docs/plans/2025-02-19-marp-template-design.md +207 -0
- package/docs/plans/2025-02-19-marp-template-implementation.md +848 -0
- package/docs/plans/2026-02-20-example-slides-design.md +179 -0
- package/docs/plans/2026-02-20-example-slides-implementation.md +811 -0
- package/docs/plans/2026-02-23-theme-management-design.md +836 -0
- package/docs/plans/2026-02-23-theme-management-implementation.md +3585 -0
- package/docs/plans/2026-02-26-theme-addition-refactoring-design.md +172 -0
- package/docs/plans/2026-02-26-theme-addition-refactoring.md +456 -0
- package/docs/plans/2026-02-27-theme-add-fix-design.md +136 -0
- package/docs/plans/2026-02-27-theme-add-fix.md +353 -0
- package/docs/plans/TODO.md +5 -0
- package/docs/reqs/themes-requirements.md +49 -0
- package/docs/theme-management.md +261 -0
- package/index.js +111 -164
- package/lib/add-themes-command.js +381 -0
- package/lib/errors.js +62 -0
- package/lib/frontmatter.js +71 -0
- package/lib/prompts.js +222 -0
- package/lib/theme-manager.js +238 -0
- package/lib/theme-resolver.js +227 -0
- package/lib/vscode-integration.js +198 -0
- package/package.json +15 -5
- package/template/README.md +28 -17
- package/template/package.json +13 -1
- package/template/scripts/theme-cli.js +248 -0
- package/themes/beam/beam.css +141 -0
- package/themes/default-clean/default-clean.css +57 -0
- package/themes/gaia-dark/gaia-dark.css +27 -0
- package/themes/marpx/marpx.css +1735 -0
- package/themes/marpx/socrates.css +105 -0
- package/themes/uncover-minimal/uncover-minimal.css +22 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/* @theme beam */
|
|
2
|
+
/* Author: rnd195 https://github.com/rnd195/ */
|
|
3
|
+
/* beam license - GNU GPLv3 https://github.com/rnd195/my-marp-themes/blob/live/licenses/LICENSE_beam */
|
|
4
|
+
/* License of beamer which inspired this theme - GNU GPLv2 https://github.com/rnd195/my-marp-themes/blob/live/licenses/LICENSE_GPLv2 */
|
|
5
|
+
|
|
6
|
+
@import "default";
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
font-family: "CMU Sans Serif", "Segoe UI", Helvetica, sans-serif;
|
|
10
|
+
--main: #1f38c5;
|
|
11
|
+
--secondary: #141414;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
section {
|
|
15
|
+
background-color: #ffffff;
|
|
16
|
+
/* bottom two-coloured bar in base64 svg */
|
|
17
|
+
background-image:
|
|
18
|
+
url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjUwbW0iIGhlaWdodD0iNS4zNTQ2bW0iIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDI1MCA1LjM1NDYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMC4zNDcgLTkxLjAyOCkiPgo8cmVjdCB4PSIyMC4zNDciIHk9IjkxLjAyOCIgd2lkdGg9IjEyNSIgaGVpZ2h0PSI1LjM1NDYiIGZpbGw9IiMxNDE0MTQiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlLXdpZHRoPSIwIi8+CjxwYXRoIGQ9Im0xNDUuMzUgOTMuNzA1di0yLjY3NzNoMTI1djUuMzU0NmgtMTI1eiIgZmlsbD0iIzFmMzhjNSIgc3Ryb2tlLXdpZHRoPSIwIi8+CjwvZz4KPC9zdmc+);
|
|
19
|
+
background-repeat: no-repeat;
|
|
20
|
+
background-position: center bottom;
|
|
21
|
+
background-size: 150% 1em;
|
|
22
|
+
padding: 2em;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
header {
|
|
26
|
+
font-size: 0.6em;
|
|
27
|
+
/* this text-align is important */
|
|
28
|
+
text-align: right;
|
|
29
|
+
/* I don't like this absolute positioning, but it works */
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: 96.2%;
|
|
32
|
+
width: 100%;
|
|
33
|
+
right: 0;
|
|
34
|
+
left: -51%;
|
|
35
|
+
color: white;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
footer {
|
|
39
|
+
font-size: 0.6em;
|
|
40
|
+
position: absolute;
|
|
41
|
+
/* this text-align is important */
|
|
42
|
+
text-align: left;
|
|
43
|
+
top: 96.2%;
|
|
44
|
+
width: 100%;
|
|
45
|
+
right: 0;
|
|
46
|
+
left: 50.8%;
|
|
47
|
+
color: white;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
h1,
|
|
51
|
+
h2,
|
|
52
|
+
h3,
|
|
53
|
+
h4,
|
|
54
|
+
h5,
|
|
55
|
+
h6 {
|
|
56
|
+
color: #141414;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* only apply to the first occurrence of h1 */
|
|
60
|
+
h1:nth-of-type(1) {
|
|
61
|
+
font-family: "CMU Bright", "Segoe UI Semibold";
|
|
62
|
+
color: #ffffff;
|
|
63
|
+
background-color: var(--main);
|
|
64
|
+
border-top: 0.3em solid var(--main);
|
|
65
|
+
padding: 0;
|
|
66
|
+
position: absolute;
|
|
67
|
+
top: 0;
|
|
68
|
+
right: 0;
|
|
69
|
+
width: 100%;
|
|
70
|
+
height: 1.5em;
|
|
71
|
+
text-indent: 0.5em;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
code {
|
|
75
|
+
background-color: rgba(100, 100, 100, 0.2);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
mark {
|
|
79
|
+
background-color: #f5db7e;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* formatting page numbers */
|
|
83
|
+
section::after {
|
|
84
|
+
font-size: 0.6em;
|
|
85
|
+
/* https://github.com/yhatt/marp/issues/263 */
|
|
86
|
+
content: attr(data-marpit-pagination) " / " attr(data-marpit-pagination-total);
|
|
87
|
+
position: absolute;
|
|
88
|
+
text-align: right;
|
|
89
|
+
top: 96.2%;
|
|
90
|
+
width: 100%;
|
|
91
|
+
right: 0;
|
|
92
|
+
left: -0.5em;
|
|
93
|
+
color: white;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* inline math was too large wrt text */
|
|
97
|
+
.katex {
|
|
98
|
+
font: normal 1.05em KaTeX_Main, "Times New Roman", serif
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* the "center" keyword centers the image - may break, careful */
|
|
102
|
+
/* https://github.com/marp-team/marpit/issues/141#issuecomment-473204518 */
|
|
103
|
+
img[alt~="center"] {
|
|
104
|
+
display: block;
|
|
105
|
+
margin: 0 auto;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* || SECTION CLASS: title */
|
|
109
|
+
/* title page - only to be used as for a single slide */
|
|
110
|
+
/* <!-- _class: title --> */
|
|
111
|
+
section.title>h1 {
|
|
112
|
+
font-family: "CMU Bright", "Segoe UI Semibold";
|
|
113
|
+
color: #ffffff;
|
|
114
|
+
background-color: var(--main);
|
|
115
|
+
border-radius: 25px;
|
|
116
|
+
text-align: center;
|
|
117
|
+
top: 25%;
|
|
118
|
+
left: 0;
|
|
119
|
+
right: 0;
|
|
120
|
+
margin-left: auto;
|
|
121
|
+
margin-right: auto;
|
|
122
|
+
width: 80%;
|
|
123
|
+
padding-bottom: 0.2em;
|
|
124
|
+
height: auto;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* remake this to be positioned with respect to h1 */
|
|
128
|
+
section.title>p {
|
|
129
|
+
position: relative;
|
|
130
|
+
text-align: center;
|
|
131
|
+
top: 35px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* || SECTION CLASS: tinytext */
|
|
135
|
+
/* new class that makes p, ul, and blockquote text smaller */
|
|
136
|
+
/* might be useful for the References slide, use <!-- _class: tinytext --> */
|
|
137
|
+
section.tinytext>p,
|
|
138
|
+
section.tinytext>ul,
|
|
139
|
+
section.tinytext>blockquote {
|
|
140
|
+
font-size: 0.65em;
|
|
141
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* @theme default-clean */
|
|
2
|
+
/* A clean, minimal theme based on default */
|
|
3
|
+
|
|
4
|
+
@import "default";
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
--font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
8
|
+
--color-heading: #2c3e50;
|
|
9
|
+
--color-text: #34495e;
|
|
10
|
+
--color-accent: #3498db;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
section {
|
|
14
|
+
padding: 2em;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
h1, h2, h3, h4, h5, h6 {
|
|
18
|
+
color: var(--color-heading);
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
h1 {
|
|
23
|
+
border-bottom: 2px solid var(--color-accent);
|
|
24
|
+
padding-bottom: 0.3em;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
a {
|
|
28
|
+
color: var(--color-accent);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
code {
|
|
32
|
+
background-color: #f8f9fa;
|
|
33
|
+
border-radius: 3px;
|
|
34
|
+
padding: 0.2em 0.4em;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
blockquote {
|
|
38
|
+
border-left: 4px solid var(--color-accent);
|
|
39
|
+
padding-left: 1em;
|
|
40
|
+
margin-left: 0;
|
|
41
|
+
color: #7f8c8d;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
table {
|
|
45
|
+
border-collapse: collapse;
|
|
46
|
+
width: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
th, td {
|
|
50
|
+
border: 1px solid #ddd;
|
|
51
|
+
padding: 0.5em 1em;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
th {
|
|
55
|
+
background-color: var(--color-accent);
|
|
56
|
+
color: white;
|
|
57
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* @theme gaia-dark */
|
|
2
|
+
/* A dark variant of the gaia theme */
|
|
3
|
+
|
|
4
|
+
@import "gaia";
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
--color-background: #1a1a1a;
|
|
8
|
+
--color-foreground: #ffffff;
|
|
9
|
+
--color-highlight: #4a9eff;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
section {
|
|
13
|
+
background-color: var(--color-background);
|
|
14
|
+
color: var(--color-foreground);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
h1, h2, h3, h4, h5, h6 {
|
|
18
|
+
color: var(--color-highlight);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
code {
|
|
22
|
+
background-color: rgba(74, 158, 255, 0.1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
strong {
|
|
26
|
+
color: var(--color-highlight);
|
|
27
|
+
}
|