@subroh0508/marp-theme-canvas 0.0.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/LICENSE +21 -0
- package/css/black-canvas.css +540 -0
- package/css/white-canvas.css +540 -0
- package/package.json +73 -0
- package/scss/CLAUDE.md +59 -0
- package/scss/_index.scss +27 -0
- package/scss/black-canvas.scss +233 -0
- package/scss/component/CLAUDE.md +55 -0
- package/scss/component/_a.scss +13 -0
- package/scss/component/_blockquote.scss +36 -0
- package/scss/component/_code.scss +31 -0
- package/scss/component/_columns.scss +56 -0
- package/scss/component/_footer.scss +12 -0
- package/scss/component/_header.scss +12 -0
- package/scss/component/_heading.scss +71 -0
- package/scss/component/_index.scss +23 -0
- package/scss/component/_pagination.scss +14 -0
- package/scss/component/_section.scss +43 -0
- package/scss/component/_table.scss +30 -0
- package/scss/component/_text-decorator.scss +17 -0
- package/scss/component/prettylights/CLAUDE.md +41 -0
- package/scss/component/prettylights/_base.scss +128 -0
- package/scss/component/prettylights/_dark.scss +41 -0
- package/scss/component/prettylights/_index.scss +13 -0
- package/scss/component/prettylights/_light.scss +41 -0
- package/scss/page/CLAUDE.md +74 -0
- package/scss/page/_agenda.scss +38 -0
- package/scss/page/_display.scss +39 -0
- package/scss/page/_index.scss +14 -0
- package/scss/page/_section.scss +20 -0
- package/scss/page/_title.scss +38 -0
- package/scss/page/_toc.scss +15 -0
- package/scss/white-canvas.scss +233 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Black Canvas - 極力余計なスタイリングを廃した、シンプルなダークスライドテーマ
|
|
3
|
+
*
|
|
4
|
+
* 使用時はMarpのインラインスタイル指定で以下の変数を必ず定義してください。
|
|
5
|
+
* - --color-primary: メインカラー(h2の文字色など)
|
|
6
|
+
* - --color-accent: アクセントカラー(markタグの背景色など)
|
|
7
|
+
*
|
|
8
|
+
* 例:
|
|
9
|
+
* style: |
|
|
10
|
+
* :root {
|
|
11
|
+
* --color-primary: #3b91c4;
|
|
12
|
+
* --color-accent: #ead7a4;
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* @theme black-canvas
|
|
16
|
+
* @author subroh_0508
|
|
17
|
+
*
|
|
18
|
+
* @auto-scaling true
|
|
19
|
+
* @size 16:9 1920px 1080px
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
// ===== コンポーネント =====
|
|
23
|
+
@use './component/prettylights/dark' 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;
|
|
42
|
+
|
|
43
|
+
// ===== Google Fonts =====
|
|
44
|
+
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700;900&display=swap');
|
|
45
|
+
|
|
46
|
+
// ===== CSS変数(デフォルト値) =====
|
|
47
|
+
:root {
|
|
48
|
+
// --- 色(白黒) ---
|
|
49
|
+
--color-black: #000;
|
|
50
|
+
--color-white: #fff;
|
|
51
|
+
|
|
52
|
+
// --- 色(グレースケール 7色): Tailwind slate 50-300, 800-950 ---
|
|
53
|
+
--color-grey-lightest: #f8fafc; // slate-50
|
|
54
|
+
--color-grey-lighter: #f1f5f9; // slate-100
|
|
55
|
+
--color-grey-light: #e2e8f0; // slate-200
|
|
56
|
+
--color-grey-medium: #cbd5e1; // slate-300
|
|
57
|
+
--color-grey-dark: #1e293b; // slate-800
|
|
58
|
+
--color-grey-darker: #0f172a; // slate-900
|
|
59
|
+
--color-grey-darkest: #020617; // slate-950
|
|
60
|
+
|
|
61
|
+
// --- 色(コンポーネント: blockquote) ---
|
|
62
|
+
--color-blockquote-background: color-mix(in srgb, var(--color-grey-light) 15%, 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-grey-darkest);
|
|
68
|
+
--color-table-row-bg-header: var(--color-grey-dark);
|
|
69
|
+
--color-table-border: var(--color-grey-medium);
|
|
70
|
+
|
|
71
|
+
// --- 色(コンポーネント: code) ---
|
|
72
|
+
--color-code-bg: color-mix(in srgb, var(--color-grey-light) 15%, transparent);
|
|
73
|
+
--color-code-fg: var(--color-grey-lightest);
|
|
74
|
+
|
|
75
|
+
// --- 色(コンポーネント: link) ---
|
|
76
|
+
--color-link: #60a5fa; // Tailwind blue-400
|
|
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-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
|
+
// ===== ページスタイル =====
|
|
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
|
+
// ===== カラムレイアウト =====
|
|
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
|
+
// ===== 見出し(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
|
+
);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# component
|
|
2
|
+
|
|
3
|
+
スライド共通で使用する要素のスタイル
|
|
4
|
+
|
|
5
|
+
## ファイル構成
|
|
6
|
+
|
|
7
|
+
```scss
|
|
8
|
+
// ===== _ファイル名.scss =====
|
|
9
|
+
// コンポーネントの説明
|
|
10
|
+
|
|
11
|
+
@mixin configure($引数1, $引数2, $引数3: デフォルト値) {
|
|
12
|
+
セレクタ {
|
|
13
|
+
プロパティ: 値;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## テーマからの呼び出し
|
|
19
|
+
|
|
20
|
+
### section内で呼び出すコンポーネント
|
|
21
|
+
|
|
22
|
+
```scss
|
|
23
|
+
section {
|
|
24
|
+
@include section.configure(...);
|
|
25
|
+
@include pagination.configure(...);
|
|
26
|
+
@include prettylights.configure;
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### グローバルスコープで呼び出すコンポーネント
|
|
31
|
+
|
|
32
|
+
```scss
|
|
33
|
+
@include header.configure(...);
|
|
34
|
+
@include footer.configure(...);
|
|
35
|
+
@include heading.configure(...);
|
|
36
|
+
@include blockquote.configure(...);
|
|
37
|
+
@include text-decorator.configure(...);
|
|
38
|
+
@include table.configure(...);
|
|
39
|
+
@include code.configure(...);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## 既存のコンポーネント一覧
|
|
43
|
+
|
|
44
|
+
| ファイル | 対象セレクタ | 用途 |
|
|
45
|
+
|----------|--------------|------|
|
|
46
|
+
| `_section.scss` | `section` | スライド本体のベーススタイル |
|
|
47
|
+
| `_heading.scss` | `h1`-`h6` | 見出し |
|
|
48
|
+
| `_header.scss` | `header` | ヘッダー |
|
|
49
|
+
| `_footer.scss` | `footer` | フッター |
|
|
50
|
+
| `_pagination.scss` | `section::after` | ページ番号 |
|
|
51
|
+
| `_table.scss` | `table`, `th`, `td`, `tr` | テーブル |
|
|
52
|
+
| `_code.scss` | `code`, `pre`, `tt` | コードブロック |
|
|
53
|
+
| `_blockquote.scss` | `blockquote` | 引用 |
|
|
54
|
+
| `_text-decorator.scss` | `strong`, `mark`, `rp` | テキスト装飾 |
|
|
55
|
+
| `prettylights/*` | `.hljs-*` | シンタックスハイライト |
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// ===== _blockquote.scss =====
|
|
2
|
+
// Marpスライドの引用スタイル
|
|
3
|
+
|
|
4
|
+
@mixin configure($font-size, $line-height, $color-text, $color-bg, $color-mark, $border-radius) {
|
|
5
|
+
blockquote {
|
|
6
|
+
position: relative;
|
|
7
|
+
margin-left: 0;
|
|
8
|
+
margin-right: 0;
|
|
9
|
+
padding: 0.5em 0.5em 0.5em 2em;
|
|
10
|
+
font-size: $font-size;
|
|
11
|
+
font-style: italic;
|
|
12
|
+
line-height: $line-height;
|
|
13
|
+
color: $color-text;
|
|
14
|
+
background: $color-bg;
|
|
15
|
+
border-radius: $border-radius;
|
|
16
|
+
|
|
17
|
+
// 左上の引用符
|
|
18
|
+
&::before {
|
|
19
|
+
content: '“';
|
|
20
|
+
position: absolute;
|
|
21
|
+
left: 0.2em;
|
|
22
|
+
font-size: 2em;
|
|
23
|
+
line-height: 1;
|
|
24
|
+
color: $color-mark;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// 子要素のmargin調整
|
|
28
|
+
> :first-child {
|
|
29
|
+
margin-top: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
> :last-child {
|
|
33
|
+
margin-bottom: 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// ===== _code.scss =====
|
|
2
|
+
// コードブロック用スタイル
|
|
3
|
+
// github-markdown-css v5.8.1 を改変
|
|
4
|
+
// https://github.com/sindresorhus/github-markdown-css/blob/v5.8.1/github-markdown.css
|
|
5
|
+
|
|
6
|
+
@mixin configure($font-mono, $color-bg, $color-fg) {
|
|
7
|
+
code, tt {
|
|
8
|
+
font-family: $font-mono;
|
|
9
|
+
padding: .2em .4em;
|
|
10
|
+
font-size: 85%;
|
|
11
|
+
white-space: break-spaces;
|
|
12
|
+
background-color: $color-bg;
|
|
13
|
+
border-radius: 6px;
|
|
14
|
+
}
|
|
15
|
+
pre {
|
|
16
|
+
font-family: $font-mono;
|
|
17
|
+
padding: 16px;
|
|
18
|
+
overflow: auto;
|
|
19
|
+
font-size: 85%;
|
|
20
|
+
line-height: 1.45;
|
|
21
|
+
color: $color-fg;
|
|
22
|
+
background-color: $color-bg;
|
|
23
|
+
border-radius: 6px;
|
|
24
|
+
}
|
|
25
|
+
pre > code {
|
|
26
|
+
padding: 0;
|
|
27
|
+
background: transparent;
|
|
28
|
+
border: 0;
|
|
29
|
+
white-space: pre;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// ===== _columns.scss =====
|
|
2
|
+
// Flexboxベースのカラムレイアウトコンポーネント
|
|
3
|
+
//
|
|
4
|
+
// 使い方1: _class: columns(スライド全体がカラムレイアウト)
|
|
5
|
+
// 使い方2: <div class="columns">(部分的なカラムレイアウト)
|
|
6
|
+
//
|
|
7
|
+
// ※ divタグの直後・直前に空行を入れることでMarkdownが正しく解釈される
|
|
8
|
+
|
|
9
|
+
$_column-widths: (2, 3, 4, 6, 7, 8);
|
|
10
|
+
|
|
11
|
+
// カラム要素の共通スタイル
|
|
12
|
+
// - flex: $n ... 比率ベースの幅指定(gapを考慮した配分になる)
|
|
13
|
+
// 例: column-4 + column-6 = 4:6の比率で配分
|
|
14
|
+
// - min-width: 0 ... Flex子要素のデフォルト値(auto)を上書きし、
|
|
15
|
+
// コンテンツサイズに関係なくflex-basisの幅を維持する
|
|
16
|
+
// - > *, p > * { max-width: 100% } ... 子要素および段落内の要素(画像等)をカラム幅に収める
|
|
17
|
+
@mixin _column-children {
|
|
18
|
+
> .column {
|
|
19
|
+
flex: 1;
|
|
20
|
+
min-width: 0;
|
|
21
|
+
|
|
22
|
+
> *,
|
|
23
|
+
p > * {
|
|
24
|
+
max-width: 100%;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@each $n in $_column-widths {
|
|
29
|
+
> .column-#{$n} {
|
|
30
|
+
flex: $n;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
|
|
33
|
+
> *,
|
|
34
|
+
p > * {
|
|
35
|
+
max-width: 100%;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@mixin configure() {
|
|
42
|
+
// 使い方1: _class: columns(section自体がFlexコンテナになる)
|
|
43
|
+
&.columns {
|
|
44
|
+
flex-direction: row;
|
|
45
|
+
gap: 1em;
|
|
46
|
+
@include _column-children;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// 使い方2: <div class="columns">(部分的なカラムレイアウト)
|
|
50
|
+
.columns {
|
|
51
|
+
display: flex;
|
|
52
|
+
gap: 1em;
|
|
53
|
+
width: 100%;
|
|
54
|
+
@include _column-children;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// ===== _heading.scss =====
|
|
2
|
+
// Marpスライドの見出しスタイル(h1-h6)
|
|
3
|
+
|
|
4
|
+
@mixin configure(
|
|
5
|
+
$line-height,
|
|
6
|
+
$font-size-h1: 1em,
|
|
7
|
+
$font-size-h2: 1em,
|
|
8
|
+
$font-size-h3: 1em,
|
|
9
|
+
$font-size-h4: 1em,
|
|
10
|
+
$font-size-h5: 1em,
|
|
11
|
+
$font-size-h6: 1em,
|
|
12
|
+
$font-weight-h1: bold,
|
|
13
|
+
$font-weight-h2: bold,
|
|
14
|
+
$font-weight-h3: bold,
|
|
15
|
+
$font-weight-h4: bold,
|
|
16
|
+
$font-weight-h5: normal,
|
|
17
|
+
$font-weight-h6: normal,
|
|
18
|
+
$color-text-h1: inherit,
|
|
19
|
+
$color-text-h2: inherit,
|
|
20
|
+
$color-text-h3: inherit,
|
|
21
|
+
$color-text-h4: inherit,
|
|
22
|
+
$color-text-h5: inherit,
|
|
23
|
+
$color-text-h6: inherit
|
|
24
|
+
) {
|
|
25
|
+
h1,
|
|
26
|
+
h2,
|
|
27
|
+
h3,
|
|
28
|
+
h4,
|
|
29
|
+
h5,
|
|
30
|
+
h6 {
|
|
31
|
+
line-height: $line-height;
|
|
32
|
+
margin: 0 0 0.5em;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
h1 {
|
|
36
|
+
font-size: $font-size-h1;
|
|
37
|
+
font-weight: $font-weight-h1;
|
|
38
|
+
color: $color-text-h1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
h2 {
|
|
42
|
+
font-size: $font-size-h2;
|
|
43
|
+
font-weight: $font-weight-h2;
|
|
44
|
+
color: $color-text-h2;
|
|
45
|
+
margin: 0 0 0.8em;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
h3 {
|
|
49
|
+
font-size: $font-size-h3;
|
|
50
|
+
font-weight: $font-weight-h3;
|
|
51
|
+
color: $color-text-h3;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
h4 {
|
|
55
|
+
font-size: $font-size-h4;
|
|
56
|
+
font-weight: $font-weight-h4;
|
|
57
|
+
color: $color-text-h4;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
h5 {
|
|
61
|
+
font-size: $font-size-h5;
|
|
62
|
+
font-weight: $font-weight-h5;
|
|
63
|
+
color: $color-text-h5;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
h6 {
|
|
67
|
+
font-size: $font-size-h6;
|
|
68
|
+
font-weight: $font-weight-h6;
|
|
69
|
+
color: $color-text-h6;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@charset "utf-8";
|
|
2
|
+
|
|
3
|
+
/*!
|
|
4
|
+
* Components - スライド共通で使用する要素のスタイル
|
|
5
|
+
*
|
|
6
|
+
* @use '@subroh0508/marp-theme-canvas/scss/component';
|
|
7
|
+
* @use '@subroh0508/marp-theme-canvas/scss/component/heading';
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@forward 'a' as a-*;
|
|
11
|
+
@forward 'blockquote' as blockquote-*;
|
|
12
|
+
@forward 'code' as code-*;
|
|
13
|
+
@forward 'columns' as columns-*;
|
|
14
|
+
@forward 'footer' as footer-*;
|
|
15
|
+
@forward 'header' as header-*;
|
|
16
|
+
@forward 'heading' as heading-*;
|
|
17
|
+
@forward 'pagination' as pagination-*;
|
|
18
|
+
@forward 'section' as section-*;
|
|
19
|
+
@forward 'table' as table-*;
|
|
20
|
+
@forward 'text-decorator' as text-decorator-*;
|
|
21
|
+
|
|
22
|
+
// シンタックスハイライト
|
|
23
|
+
@forward 'prettylights' as prettylights-*;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// ===== _pagination.scss =====
|
|
2
|
+
// Marpスライドのページ番号スタイル(section::after)
|
|
3
|
+
// Marpの paginate: true 指定時に表示される要素
|
|
4
|
+
|
|
5
|
+
@mixin configure($margin-x, $margin-y, $font-size, $color-text) {
|
|
6
|
+
&::after {
|
|
7
|
+
position: absolute;
|
|
8
|
+
padding: 0;
|
|
9
|
+
right: $margin-x;
|
|
10
|
+
bottom: $margin-y;
|
|
11
|
+
font-size: $font-size;
|
|
12
|
+
color: $color-text;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// ===== _section.scss =====
|
|
2
|
+
// Marpスライドのsection(本体)スタイル
|
|
3
|
+
|
|
4
|
+
@mixin configure(
|
|
5
|
+
$width,
|
|
6
|
+
$height,
|
|
7
|
+
$padding-x,
|
|
8
|
+
$padding-y,
|
|
9
|
+
$color-bg,
|
|
10
|
+
$color-text,
|
|
11
|
+
$font-family,
|
|
12
|
+
$font-size,
|
|
13
|
+
$line-height,
|
|
14
|
+
$list-indent
|
|
15
|
+
) {
|
|
16
|
+
width: $width;
|
|
17
|
+
height: $height;
|
|
18
|
+
padding: $padding-y $padding-x;
|
|
19
|
+
background-color: $color-bg;
|
|
20
|
+
color: $color-text;
|
|
21
|
+
font-family: $font-family;
|
|
22
|
+
font-size: $font-size;
|
|
23
|
+
line-height: $line-height;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
|
|
29
|
+
// コンテンツ要素のmargin-topを0に
|
|
30
|
+
p,
|
|
31
|
+
ul,
|
|
32
|
+
ol,
|
|
33
|
+
blockquote,
|
|
34
|
+
pre {
|
|
35
|
+
margin-top: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// リストのインデント調整
|
|
39
|
+
ul,
|
|
40
|
+
ol {
|
|
41
|
+
padding-inline-start: $list-indent;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// ===== _table.scss =====
|
|
2
|
+
// テーブル用スタイル
|
|
3
|
+
// github-markdown-css v5.8.1 を改変
|
|
4
|
+
// https://github.com/sindresorhus/github-markdown-css/blob/v5.8.1/github-markdown.css
|
|
5
|
+
|
|
6
|
+
@mixin configure($color-row-bg, $color-header-bg, $color-even-row-bg, $color-border-vert, $color-border-horz) {
|
|
7
|
+
table {
|
|
8
|
+
border-spacing: 0;
|
|
9
|
+
border-collapse: collapse;
|
|
10
|
+
display: block;
|
|
11
|
+
width: max-content;
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
overflow: auto;
|
|
14
|
+
}
|
|
15
|
+
th, td {
|
|
16
|
+
padding: 6px 13px;
|
|
17
|
+
border: 1px solid $color-border-vert;
|
|
18
|
+
}
|
|
19
|
+
th {
|
|
20
|
+
font-weight: 600;
|
|
21
|
+
background-color: $color-header-bg;
|
|
22
|
+
}
|
|
23
|
+
tr {
|
|
24
|
+
background-color: $color-row-bg;
|
|
25
|
+
border-top: 1px solid $color-border-horz;
|
|
26
|
+
}
|
|
27
|
+
tr:nth-child(2n) {
|
|
28
|
+
background-color: $color-even-row-bg;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// ===== _text-decorator.scss =====
|
|
2
|
+
// テキスト装飾スタイル(strong, mark, rp)
|
|
3
|
+
|
|
4
|
+
@mixin configure($font-weight-bold, $font-weight-normal, $color-text-highlight) {
|
|
5
|
+
strong {
|
|
6
|
+
font-weight: $font-weight-bold;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
mark {
|
|
10
|
+
font-weight: $font-weight-bold;
|
|
11
|
+
background-color: $color-text-highlight;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
rp {
|
|
15
|
+
font-weight: $font-weight-normal;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# prettylights
|
|
2
|
+
|
|
3
|
+
シンタックスハイライト用スタイル(highlight.jsクラスへのカラーマッピング)
|
|
4
|
+
|
|
5
|
+
## 構成
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
prettylights/
|
|
9
|
+
├── _base.scss # 共通ロジック(引数付きmixin)
|
|
10
|
+
├── _light.scss # Lightテーマ色定義
|
|
11
|
+
└── _dark.scss # Darkテーマ色定義
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## パターン
|
|
15
|
+
|
|
16
|
+
- `_base.scss`: highlight.jsクラスへのカラーマッピングを引数付きmixinで定義
|
|
17
|
+
- `_light.scss` / `_dark.scss`: 色変数を定義し、引数なしmixinでbaseを呼び出す
|
|
18
|
+
|
|
19
|
+
```scss
|
|
20
|
+
// _light.scss
|
|
21
|
+
@use 'base';
|
|
22
|
+
|
|
23
|
+
$pl-comment: #59636e;
|
|
24
|
+
// ... 色定義
|
|
25
|
+
|
|
26
|
+
@mixin configure {
|
|
27
|
+
@include base.configure($pl-comment, ...);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## テーマからの呼び出し
|
|
32
|
+
|
|
33
|
+
section内で呼び出す:
|
|
34
|
+
|
|
35
|
+
```scss
|
|
36
|
+
@use './component/prettylights/light' as prettylights;
|
|
37
|
+
|
|
38
|
+
section {
|
|
39
|
+
@include prettylights.configure;
|
|
40
|
+
}
|
|
41
|
+
```
|