@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
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * White Canvas - 極力余計なスタイリングを廃した、シンプルなスライドテーマ
2
+ * White Canvas - A simple slide theme with minimal styling
3
3
  *
4
- * 使用時はMarpのインラインスタイル指定で以下の変数を必ず定義してください。
5
- * - --color-primary: メインカラー(h2の文字色など)
6
- * - --color-accent: アクセントカラー(markタグの背景色など)
4
+ * When using, you must define the following variables in Marp's inline style:
5
+ * - --color-primary: Primary color (e.g., h2 text color)
6
+ * - --color-accent: Accent color (e.g., mark tag background)
7
7
  *
8
- * 例:
8
+ * Example:
9
9
  * style: |
10
10
  * :root {
11
11
  * --color-primary: #3b91c4;
@@ -17,217 +17,16 @@
17
17
  *
18
18
  * @auto-scaling true
19
19
  * @size 16:9 1920px 1080px
20
+ *
21
+ * MIT License
22
+ * Copyright (c) 2026 Subroh Nishikori
23
+ * https://github.com/subroh0508/marp-theme-canvas/blob/main/LICENSE
20
24
  */
21
25
 
22
- // ===== コンポーネント =====
23
- @use './component/prettylights/light' as prettylights;
24
- @use './component/table' as table;
25
- @use './component/code' as code;
26
- @use './component/section' as section;
27
- @use './component/pagination' as pagination;
28
- @use './component/header' as header;
29
- @use './component/footer' as footer;
30
- @use './component/heading' as heading;
31
- @use './component/blockquote' as blockquote;
32
- @use './component/text-decorator' as text-decorator;
33
- @use './component/columns' as columns;
34
- @use './component/a' as a;
35
-
36
- // ===== ページスタイル =====
37
- @use './page/title' as page-title;
38
- @use './page/section' as page-section;
39
- @use './page/toc' as page-toc;
40
- @use './page/agenda' as page-agenda;
41
- @use './page/display' as page-display;
26
+ @use './theme/white-canvas' as theme;
42
27
 
43
28
  // ===== Google Fonts =====
44
29
  @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700;900&display=swap');
45
30
 
46
- // ===== CSS変数(デフォルト値) =====
47
- :root {
48
- // --- 色(白黒) ---
49
- --color-black: #000;
50
- --color-white: #fff;
51
-
52
- // --- 色(グレースケール 7色): Tailwind slate 300-900 ---
53
- --color-grey-lightest: #cbd5e1; // slate-300
54
- --color-grey-lighter: #94a3b8; // slate-400
55
- --color-grey-light: #64748b; // slate-500
56
- --color-grey-medium: #475569; // slate-600
57
- --color-grey-dark: #334155; // slate-700
58
- --color-grey-darker: #1e293b; // slate-800
59
- --color-grey-darkest: #0f172a; // slate-900
60
-
61
- // --- 色(コンポーネント: blockquote) ---
62
- --color-blockquote-background: color-mix(in srgb, var(--color-grey-light) 10%, transparent);
63
- --color-blockquote-mark: var(--color-grey-medium);
64
- --color-blockquote-text: var(--color-grey-medium);
65
-
66
- // --- 色(コンポーネント: table) ---
67
- --color-table-row-bg: var(--color-white);
68
- --color-table-row-bg-header: var(--color-grey-lightest);
69
- --color-table-border: var(--color-grey-light);
70
-
71
- // --- 色(コンポーネント: code) ---
72
- --color-code-bg: color-mix(in srgb, var(--color-grey-light) 10%, transparent);
73
- --color-code-fg: var(--color-grey-darkest);
74
-
75
- // --- 色(コンポーネント: link) ---
76
- --color-link: #2563eb; // Tailwind blue-600
77
-
78
- // --- フォント ---
79
- --font-family-base: 'Noto Sans JP', sans-serif;
80
- --font-family-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
81
-
82
- // --- フォントサイズ ---
83
- --font-size-base: 40px;
84
- --font-size-display: 2.5em;
85
- --font-size-title: 2em;
86
- --font-size-heading: 1.3em;
87
- --font-size-medium: 1.15em;
88
- --font-size-body: 1em;
89
- --font-size-small: 0.85em;
90
- --font-size-note: 0.7em;
91
-
92
- // --- フォントウェイト ---
93
- --font-weight-normal: 400;
94
- --font-weight-bold: 700;
95
- --font-weight-black: 900;
96
-
97
- // --- 行間 ---
98
- --line-height-tight: 1.2;
99
- --line-height-normal: 1.45;
100
- --line-height-loose: 2;
101
-
102
- // --- レイアウト ---
103
- --slide-padding-x: 80px;
104
- --slide-padding-y: 80px;
105
- --header-footer-margin-x: 80px;
106
- --header-footer-margin-y: 20px;
107
- --border-radius: 8px;
108
- }
109
-
110
- // ===== section(スライド本体) =====
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
- // ===== ページスタイル =====
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
- // ===== カラムレイアウト =====
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
- // ===== 見出し(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
- // ===== テキスト装飾(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
- // ===== リンク(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
- );
31
+ // ===== Apply theme =====
32
+ @include theme.apply;
package/scss/CLAUDE.md DELETED
@@ -1,59 +0,0 @@
1
- # scss
2
-
3
- Marpテーマ用SCSSファイル
4
-
5
- ## ディレクトリ構成
6
-
7
- - `page/` - 特定用途に特化したページスタイル(title、section、toc、agenda、display)
8
- - `component/` - スライド共通で使用する要素のスタイル(heading、table、code、blockquote等)
9
-
10
- ## 共通命名規約
11
-
12
- - ファイル名: `_名前.scss`(アンダースコアプレフィックス必須、Sassパーシャル)
13
- - 名前: kebab-case(例: `title`, `text-decorator`)
14
-
15
- ## @mixin configure() 規約
16
-
17
- 全てのスタイルファイルは `@mixin configure()` でカプセル化する。
18
-
19
- ### 引数の設計
20
-
21
- - **必須引数**: デフォルト値なし、リストの先頭に配置
22
- - **任意引数**: デフォルト値あり、リストの後方に配置
23
- - **命名**: セマンティックな名前を使用
24
-
25
- ### 引数の命名パターン
26
-
27
- | 接頭辞 | 用途 | 例 |
28
- |--------|------|-----|
29
- | `$font-size-*` | フォントサイズ | `$font-size-title`, `$font-size-body` |
30
- | `$font-weight-*` | フォントウェイト | `$font-weight-bold`, `$font-weight-normal` |
31
- | `$font-family` | フォントファミリー | `$font-family`, `$font-mono` |
32
- | `$color-*` | 色 | `$color-text`, `$color-bg`, `$color-border` |
33
- | `$line-height-*` | 行間 | `$line-height-heading`, `$line-height-body` |
34
- | `$margin-*` | マージン | `$margin-x`, `$margin-y` |
35
- | `$padding-*` | パディング | `$padding-x`, `$padding-y` |
36
- | `$border-radius` | 角丸 | `$border-radius` |
37
-
38
- ## 実装上のルール
39
-
40
- - **CSS変数の宣言・参照はテーマファイルのみ**: `var(--*)` の宣言および参照は `scss/` 直下に配置されたテーマファイル(例: `white-canvas.scss`)でのみ許可
41
- - 理由: Marp用Markdownファイルのフロントマターでインラインスタイルとして変数を上書きし、スライドごとにスタイルを柔軟にカスタマイズできるようにするため
42
- - 例: Markdownファイルで `--color-primary` を上書き
43
- ```markdown
44
- ---
45
- theme: white-canvas
46
- style: |
47
- :root {
48
- --color-primary: #3b91c4;
49
- --color-accent: #ead7a4;
50
- }
51
- ---
52
- ```
53
- - **page/ component/ 配下では禁止**: サブディレクトリ内のスタイルファイルでは CSS変数を直接参照しない。必要な値は全て `@mixin configure()` の引数として受け取る
54
- - 理由: テーマとスタイルの疎結合を保つため
55
- - テーマ側で `@include` 時に CSS変数を引数として渡す
56
-
57
- ## 注意事項
58
-
59
- - コメントは `/*!` で始める(`/*` ではない)ことでCSSに出力される