@subroh0508/marp-theme-canvas 0.0.3 → 0.0.4

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 (37) hide show
  1. package/README.ja.md +314 -0
  2. package/README.md +314 -0
  3. package/css/black-canvas.css +24 -5
  4. package/css/white-canvas.css +24 -5
  5. package/package.json +13 -3
  6. package/scss/_index.scss +30 -21
  7. package/scss/black-canvas.scss +12 -213
  8. package/scss/component/CLAUDE.md +24 -24
  9. package/scss/component/_a.scss +1 -1
  10. package/scss/component/_blockquote.scss +4 -4
  11. package/scss/component/_code.scss +8 -2
  12. package/scss/component/_columns.scss +13 -13
  13. package/scss/component/_footer.scss +1 -1
  14. package/scss/component/_header.scss +1 -1
  15. package/scss/component/_heading.scss +1 -1
  16. package/scss/component/_index.scss +5 -7
  17. package/scss/component/_pagination.scss +2 -2
  18. package/scss/component/_section.scss +3 -3
  19. package/scss/component/_table.scss +2 -2
  20. package/scss/component/_text-decorator.scss +1 -1
  21. package/scss/component/prettylights/CLAUDE.md +11 -11
  22. package/scss/component/prettylights/_base.scss +36 -30
  23. package/scss/component/prettylights/_dark.scss +9 -3
  24. package/scss/component/prettylights/_index.scss +5 -7
  25. package/scss/component/prettylights/_light.scss +9 -3
  26. package/scss/page/CLAUDE.md +27 -27
  27. package/scss/page/_agenda.scss +6 -6
  28. package/scss/page/_display.scss +9 -9
  29. package/scss/page/_index.scss +4 -6
  30. package/scss/page/_section.scss +4 -4
  31. package/scss/page/_title.scss +6 -6
  32. package/scss/page/_toc.scss +3 -3
  33. package/scss/theme/CLAUDE.md +110 -0
  34. package/scss/theme/_black-canvas.scss +243 -0
  35. package/scss/theme/_white-canvas.scss +243 -0
  36. package/scss/white-canvas.scss +12 -213
  37. package/scss/CLAUDE.md +0 -59
@@ -0,0 +1,243 @@
1
+ @charset "utf-8";
2
+
3
+ // Black Canvas Module - Dark theme module importable via @use
4
+ //
5
+ // Usage:
6
+ // @use '@subroh0508/marp-theme-canvas/scss/black-canvas' as black-canvas;
7
+ //
8
+ // // Apply with default settings
9
+ // @include black-canvas.apply();
10
+ //
11
+ // // Add custom CSS variables
12
+ // @include black-canvas.apply() {
13
+ // --color-primary: #e11d48;
14
+ // --color-accent: #fde047;
15
+ // }
16
+
17
+ // ===== Components =====
18
+ @use '../component/prettylights/dark' as prettylights;
19
+ @use '../component/table' as table;
20
+ @use '../component/code' as code;
21
+ @use '../component/section' as section;
22
+ @use '../component/pagination' as pagination;
23
+ @use '../component/header' as header;
24
+ @use '../component/footer' as footer;
25
+ @use '../component/heading' as heading;
26
+ @use '../component/blockquote' as blockquote;
27
+ @use '../component/text-decorator' as text-decorator;
28
+ @use '../component/columns' as columns;
29
+ @use '../component/a' as a;
30
+
31
+ // ===== Page styles =====
32
+ @use '../page/title' as page-title;
33
+ @use '../page/section' as page-section;
34
+ @use '../page/toc' as page-toc;
35
+ @use '../page/agenda' as page-agenda;
36
+ @use '../page/display' as page-display;
37
+
38
+ /// Output default CSS variable values for theme
39
+ /// @content Add or override custom CSS variables
40
+ @mixin variables {
41
+ :root {
42
+ // --- Colors (Black & White) ---
43
+ --color-black: #000;
44
+ --color-white: #fff;
45
+
46
+ // --- Colors (Grayscale - 7 shades): Tailwind slate 50-300, 800-950 ---
47
+ --color-grey-lightest: #f8fafc; // slate-50
48
+ --color-grey-lighter: #f1f5f9; // slate-100
49
+ --color-grey-light: #e2e8f0; // slate-200
50
+ --color-grey-medium: #cbd5e1; // slate-300
51
+ --color-grey-dark: #1e293b; // slate-800
52
+ --color-grey-darker: #0f172a; // slate-900
53
+ --color-grey-darkest: #020617; // slate-950
54
+
55
+ // --- Colors (Component: blockquote) ---
56
+ --color-blockquote-background: color-mix(in srgb, var(--color-grey-light) 15%, transparent);
57
+ --color-blockquote-mark: var(--color-grey-medium);
58
+ --color-blockquote-text: var(--color-grey-medium);
59
+
60
+ // --- Colors (Component: table) ---
61
+ --color-table-row-bg: var(--color-grey-darkest);
62
+ --color-table-row-bg-header: var(--color-grey-dark);
63
+ --color-table-border: var(--color-grey-medium);
64
+
65
+ // --- Colors (Component: code) ---
66
+ --color-code-bg: color-mix(in srgb, var(--color-grey-light) 15%, transparent);
67
+ --color-code-fg: var(--color-grey-lightest);
68
+
69
+ // --- Colors (Component: link) ---
70
+ --color-link: #60a5fa; // Tailwind blue-400
71
+
72
+ // --- Fonts ---
73
+ --font-family-base: 'Noto Sans JP', sans-serif;
74
+ --font-family-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
75
+
76
+ // --- Font sizes ---
77
+ --font-size-base: 40px;
78
+ --font-size-display: 2.5em;
79
+ --font-size-title: 2em;
80
+ --font-size-heading: 1.3em;
81
+ --font-size-medium: 1.15em;
82
+ --font-size-body: 1em;
83
+ --font-size-small: 0.85em;
84
+ --font-size-note: 0.7em;
85
+
86
+ // --- Font weights ---
87
+ --font-weight-normal: 400;
88
+ --font-weight-bold: 700;
89
+ --font-weight-black: 900;
90
+
91
+ // --- Line heights ---
92
+ --line-height-tight: 1.2;
93
+ --line-height-normal: 1.45;
94
+ --line-height-loose: 2;
95
+
96
+ // --- Layout ---
97
+ --slide-padding-x: 80px;
98
+ --slide-padding-y: 80px;
99
+ --header-footer-margin-x: 80px;
100
+ --header-footer-margin-y: 20px;
101
+ --border-radius: 8px;
102
+
103
+ // Custom variables
104
+ @content;
105
+ }
106
+ }
107
+
108
+ /// Apply theme styles (without CSS variables)
109
+ @mixin styles {
110
+ // ===== section (slide body) =====
111
+ section {
112
+ @include prettylights.configure;
113
+ @include section.configure(
114
+ $width: 1920px,
115
+ $height: 1080px,
116
+ $padding-x: var(--slide-padding-x),
117
+ $padding-y: var(--slide-padding-y),
118
+ $color-bg: var(--color-grey-darkest),
119
+ $color-text: var(--color-white),
120
+ $font-family: var(--font-family-base),
121
+ $font-size: var(--font-size-base),
122
+ $line-height: var(--line-height-normal),
123
+ $list-indent: 1.3em
124
+ );
125
+ @include pagination.configure(
126
+ $margin-x: var(--header-footer-margin-x),
127
+ $margin-y: var(--header-footer-margin-y),
128
+ $font-size: var(--font-size-note),
129
+ $color-text: var(--color-grey-light)
130
+ );
131
+
132
+ // ===== Page styles =====
133
+ @include page-title.configure(
134
+ $font-size-title: var(--font-size-display),
135
+ $color-metadata-text: var(--color-grey-medium)
136
+ );
137
+
138
+ @include page-section.configure(
139
+ $font-size: var(--font-size-title)
140
+ );
141
+
142
+ @include page-toc.configure(
143
+ $font-size: var(--font-size-heading),
144
+ $line-height: var(--line-height-loose)
145
+ );
146
+
147
+ @include page-agenda.configure(
148
+ $font-size-heading: var(--font-size-heading),
149
+ $font-size-body: var(--font-size-body),
150
+ $line-height-heading: var(--line-height-loose),
151
+ $line-height-body: var(--line-height-normal),
152
+ $font-weight-heading: var(--font-weight-bold),
153
+ $font-weight-body: var(--font-weight-normal)
154
+ );
155
+
156
+ @include page-display.configure(
157
+ $font-size: var(--font-size-display),
158
+ $font-weight-bold: var(--font-weight-bold),
159
+ $font-weight-normal: var(--font-weight-normal)
160
+ );
161
+
162
+ // ===== Column layout =====
163
+ @include columns.configure();
164
+ }
165
+
166
+ // ===== header =====
167
+ @include header.configure(
168
+ $margin-x: var(--header-footer-margin-x),
169
+ $margin-y: var(--header-footer-margin-y),
170
+ $font-size: var(--font-size-note),
171
+ $color-text: var(--color-grey-light)
172
+ );
173
+
174
+ // ===== footer =====
175
+ @include footer.configure(
176
+ $margin-x: var(--header-footer-margin-x),
177
+ $margin-y: var(--header-footer-margin-y),
178
+ $font-size: var(--font-size-note),
179
+ $color-text: var(--color-grey-light)
180
+ );
181
+
182
+ // ===== Headings (h1-h6) =====
183
+ @include heading.configure(
184
+ $line-height: var(--line-height-tight),
185
+ $font-size-h1: var(--font-size-title),
186
+ $font-size-h2: var(--font-size-heading),
187
+ $font-size-h3: var(--font-size-medium),
188
+ $font-weight-h1: var(--font-weight-bold),
189
+ $font-weight-h2: var(--font-weight-bold),
190
+ $font-weight-h3: var(--font-weight-bold),
191
+ $font-weight-h4: var(--font-weight-bold),
192
+ $font-weight-h5: var(--font-weight-normal),
193
+ $font-weight-h6: var(--font-weight-normal),
194
+ $color-text-h2: var(--color-primary)
195
+ );
196
+
197
+ // ===== Blockquote =====
198
+ @include blockquote.configure(
199
+ $font-size: var(--font-size-body),
200
+ $line-height: var(--line-height-tight),
201
+ $color-text: var(--color-blockquote-text),
202
+ $color-bg: var(--color-blockquote-background),
203
+ $color-mark: var(--color-blockquote-mark),
204
+ $border-radius: var(--border-radius)
205
+ );
206
+
207
+ // ===== Text decoration (strong, mark, rp) =====
208
+ @include text-decorator.configure(
209
+ $font-weight-bold: var(--font-weight-bold),
210
+ $font-weight-normal: var(--font-weight-normal),
211
+ $color-text-highlight: var(--color-accent)
212
+ );
213
+
214
+ // ===== Link (a) =====
215
+ @include a.configure(
216
+ $color-text: var(--color-link)
217
+ );
218
+
219
+ // ===== table =====
220
+ @include table.configure(
221
+ $color-row-bg: var(--color-table-row-bg),
222
+ $color-header-bg: var(--color-table-row-bg-header),
223
+ $color-even-row-bg: var(--color-table-row-bg),
224
+ $color-border-vert: var(--color-table-border),
225
+ $color-border-horz: var(--color-table-border)
226
+ );
227
+
228
+ // ===== code =====
229
+ @include code.configure(
230
+ $font-mono: var(--font-family-mono),
231
+ $color-bg: var(--color-code-bg),
232
+ $color-fg: var(--color-code-fg)
233
+ );
234
+ }
235
+
236
+ /// Apply theme (CSS variables + styles)
237
+ /// @content Add or override custom CSS variables
238
+ @mixin apply {
239
+ @include variables {
240
+ @content;
241
+ }
242
+ @include styles;
243
+ }
@@ -0,0 +1,243 @@
1
+ @charset "utf-8";
2
+
3
+ // White Canvas Module - Theme module importable via @use
4
+ //
5
+ // Usage:
6
+ // @use '@subroh0508/marp-theme-canvas/scss/white-canvas' as white-canvas;
7
+ //
8
+ // // Apply with default settings
9
+ // @include white-canvas.apply();
10
+ //
11
+ // // Add custom CSS variables
12
+ // @include white-canvas.apply() {
13
+ // --color-primary: #e11d48;
14
+ // --color-accent: #fde047;
15
+ // }
16
+
17
+ // ===== Components =====
18
+ @use '../component/prettylights/light' as prettylights;
19
+ @use '../component/table' as table;
20
+ @use '../component/code' as code;
21
+ @use '../component/section' as section;
22
+ @use '../component/pagination' as pagination;
23
+ @use '../component/header' as header;
24
+ @use '../component/footer' as footer;
25
+ @use '../component/heading' as heading;
26
+ @use '../component/blockquote' as blockquote;
27
+ @use '../component/text-decorator' as text-decorator;
28
+ @use '../component/columns' as columns;
29
+ @use '../component/a' as a;
30
+
31
+ // ===== Page styles =====
32
+ @use '../page/title' as page-title;
33
+ @use '../page/section' as page-section;
34
+ @use '../page/toc' as page-toc;
35
+ @use '../page/agenda' as page-agenda;
36
+ @use '../page/display' as page-display;
37
+
38
+ /// Output default CSS variable values for theme
39
+ /// @content Add or override custom CSS variables
40
+ @mixin variables {
41
+ :root {
42
+ // --- Colors (Black & White) ---
43
+ --color-black: #000;
44
+ --color-white: #fff;
45
+
46
+ // --- Colors (Grayscale - 7 shades): Tailwind slate 300-900 ---
47
+ --color-grey-lightest: #cbd5e1; // slate-300
48
+ --color-grey-lighter: #94a3b8; // slate-400
49
+ --color-grey-light: #64748b; // slate-500
50
+ --color-grey-medium: #475569; // slate-600
51
+ --color-grey-dark: #334155; // slate-700
52
+ --color-grey-darker: #1e293b; // slate-800
53
+ --color-grey-darkest: #0f172a; // slate-900
54
+
55
+ // --- Colors (Component: blockquote) ---
56
+ --color-blockquote-background: color-mix(in srgb, var(--color-grey-light) 10%, transparent);
57
+ --color-blockquote-mark: var(--color-grey-medium);
58
+ --color-blockquote-text: var(--color-grey-medium);
59
+
60
+ // --- Colors (Component: table) ---
61
+ --color-table-row-bg: var(--color-white);
62
+ --color-table-row-bg-header: var(--color-grey-lightest);
63
+ --color-table-border: var(--color-grey-light);
64
+
65
+ // --- Colors (Component: code) ---
66
+ --color-code-bg: color-mix(in srgb, var(--color-grey-light) 10%, transparent);
67
+ --color-code-fg: var(--color-grey-darkest);
68
+
69
+ // --- Colors (Component: link) ---
70
+ --color-link: #2563eb; // Tailwind blue-600
71
+
72
+ // --- Fonts ---
73
+ --font-family-base: 'Noto Sans JP', sans-serif;
74
+ --font-family-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
75
+
76
+ // --- Font sizes ---
77
+ --font-size-base: 40px;
78
+ --font-size-display: 2.5em;
79
+ --font-size-title: 2em;
80
+ --font-size-heading: 1.3em;
81
+ --font-size-medium: 1.15em;
82
+ --font-size-body: 1em;
83
+ --font-size-small: 0.85em;
84
+ --font-size-note: 0.7em;
85
+
86
+ // --- Font weights ---
87
+ --font-weight-normal: 400;
88
+ --font-weight-bold: 700;
89
+ --font-weight-black: 900;
90
+
91
+ // --- Line heights ---
92
+ --line-height-tight: 1.2;
93
+ --line-height-normal: 1.45;
94
+ --line-height-loose: 2;
95
+
96
+ // --- Layout ---
97
+ --slide-padding-x: 80px;
98
+ --slide-padding-y: 80px;
99
+ --header-footer-margin-x: 80px;
100
+ --header-footer-margin-y: 20px;
101
+ --border-radius: 8px;
102
+
103
+ // Custom variables
104
+ @content;
105
+ }
106
+ }
107
+
108
+ /// Apply theme styles (without CSS variables)
109
+ @mixin styles {
110
+ // ===== section (slide body) =====
111
+ section {
112
+ @include prettylights.configure;
113
+ @include section.configure(
114
+ $width: 1920px,
115
+ $height: 1080px,
116
+ $padding-x: var(--slide-padding-x),
117
+ $padding-y: var(--slide-padding-y),
118
+ $color-bg: var(--color-white),
119
+ $color-text: var(--color-grey-darkest),
120
+ $font-family: var(--font-family-base),
121
+ $font-size: var(--font-size-base),
122
+ $line-height: var(--line-height-normal),
123
+ $list-indent: 1.3em
124
+ );
125
+ @include pagination.configure(
126
+ $margin-x: var(--header-footer-margin-x),
127
+ $margin-y: var(--header-footer-margin-y),
128
+ $font-size: var(--font-size-note),
129
+ $color-text: var(--color-grey-medium)
130
+ );
131
+
132
+ // ===== Page styles =====
133
+ @include page-title.configure(
134
+ $font-size-title: var(--font-size-display),
135
+ $color-metadata-text: var(--color-grey-light)
136
+ );
137
+
138
+ @include page-section.configure(
139
+ $font-size: var(--font-size-title)
140
+ );
141
+
142
+ @include page-toc.configure(
143
+ $font-size: var(--font-size-heading),
144
+ $line-height: var(--line-height-loose)
145
+ );
146
+
147
+ @include page-agenda.configure(
148
+ $font-size-heading: var(--font-size-heading),
149
+ $font-size-body: var(--font-size-body),
150
+ $line-height-heading: var(--line-height-loose),
151
+ $line-height-body: var(--line-height-normal),
152
+ $font-weight-heading: var(--font-weight-bold),
153
+ $font-weight-body: var(--font-weight-normal)
154
+ );
155
+
156
+ @include page-display.configure(
157
+ $font-size: var(--font-size-display),
158
+ $font-weight-bold: var(--font-weight-bold),
159
+ $font-weight-normal: var(--font-weight-normal)
160
+ );
161
+
162
+ // ===== Column layout =====
163
+ @include columns.configure();
164
+ }
165
+
166
+ // ===== header =====
167
+ @include header.configure(
168
+ $margin-x: var(--header-footer-margin-x),
169
+ $margin-y: var(--header-footer-margin-y),
170
+ $font-size: var(--font-size-note),
171
+ $color-text: var(--color-grey-medium)
172
+ );
173
+
174
+ // ===== footer =====
175
+ @include footer.configure(
176
+ $margin-x: var(--header-footer-margin-x),
177
+ $margin-y: var(--header-footer-margin-y),
178
+ $font-size: var(--font-size-note),
179
+ $color-text: var(--color-grey-medium)
180
+ );
181
+
182
+ // ===== Headings (h1-h6) =====
183
+ @include heading.configure(
184
+ $line-height: var(--line-height-tight),
185
+ $font-size-h1: var(--font-size-title),
186
+ $font-size-h2: var(--font-size-heading),
187
+ $font-size-h3: var(--font-size-medium),
188
+ $font-weight-h1: var(--font-weight-bold),
189
+ $font-weight-h2: var(--font-weight-bold),
190
+ $font-weight-h3: var(--font-weight-bold),
191
+ $font-weight-h4: var(--font-weight-bold),
192
+ $font-weight-h5: var(--font-weight-normal),
193
+ $font-weight-h6: var(--font-weight-normal),
194
+ $color-text-h2: var(--color-primary)
195
+ );
196
+
197
+ // ===== Blockquote =====
198
+ @include blockquote.configure(
199
+ $font-size: var(--font-size-body),
200
+ $line-height: var(--line-height-tight),
201
+ $color-text: var(--color-blockquote-text),
202
+ $color-bg: var(--color-blockquote-background),
203
+ $color-mark: var(--color-blockquote-mark),
204
+ $border-radius: var(--border-radius)
205
+ );
206
+
207
+ // ===== Text decoration (strong, mark, rp) =====
208
+ @include text-decorator.configure(
209
+ $font-weight-bold: var(--font-weight-bold),
210
+ $font-weight-normal: var(--font-weight-normal),
211
+ $color-text-highlight: var(--color-accent)
212
+ );
213
+
214
+ // ===== Link (a) =====
215
+ @include a.configure(
216
+ $color-text: var(--color-link)
217
+ );
218
+
219
+ // ===== table =====
220
+ @include table.configure(
221
+ $color-row-bg: var(--color-table-row-bg),
222
+ $color-header-bg: var(--color-table-row-bg-header),
223
+ $color-even-row-bg: var(--color-table-row-bg),
224
+ $color-border-vert: var(--color-table-border),
225
+ $color-border-horz: var(--color-table-border)
226
+ );
227
+
228
+ // ===== code =====
229
+ @include code.configure(
230
+ $font-mono: var(--font-family-mono),
231
+ $color-bg: var(--color-code-bg),
232
+ $color-fg: var(--color-code-fg)
233
+ );
234
+ }
235
+
236
+ /// Apply theme (CSS variables + styles)
237
+ /// @content Add or override custom CSS variables
238
+ @mixin apply {
239
+ @include variables {
240
+ @content;
241
+ }
242
+ @include styles;
243
+ }