@riebeckite/theme-terminal 0.0.0-stage → 0.0.34
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 +201 -0
- package/README.md +70 -2
- package/README_ja.md +71 -0
- package/dist/src/index.d.ts +86 -0
- package/dist/src/index.js +78 -0
- package/package.json +54 -3
- package/styles/theme.css +466 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright Rerurate_514
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,71 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @riebeckite/theme-terminal
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- Generated from docs/docs/themes/terminal.md. Edit the canonical documentation in docs/docs/themes and run `pnpm docs:sync`. -->
|
|
4
|
+
|
|
5
|
+
[日本語](./README_ja.md)
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
`@riebeckite/theme-terminal` provides the official **Terminal** theme. Its theme identity is `terminal`. A terminal-inspired theme with configurable phosphor and frame details.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install @riebeckite/theme-terminal
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { defineConfig } from "@riebeckite/core";
|
|
21
|
+
import { terminalTheme } from "@riebeckite/theme-terminal";
|
|
22
|
+
|
|
23
|
+
export default defineConfig({
|
|
24
|
+
theme: terminalTheme({
|
|
25
|
+
colorMode: "system",
|
|
26
|
+
preset: "classic",
|
|
27
|
+
settings: { typography: "mono" },
|
|
28
|
+
}),
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Common options
|
|
33
|
+
|
|
34
|
+
| Property | Values | Description |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `colorMode` | `"light"`, `"dark"`, `"system"` | Chooses the color mode. `"system"` follows the browser preference. |
|
|
37
|
+
| `layout` | `"article"`, `"sidebar"`, `"full-width"` | Chooses the page layout. |
|
|
38
|
+
| `preset` | `classic`, `amber`, `modern` | Applies a named set of theme settings before explicit `settings`. |
|
|
39
|
+
| `settings` | object | Overrides the settings listed below. Unknown keys and invalid values are rejected. |
|
|
40
|
+
| `stylesheets` | string array | Loads site-owned stylesheets after the theme CSS. |
|
|
41
|
+
|
|
42
|
+
Resolution order is schema defaults, then the selected preset, then explicit `settings`.
|
|
43
|
+
|
|
44
|
+
## Theme settings
|
|
45
|
+
|
|
46
|
+
| Property | Type | Default and allowed values | Effect |
|
|
47
|
+
| --- | --- | --- | --- |
|
|
48
|
+
| `typography` | select | `"mono"` — `mono`, `system`, `serif`, `sans` | Selects the article typeface. |
|
|
49
|
+
| `fontSize` | slider | `0.95` — 0.85–1.25, step 0.05 | Article text size in rem. |
|
|
50
|
+
| `lineHeight` | slider | `1.75` — 1.5–2.1, step 0.05 | Article line height. |
|
|
51
|
+
| `phosphor` | select | `"green"` — `green`, `amber`, `white`, `ice` | Selects the terminal phosphor color. |
|
|
52
|
+
| `scanlines` | boolean | `false` | Shows a subtle CRT scanline overlay. |
|
|
53
|
+
| `glow` | boolean | `false` | Adds a glow effect to theme details. |
|
|
54
|
+
| `frameStyle` | select | `"line"` — `none`, `line`, `window` | Selects the terminal frame style. |
|
|
55
|
+
| `cursor` | boolean | `true` | Shows the terminal cursor. |
|
|
56
|
+
|
|
57
|
+
## Presets
|
|
58
|
+
|
|
59
|
+
| Preset | Label | Applied settings |
|
|
60
|
+
| --- | --- | --- |
|
|
61
|
+
| `classic` | Classic | `{ phosphor: "green", frameStyle: "line", cursor: true }` |
|
|
62
|
+
| `amber` | Amber | `{ phosphor: "amber", glow: true, frameStyle: "window" }` |
|
|
63
|
+
| `modern` | Modern | `{ phosphor: "ice", frameStyle: "none", cursor: false }` |
|
|
64
|
+
|
|
65
|
+
## CSS and attributes
|
|
66
|
+
|
|
67
|
+
The root receives `data-rb-theme="terminal"`, `data-rb-mode` for an explicit light or dark mode, and `data-rb-layout`. Every setting is reflected as `data-rb-setting-<name>`; color, number, and slider settings are also available as safe `--rb-setting-<name>` custom properties.
|
|
68
|
+
|
|
69
|
+
## See also
|
|
70
|
+
|
|
71
|
+
[Theme API](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/theme-api.md) and [Writing a theme](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/themes/writing-a-theme.md).
|
package/README_ja.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# @riebeckite/theme-terminal
|
|
2
|
+
|
|
3
|
+
<!-- Generated from docs/docs/themes/terminal.ja.md. Edit the canonical documentation in docs/docs/themes and run `pnpm docs:sync`. -->
|
|
4
|
+
|
|
5
|
+
[English](./README.md)
|
|
6
|
+
|
|
7
|
+
## 概要
|
|
8
|
+
|
|
9
|
+
`@riebeckite/theme-terminal` は公式テーマ **Terminal** を提供します。テーマ ID は `terminal` です。蛍光体色やフレームを設定できる、ターミナル風テーマです。
|
|
10
|
+
|
|
11
|
+
## インストール
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install @riebeckite/theme-terminal
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 使い方
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { defineConfig } from "@riebeckite/core";
|
|
21
|
+
import { terminalTheme } from "@riebeckite/theme-terminal";
|
|
22
|
+
|
|
23
|
+
export default defineConfig({
|
|
24
|
+
theme: terminalTheme({
|
|
25
|
+
colorMode: "system",
|
|
26
|
+
preset: "classic",
|
|
27
|
+
settings: { typography: "mono" },
|
|
28
|
+
}),
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 共通オプション
|
|
33
|
+
|
|
34
|
+
| プロパティ | 値 | 説明 |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `colorMode` | `"light"`、`"dark"`、`"system"` | カラーモードを選びます。`"system"` はブラウザの設定に従います。 |
|
|
37
|
+
| `layout` | `"article"`、`"sidebar"`、`"full-width"` | ページレイアウトを選びます。 |
|
|
38
|
+
| `preset` | `classic`、`amber`、`modern` | 明示した `settings` より先に、名前付きのテーマ設定セットを適用します。 |
|
|
39
|
+
| `settings` | object | 下記の設定を上書きします。不明なキーや不正な値は拒否されます。 |
|
|
40
|
+
| `stylesheets` | string array | テーマ CSS の後にサイト固有のスタイルシートを読み込みます。 |
|
|
41
|
+
|
|
42
|
+
設定スキーマの既定値、選択したプリセット、明示した `settings` の順に適用されます。
|
|
43
|
+
|
|
44
|
+
## テーマ設定
|
|
45
|
+
|
|
46
|
+
| プロパティ | 型 | 既定値と選択値 | 効果 |
|
|
47
|
+
| --- | --- | --- | --- |
|
|
48
|
+
| `typography` | select | 既定値 `"mono"` — `mono`、`system`、`serif`、`sans` | 本文の書体を選びます。 |
|
|
49
|
+
| `fontSize` | slider | 既定値 `0.95` — 0.85–1.25、刻み 0.05 | 本文の文字サイズを rem で設定します。 |
|
|
50
|
+
| `lineHeight` | slider | 既定値 `1.75` — 1.5–2.1、刻み 0.05 | 本文の行間を設定します。 |
|
|
51
|
+
| `phosphor` | select | 既定値 `"green"` — `green`、`amber`、`white`、`ice` | 端末の蛍光体色を選びます。 |
|
|
52
|
+
| `scanlines` | boolean | 既定値 `false` | 控えめな CRT の走査線を表示します。 |
|
|
53
|
+
| `glow` | boolean | 既定値 `false` | テーマのディテールに発光効果を加えます。 |
|
|
54
|
+
| `frameStyle` | select | 既定値 `"line"` — `none`、`line`、`window` | 端末フレームのスタイルを選びます。 |
|
|
55
|
+
| `cursor` | boolean | 既定値 `true` | 端末カーソルを表示します。 |
|
|
56
|
+
|
|
57
|
+
## プリセット
|
|
58
|
+
|
|
59
|
+
| プリセット | ラベル | 適用する設定 |
|
|
60
|
+
| --- | --- | --- |
|
|
61
|
+
| `classic` | Classic | `{ phosphor: "green", frameStyle: "line", cursor: true }` |
|
|
62
|
+
| `amber` | Amber | `{ phosphor: "amber", glow: true, frameStyle: "window" }` |
|
|
63
|
+
| `modern` | Modern | `{ phosphor: "ice", frameStyle: "none", cursor: false }` |
|
|
64
|
+
|
|
65
|
+
## CSS と属性
|
|
66
|
+
|
|
67
|
+
ルートには `data-rb-theme="terminal"`、明示的にライトまたはダークを選んだ場合は `data-rb-mode`、そして `data-rb-layout` が設定されます。すべての設定は `data-rb-setting-<name>` 属性に反映されます。color、number、slider 型の設定は安全な `--rb-setting-<name>` カスタムプロパティとしても利用できます。
|
|
68
|
+
|
|
69
|
+
## 関連情報
|
|
70
|
+
|
|
71
|
+
[Theme API](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/theme-api.md) と [テーマを書く](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/themes/writing-a-theme.ja.md) を参照してください。
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export declare const terminalTheme: import("@riebeckite/core").ThemeDefinition<{
|
|
2
|
+
readonly typography: {
|
|
3
|
+
readonly type: "select";
|
|
4
|
+
readonly label: "Typography";
|
|
5
|
+
readonly default: "mono";
|
|
6
|
+
readonly options: readonly [{
|
|
7
|
+
readonly value: "mono";
|
|
8
|
+
readonly label: "Mono";
|
|
9
|
+
}, {
|
|
10
|
+
readonly value: "system";
|
|
11
|
+
readonly label: "System";
|
|
12
|
+
}, {
|
|
13
|
+
readonly value: "serif";
|
|
14
|
+
readonly label: "Serif";
|
|
15
|
+
}, {
|
|
16
|
+
readonly value: "sans";
|
|
17
|
+
readonly label: "Sans";
|
|
18
|
+
}];
|
|
19
|
+
};
|
|
20
|
+
readonly fontSize: {
|
|
21
|
+
readonly type: "slider";
|
|
22
|
+
readonly label: "Font size";
|
|
23
|
+
readonly description: "Article text size in rem.";
|
|
24
|
+
readonly default: 0.95;
|
|
25
|
+
readonly min: 0.85;
|
|
26
|
+
readonly max: 1.25;
|
|
27
|
+
readonly step: 0.05;
|
|
28
|
+
};
|
|
29
|
+
readonly lineHeight: {
|
|
30
|
+
readonly type: "slider";
|
|
31
|
+
readonly label: "Line height";
|
|
32
|
+
readonly description: "Article line height.";
|
|
33
|
+
readonly default: 1.75;
|
|
34
|
+
readonly min: 1.5;
|
|
35
|
+
readonly max: 2.1;
|
|
36
|
+
readonly step: 0.05;
|
|
37
|
+
};
|
|
38
|
+
readonly phosphor: {
|
|
39
|
+
readonly type: "select";
|
|
40
|
+
readonly label: "Phosphor";
|
|
41
|
+
readonly default: "green";
|
|
42
|
+
readonly options: readonly [{
|
|
43
|
+
readonly value: "green";
|
|
44
|
+
readonly label: "Green";
|
|
45
|
+
}, {
|
|
46
|
+
readonly value: "amber";
|
|
47
|
+
readonly label: "Amber";
|
|
48
|
+
}, {
|
|
49
|
+
readonly value: "white";
|
|
50
|
+
readonly label: "White";
|
|
51
|
+
}, {
|
|
52
|
+
readonly value: "ice";
|
|
53
|
+
readonly label: "Ice";
|
|
54
|
+
}];
|
|
55
|
+
};
|
|
56
|
+
readonly scanlines: {
|
|
57
|
+
readonly type: "boolean";
|
|
58
|
+
readonly label: "Scanlines";
|
|
59
|
+
readonly default: false;
|
|
60
|
+
};
|
|
61
|
+
readonly glow: {
|
|
62
|
+
readonly type: "boolean";
|
|
63
|
+
readonly label: "Glow";
|
|
64
|
+
readonly default: false;
|
|
65
|
+
};
|
|
66
|
+
readonly frameStyle: {
|
|
67
|
+
readonly type: "select";
|
|
68
|
+
readonly label: "Frame style";
|
|
69
|
+
readonly default: "line";
|
|
70
|
+
readonly options: readonly [{
|
|
71
|
+
readonly value: "none";
|
|
72
|
+
readonly label: "None";
|
|
73
|
+
}, {
|
|
74
|
+
readonly value: "line";
|
|
75
|
+
readonly label: "Line";
|
|
76
|
+
}, {
|
|
77
|
+
readonly value: "window";
|
|
78
|
+
readonly label: "Window";
|
|
79
|
+
}];
|
|
80
|
+
};
|
|
81
|
+
readonly cursor: {
|
|
82
|
+
readonly type: "boolean";
|
|
83
|
+
readonly label: "Cursor";
|
|
84
|
+
readonly default: true;
|
|
85
|
+
};
|
|
86
|
+
}>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { defineTheme, defineThemeSettings } from "@riebeckite/core";
|
|
3
|
+
var terminalTheme = defineTheme({
|
|
4
|
+
name: "terminal",
|
|
5
|
+
styles: [{ moduleSpecifier: "@riebeckite/theme-terminal/style.css" }],
|
|
6
|
+
settings: defineThemeSettings({
|
|
7
|
+
typography: {
|
|
8
|
+
type: "select",
|
|
9
|
+
label: "Typography",
|
|
10
|
+
default: "mono",
|
|
11
|
+
options: [
|
|
12
|
+
{ value: "mono", label: "Mono" },
|
|
13
|
+
{ value: "system", label: "System" },
|
|
14
|
+
{ value: "serif", label: "Serif" },
|
|
15
|
+
{ value: "sans", label: "Sans" }
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
fontSize: {
|
|
19
|
+
type: "slider",
|
|
20
|
+
label: "Font size",
|
|
21
|
+
description: "Article text size in rem.",
|
|
22
|
+
default: 0.95,
|
|
23
|
+
min: 0.85,
|
|
24
|
+
max: 1.25,
|
|
25
|
+
step: 0.05
|
|
26
|
+
},
|
|
27
|
+
lineHeight: {
|
|
28
|
+
type: "slider",
|
|
29
|
+
label: "Line height",
|
|
30
|
+
description: "Article line height.",
|
|
31
|
+
default: 1.75,
|
|
32
|
+
min: 1.5,
|
|
33
|
+
max: 2.1,
|
|
34
|
+
step: 0.05
|
|
35
|
+
},
|
|
36
|
+
phosphor: {
|
|
37
|
+
type: "select",
|
|
38
|
+
label: "Phosphor",
|
|
39
|
+
default: "green",
|
|
40
|
+
options: [
|
|
41
|
+
{ value: "green", label: "Green" },
|
|
42
|
+
{ value: "amber", label: "Amber" },
|
|
43
|
+
{ value: "white", label: "White" },
|
|
44
|
+
{ value: "ice", label: "Ice" }
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
scanlines: { type: "boolean", label: "Scanlines", default: false },
|
|
48
|
+
glow: { type: "boolean", label: "Glow", default: false },
|
|
49
|
+
frameStyle: {
|
|
50
|
+
type: "select",
|
|
51
|
+
label: "Frame style",
|
|
52
|
+
default: "line",
|
|
53
|
+
options: [
|
|
54
|
+
{ value: "none", label: "None" },
|
|
55
|
+
{ value: "line", label: "Line" },
|
|
56
|
+
{ value: "window", label: "Window" }
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
cursor: { type: "boolean", label: "Cursor", default: true }
|
|
60
|
+
}),
|
|
61
|
+
presets: {
|
|
62
|
+
classic: {
|
|
63
|
+
label: "Classic",
|
|
64
|
+
settings: { phosphor: "green", frameStyle: "line", cursor: true }
|
|
65
|
+
},
|
|
66
|
+
amber: {
|
|
67
|
+
label: "Amber",
|
|
68
|
+
settings: { phosphor: "amber", glow: true, frameStyle: "window" }
|
|
69
|
+
},
|
|
70
|
+
modern: {
|
|
71
|
+
label: "Modern",
|
|
72
|
+
settings: { phosphor: "ice", frameStyle: "none", cursor: false }
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
export {
|
|
77
|
+
terminalTheme
|
|
78
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/theme-terminal",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.34",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/src/index.js",
|
|
7
|
+
"types": "./dist/src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/src/index.d.ts",
|
|
11
|
+
"import": "./dist/src/index.js",
|
|
12
|
+
"source": "./src/index.ts",
|
|
13
|
+
"default": "./dist/src/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./style.css": "./styles/theme.css",
|
|
16
|
+
"./styles/theme.css": "./styles/theme.css"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@riebeckite/core": "0.0.34"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"LICENSE",
|
|
26
|
+
"README.md",
|
|
27
|
+
"README_ja.md",
|
|
28
|
+
"dist",
|
|
29
|
+
"styles"
|
|
30
|
+
],
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/Rerurate514/riebeckite.git",
|
|
34
|
+
"directory": "packages/themes/terminal"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/Rerurate514/riebeckite#readme",
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/Rerurate514/riebeckite/issues"
|
|
39
|
+
},
|
|
40
|
+
"description": "A retro terminal CSS theme for Riebeckite sites.",
|
|
41
|
+
"keywords": [
|
|
42
|
+
"riebeckite",
|
|
43
|
+
"theme",
|
|
44
|
+
"css",
|
|
45
|
+
"terminal",
|
|
46
|
+
"retro-computing"
|
|
47
|
+
],
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
50
|
+
},
|
|
51
|
+
"sideEffects": [
|
|
52
|
+
"./styles/*.css"
|
|
53
|
+
],
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "node ../../../scripts/build_package.mjs"
|
|
56
|
+
}
|
|
6
57
|
}
|
package/styles/theme.css
ADDED
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
@theme {
|
|
2
|
+
--font-sans: var(--rb-font-body);
|
|
3
|
+
--font-serif: var(--rb-font-heading);
|
|
4
|
+
--font-mono: var(--rb-font-mono);
|
|
5
|
+
--color-rb-paper: var(--rb-color-paper);
|
|
6
|
+
--color-rb-ink: var(--rb-color-ink);
|
|
7
|
+
--color-rb-muted: var(--rb-color-muted);
|
|
8
|
+
--color-rb-accent: var(--rb-color-accent);
|
|
9
|
+
--color-rb-surface: var(--rb-color-surface);
|
|
10
|
+
}
|
|
11
|
+
@layer base {
|
|
12
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] {
|
|
13
|
+
color-scheme: dark;
|
|
14
|
+
--rb-color-paper: #07100a;
|
|
15
|
+
--rb-color-surface: #0d1910;
|
|
16
|
+
--rb-color-surface-hover: #15261a;
|
|
17
|
+
--rb-color-ink: #b7ffc5;
|
|
18
|
+
--rb-color-muted: #79a781;
|
|
19
|
+
--rb-color-accent: #69ed85;
|
|
20
|
+
--rb-color-link: #a2ffb4;
|
|
21
|
+
--rb-color-focus: #d5ffdb;
|
|
22
|
+
--rb-color-selected: #205b2c;
|
|
23
|
+
--rb-color-border: #3a7545;
|
|
24
|
+
--rb-color-border-strong: #66a872;
|
|
25
|
+
--rb-color-danger: #ff9a8d;
|
|
26
|
+
--rb-color-success: #9affac;
|
|
27
|
+
--rb-color-code-background: #030804;
|
|
28
|
+
--rb-color-code-ink: #b7ffc5;
|
|
29
|
+
--rb-color-code-inline: #15351b;
|
|
30
|
+
--rb-color-overlay: rgb(0 0 0 / 0.78);
|
|
31
|
+
--rb-font-body:
|
|
32
|
+
"Cascadia Mono", "Cascadia Code", "Lucida Console", "DejaVu Sans Mono",
|
|
33
|
+
"Noto Sans Mono CJK JP", monospace;
|
|
34
|
+
--rb-font-heading: var(--rb-font-body);
|
|
35
|
+
--rb-font-mono: var(--rb-font-body);
|
|
36
|
+
--rb-layout-page-max: 88rem;
|
|
37
|
+
--rb-layout-article-max: 52rem;
|
|
38
|
+
--rb-layout-sidebar: 16rem;
|
|
39
|
+
--rb-layout-gap: 2rem;
|
|
40
|
+
--rb-radius-sm: 0;
|
|
41
|
+
--rb-radius-md: 0;
|
|
42
|
+
}
|
|
43
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"][data-rb-mode="light"] {
|
|
44
|
+
color-scheme: light;
|
|
45
|
+
--rb-color-paper: #ecf1e8;
|
|
46
|
+
--rb-color-surface: #f7faf3;
|
|
47
|
+
--rb-color-surface-hover: #dce6d7;
|
|
48
|
+
--rb-color-ink: #183a21;
|
|
49
|
+
--rb-color-muted: #4e7155;
|
|
50
|
+
--rb-color-accent: #237e3d;
|
|
51
|
+
--rb-color-link: #155d2a;
|
|
52
|
+
--rb-color-focus: #175f2d;
|
|
53
|
+
--rb-color-selected: #c5e6c9;
|
|
54
|
+
--rb-color-border: #73a27a;
|
|
55
|
+
--rb-color-border-strong: #376d41;
|
|
56
|
+
--rb-color-danger: #aa4438;
|
|
57
|
+
--rb-color-success: #28723b;
|
|
58
|
+
--rb-color-code-background: #102416;
|
|
59
|
+
--rb-color-code-ink: #d9f7dc;
|
|
60
|
+
--rb-color-code-inline: #dcebdc;
|
|
61
|
+
--rb-color-overlay: rgb(4 15 6 / 0.64);
|
|
62
|
+
}
|
|
63
|
+
@media (prefers-color-scheme: light) {
|
|
64
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]:not([data-rb-mode]) {
|
|
65
|
+
color-scheme: light;
|
|
66
|
+
--rb-color-paper: #ecf1e8;
|
|
67
|
+
--rb-color-surface: #f7faf3;
|
|
68
|
+
--rb-color-surface-hover: #dce6d7;
|
|
69
|
+
--rb-color-ink: #183a21;
|
|
70
|
+
--rb-color-muted: #4e7155;
|
|
71
|
+
--rb-color-accent: #237e3d;
|
|
72
|
+
--rb-color-link: #155d2a;
|
|
73
|
+
--rb-color-focus: #175f2d;
|
|
74
|
+
--rb-color-selected: #c5e6c9;
|
|
75
|
+
--rb-color-border: #73a27a;
|
|
76
|
+
--rb-color-border-strong: #376d41;
|
|
77
|
+
--rb-color-danger: #aa4438;
|
|
78
|
+
--rb-color-success: #28723b;
|
|
79
|
+
--rb-color-code-background: #102416;
|
|
80
|
+
--rb-color-code-ink: #d9f7dc;
|
|
81
|
+
--rb-color-code-inline: #dcebdc;
|
|
82
|
+
--rb-color-overlay: rgb(4 15 6 / 0.64);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] {
|
|
86
|
+
background: var(--rb-color-paper);
|
|
87
|
+
color: var(--rb-color-ink);
|
|
88
|
+
font-family: var(--rb-font-body);
|
|
89
|
+
font-variant-ligatures: none;
|
|
90
|
+
accent-color: var(--rb-color-accent);
|
|
91
|
+
caret-color: var(--rb-color-accent);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
:is(
|
|
95
|
+
:root,
|
|
96
|
+
.rb-theme-root
|
|
97
|
+
)[data-rb-theme="terminal"][data-rb-setting-phosphor="amber"] {
|
|
98
|
+
--rb-color-ink: #ffc86b;
|
|
99
|
+
--rb-color-muted: #bd9554;
|
|
100
|
+
--rb-color-accent: #f0a62b;
|
|
101
|
+
--rb-color-link: #ffda92;
|
|
102
|
+
--rb-color-focus: #ffe1a8;
|
|
103
|
+
--rb-color-selected: #704a16;
|
|
104
|
+
--rb-color-border: #8a6635;
|
|
105
|
+
--rb-color-border-strong: #c69a52;
|
|
106
|
+
--rb-color-code-ink: #ffc86b;
|
|
107
|
+
--rb-color-code-inline: #3e2c12;
|
|
108
|
+
}
|
|
109
|
+
:is(
|
|
110
|
+
:root,
|
|
111
|
+
.rb-theme-root
|
|
112
|
+
)[data-rb-theme="terminal"][data-rb-setting-phosphor="white"] {
|
|
113
|
+
--rb-color-ink: #e7ebe6;
|
|
114
|
+
--rb-color-muted: #adb7af;
|
|
115
|
+
--rb-color-accent: #d4ddd5;
|
|
116
|
+
--rb-color-link: #ffffff;
|
|
117
|
+
--rb-color-focus: #ffffff;
|
|
118
|
+
--rb-color-selected: #4c554e;
|
|
119
|
+
--rb-color-border: #738077;
|
|
120
|
+
--rb-color-border-strong: #b5c0b7;
|
|
121
|
+
--rb-color-code-ink: #e7ebe6;
|
|
122
|
+
--rb-color-code-inline: #29312b;
|
|
123
|
+
}
|
|
124
|
+
:is(
|
|
125
|
+
:root,
|
|
126
|
+
.rb-theme-root
|
|
127
|
+
)[data-rb-theme="terminal"][data-rb-setting-phosphor="ice"] {
|
|
128
|
+
--rb-color-ink: #b7ecff;
|
|
129
|
+
--rb-color-muted: #82adbd;
|
|
130
|
+
--rb-color-accent: #62c5e8;
|
|
131
|
+
--rb-color-link: #b5efff;
|
|
132
|
+
--rb-color-focus: #d4f7ff;
|
|
133
|
+
--rb-color-selected: #1f5265;
|
|
134
|
+
--rb-color-border: #42788c;
|
|
135
|
+
--rb-color-border-strong: #78b4c8;
|
|
136
|
+
--rb-color-code-ink: #b7ecff;
|
|
137
|
+
--rb-color-code-inline: #123442;
|
|
138
|
+
}
|
|
139
|
+
:is(
|
|
140
|
+
:root,
|
|
141
|
+
.rb-theme-root
|
|
142
|
+
)[data-rb-theme="terminal"][data-rb-mode="light"][data-rb-setting-phosphor="amber"] {
|
|
143
|
+
--rb-color-ink: #6a4300;
|
|
144
|
+
--rb-color-muted: #715a32;
|
|
145
|
+
--rb-color-accent: #8b5800;
|
|
146
|
+
--rb-color-link: #6a4300;
|
|
147
|
+
--rb-color-focus: #573800;
|
|
148
|
+
--rb-color-selected: #f2d49b;
|
|
149
|
+
--rb-color-border: #ab8950;
|
|
150
|
+
--rb-color-border-strong: #6c501a;
|
|
151
|
+
--rb-color-code-inline: #f5e6c3;
|
|
152
|
+
}
|
|
153
|
+
:is(
|
|
154
|
+
:root,
|
|
155
|
+
.rb-theme-root
|
|
156
|
+
)[data-rb-theme="terminal"][data-rb-mode="light"][data-rb-setting-phosphor="white"] {
|
|
157
|
+
--rb-color-ink: #26312a;
|
|
158
|
+
--rb-color-muted: #5d675f;
|
|
159
|
+
--rb-color-accent: #48554c;
|
|
160
|
+
--rb-color-link: #26312a;
|
|
161
|
+
--rb-color-focus: #26312a;
|
|
162
|
+
--rb-color-selected: #d9e0d9;
|
|
163
|
+
--rb-color-border: #869189;
|
|
164
|
+
--rb-color-border-strong: #4b584f;
|
|
165
|
+
--rb-color-code-inline: #dfe5df;
|
|
166
|
+
}
|
|
167
|
+
:is(
|
|
168
|
+
:root,
|
|
169
|
+
.rb-theme-root
|
|
170
|
+
)[data-rb-theme="terminal"][data-rb-mode="light"][data-rb-setting-phosphor="ice"] {
|
|
171
|
+
--rb-color-ink: #064357;
|
|
172
|
+
--rb-color-muted: #416979;
|
|
173
|
+
--rb-color-accent: #0b627d;
|
|
174
|
+
--rb-color-link: #064357;
|
|
175
|
+
--rb-color-focus: #043548;
|
|
176
|
+
--rb-color-selected: #bde7f2;
|
|
177
|
+
--rb-color-border: #6799aa;
|
|
178
|
+
--rb-color-border-strong: #185e73;
|
|
179
|
+
--rb-color-code-inline: #ccecf4;
|
|
180
|
+
}
|
|
181
|
+
@media (prefers-color-scheme: light) {
|
|
182
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]:not(
|
|
183
|
+
[data-rb-mode]
|
|
184
|
+
)[data-rb-setting-phosphor="amber"] {
|
|
185
|
+
--rb-color-ink: #6a4300;
|
|
186
|
+
--rb-color-muted: #715a32;
|
|
187
|
+
--rb-color-accent: #8b5800;
|
|
188
|
+
--rb-color-link: #6a4300;
|
|
189
|
+
--rb-color-focus: #573800;
|
|
190
|
+
--rb-color-selected: #f2d49b;
|
|
191
|
+
--rb-color-border: #ab8950;
|
|
192
|
+
--rb-color-border-strong: #6c501a;
|
|
193
|
+
--rb-color-code-inline: #f5e6c3;
|
|
194
|
+
}
|
|
195
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]:not(
|
|
196
|
+
[data-rb-mode]
|
|
197
|
+
)[data-rb-setting-phosphor="white"] {
|
|
198
|
+
--rb-color-ink: #26312a;
|
|
199
|
+
--rb-color-muted: #5d675f;
|
|
200
|
+
--rb-color-accent: #48554c;
|
|
201
|
+
--rb-color-link: #26312a;
|
|
202
|
+
--rb-color-focus: #26312a;
|
|
203
|
+
--rb-color-selected: #d9e0d9;
|
|
204
|
+
--rb-color-border: #869189;
|
|
205
|
+
--rb-color-border-strong: #4b584f;
|
|
206
|
+
--rb-color-code-inline: #dfe5df;
|
|
207
|
+
}
|
|
208
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]:not(
|
|
209
|
+
[data-rb-mode]
|
|
210
|
+
)[data-rb-setting-phosphor="ice"] {
|
|
211
|
+
--rb-color-ink: #064357;
|
|
212
|
+
--rb-color-muted: #416979;
|
|
213
|
+
--rb-color-accent: #0b627d;
|
|
214
|
+
--rb-color-link: #064357;
|
|
215
|
+
--rb-color-focus: #043548;
|
|
216
|
+
--rb-color-selected: #bde7f2;
|
|
217
|
+
--rb-color-border: #6799aa;
|
|
218
|
+
--rb-color-border-strong: #185e73;
|
|
219
|
+
--rb-color-code-inline: #ccecf4;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] ::selection {
|
|
223
|
+
background: var(--rb-color-accent);
|
|
224
|
+
color: var(--rb-color-paper);
|
|
225
|
+
}
|
|
226
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] :focus-visible {
|
|
227
|
+
outline: 2px solid var(--rb-color-focus);
|
|
228
|
+
outline-offset: 3px;
|
|
229
|
+
}
|
|
230
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] .rb-article {
|
|
231
|
+
font-size: calc(var(--rb-setting-font-size, 0.95) * 1rem);
|
|
232
|
+
line-height: var(--rb-setting-line-height, 1.75);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
:is(
|
|
236
|
+
:root,
|
|
237
|
+
.rb-theme-root
|
|
238
|
+
)[data-rb-theme="terminal"][data-rb-setting-typography="system"]
|
|
239
|
+
.rb-article,
|
|
240
|
+
:is(
|
|
241
|
+
:root,
|
|
242
|
+
.rb-theme-root
|
|
243
|
+
)[data-rb-theme="terminal"][data-rb-setting-typography="sans"]
|
|
244
|
+
.rb-article {
|
|
245
|
+
font-family: ui-sans-serif, system-ui, sans-serif;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
:is(
|
|
249
|
+
:root,
|
|
250
|
+
.rb-theme-root
|
|
251
|
+
)[data-rb-theme="terminal"][data-rb-setting-typography="serif"]
|
|
252
|
+
.rb-article {
|
|
253
|
+
font-family: Georgia, Cambria, "Times New Roman", serif;
|
|
254
|
+
}
|
|
255
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] .rb-article-header {
|
|
256
|
+
margin-bottom: 2rem;
|
|
257
|
+
padding: 1rem 1.2rem;
|
|
258
|
+
border: 1px solid var(--rb-color-border-strong);
|
|
259
|
+
background: var(--rb-color-surface);
|
|
260
|
+
}
|
|
261
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] .rb-article-header h1 {
|
|
262
|
+
font-family: var(--rb-font-heading);
|
|
263
|
+
font-size: clamp(1.45rem, 1.15rem + 1.8vw, 2.35rem);
|
|
264
|
+
font-weight: 700;
|
|
265
|
+
line-height: 1.25;
|
|
266
|
+
letter-spacing: 0.025em;
|
|
267
|
+
text-wrap: balance;
|
|
268
|
+
}
|
|
269
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]
|
|
270
|
+
.rb-article-header
|
|
271
|
+
h1::before {
|
|
272
|
+
content: "> ";
|
|
273
|
+
color: var(--rb-color-accent);
|
|
274
|
+
}
|
|
275
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] .rb-article-meta {
|
|
276
|
+
margin-top: 0.75rem;
|
|
277
|
+
color: var(--rb-color-muted);
|
|
278
|
+
font-size: 0.75rem;
|
|
279
|
+
}
|
|
280
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] .rb-article-content h2 {
|
|
281
|
+
margin-top: 3rem;
|
|
282
|
+
color: var(--rb-color-accent);
|
|
283
|
+
font-size: 1.15rem;
|
|
284
|
+
font-weight: 700;
|
|
285
|
+
letter-spacing: 0.04em;
|
|
286
|
+
}
|
|
287
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]
|
|
288
|
+
.rb-article-content
|
|
289
|
+
h2::before {
|
|
290
|
+
content: "## ";
|
|
291
|
+
}
|
|
292
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] .rb-article-content h3 {
|
|
293
|
+
margin-top: 2rem;
|
|
294
|
+
color: var(--rb-color-ink);
|
|
295
|
+
font-size: 1rem;
|
|
296
|
+
font-weight: 700;
|
|
297
|
+
}
|
|
298
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]
|
|
299
|
+
.rb-article-content
|
|
300
|
+
h3::before {
|
|
301
|
+
content: "### ";
|
|
302
|
+
color: var(--rb-color-muted);
|
|
303
|
+
}
|
|
304
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] .rb-article-content a {
|
|
305
|
+
color: var(--rb-color-link);
|
|
306
|
+
text-decoration: underline;
|
|
307
|
+
text-decoration-thickness: 1px;
|
|
308
|
+
text-underline-offset: 0.2em;
|
|
309
|
+
}
|
|
310
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]
|
|
311
|
+
.rb-article-content
|
|
312
|
+
blockquote {
|
|
313
|
+
margin: 1.75rem 0;
|
|
314
|
+
padding: 0.8rem 1rem;
|
|
315
|
+
border-left: 2px solid var(--rb-color-accent);
|
|
316
|
+
background: color-mix(in srgb, var(--rb-color-surface) 85%, transparent);
|
|
317
|
+
color: var(--rb-color-ink);
|
|
318
|
+
}
|
|
319
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]
|
|
320
|
+
.rb-article-content
|
|
321
|
+
blockquote::before {
|
|
322
|
+
content: "[QUOTE] ";
|
|
323
|
+
color: var(--rb-color-muted);
|
|
324
|
+
font-size: 0.8em;
|
|
325
|
+
}
|
|
326
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]
|
|
327
|
+
.rb-article-content
|
|
328
|
+
:is(pre, code) {
|
|
329
|
+
font-family: var(--rb-font-mono);
|
|
330
|
+
}
|
|
331
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]
|
|
332
|
+
.rb-article-content
|
|
333
|
+
:not(pre)
|
|
334
|
+
> code {
|
|
335
|
+
padding: 0.1em 0.25em;
|
|
336
|
+
background: var(--rb-color-code-inline);
|
|
337
|
+
color: var(--rb-color-ink);
|
|
338
|
+
}
|
|
339
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]
|
|
340
|
+
.rb-article-content
|
|
341
|
+
pre:not(:where(.rr-code *)) {
|
|
342
|
+
overflow-x: auto;
|
|
343
|
+
padding: 1rem 1.15rem;
|
|
344
|
+
border: 1px solid var(--rb-color-border);
|
|
345
|
+
background: var(--rb-color-code-background);
|
|
346
|
+
color: var(--rb-color-code-ink);
|
|
347
|
+
}
|
|
348
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]
|
|
349
|
+
.rb-article-content
|
|
350
|
+
pre::before {
|
|
351
|
+
display: block;
|
|
352
|
+
margin-bottom: 0.6rem;
|
|
353
|
+
color: var(--rb-color-muted);
|
|
354
|
+
content: "$ cat snippet";
|
|
355
|
+
font-size: 0.75rem;
|
|
356
|
+
}
|
|
357
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] .rb-article-content table {
|
|
358
|
+
display: table;
|
|
359
|
+
width: max-content;
|
|
360
|
+
min-width: 100%;
|
|
361
|
+
border: 1px solid var(--rb-color-border);
|
|
362
|
+
border-collapse: collapse;
|
|
363
|
+
font-size: 0.9em;
|
|
364
|
+
}
|
|
365
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]
|
|
366
|
+
.rb-article-content
|
|
367
|
+
:is(th, td) {
|
|
368
|
+
padding: 0.5rem 0.7rem;
|
|
369
|
+
border: 1px solid var(--rb-color-border);
|
|
370
|
+
text-align: left;
|
|
371
|
+
}
|
|
372
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] .rb-article-content th {
|
|
373
|
+
background: var(--rb-color-surface-hover);
|
|
374
|
+
color: var(--rb-color-ink);
|
|
375
|
+
}
|
|
376
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]
|
|
377
|
+
:is(
|
|
378
|
+
.rr-table-of-contents,
|
|
379
|
+
.rr-backlinks,
|
|
380
|
+
.rr-callout,
|
|
381
|
+
.rr-search,
|
|
382
|
+
.rr-code,
|
|
383
|
+
.rr-code-tabs,
|
|
384
|
+
.rr-query
|
|
385
|
+
) {
|
|
386
|
+
border: 1px solid var(--rb-color-border);
|
|
387
|
+
border-radius: 0;
|
|
388
|
+
background: var(--rb-color-surface);
|
|
389
|
+
}
|
|
390
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] .rr-callout {
|
|
391
|
+
padding: 1.5rem 2rem;
|
|
392
|
+
border-left: 2px solid var(--rb-color-accent);
|
|
393
|
+
}
|
|
394
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"]
|
|
395
|
+
.rb-article-content
|
|
396
|
+
> :is(.rr-callout, .rb-table-scroll, pre, .rr-code)
|
|
397
|
+
+ :is(.rr-callout, .rb-table-scroll, pre, .rr-code) {
|
|
398
|
+
margin-block-start: 2.5rem;
|
|
399
|
+
}
|
|
400
|
+
:is(
|
|
401
|
+
:root,
|
|
402
|
+
.rb-theme-root
|
|
403
|
+
)[data-rb-theme="terminal"][data-rb-setting-frame-style="none"]
|
|
404
|
+
.rb-article-header {
|
|
405
|
+
padding-inline: 0;
|
|
406
|
+
border-inline: 0;
|
|
407
|
+
background: transparent;
|
|
408
|
+
}
|
|
409
|
+
:is(
|
|
410
|
+
:root,
|
|
411
|
+
.rb-theme-root
|
|
412
|
+
)[data-rb-theme="terminal"][data-rb-setting-frame-style="window"]
|
|
413
|
+
.rb-article-header::before {
|
|
414
|
+
display: block;
|
|
415
|
+
margin: -1rem -1.2rem 1rem;
|
|
416
|
+
padding: 0.2rem 0.6rem;
|
|
417
|
+
border-bottom: 1px solid var(--rb-color-border);
|
|
418
|
+
color: var(--rb-color-muted);
|
|
419
|
+
content: "● ● ● terminal";
|
|
420
|
+
font-size: 0.7rem;
|
|
421
|
+
}
|
|
422
|
+
:is(
|
|
423
|
+
:root,
|
|
424
|
+
.rb-theme-root
|
|
425
|
+
)[data-rb-theme="terminal"][data-rb-setting-scanlines="true"] {
|
|
426
|
+
background-image: repeating-linear-gradient(
|
|
427
|
+
to bottom,
|
|
428
|
+
rgb(255 255 255 / 0.035) 0 1px,
|
|
429
|
+
transparent 1px 4px
|
|
430
|
+
);
|
|
431
|
+
}
|
|
432
|
+
:is(
|
|
433
|
+
:root,
|
|
434
|
+
.rb-theme-root
|
|
435
|
+
)[data-rb-theme="terminal"][data-rb-setting-glow="true"]
|
|
436
|
+
:is(.rb-article-header h1, .rb-article-content h2) {
|
|
437
|
+
text-shadow: 0 0 8px
|
|
438
|
+
color-mix(in srgb, var(--rb-color-accent) 45%, transparent);
|
|
439
|
+
}
|
|
440
|
+
:is(
|
|
441
|
+
:root,
|
|
442
|
+
.rb-theme-root
|
|
443
|
+
)[data-rb-theme="terminal"][data-rb-setting-cursor="true"]
|
|
444
|
+
.rb-article-header
|
|
445
|
+
h1::after {
|
|
446
|
+
display: inline-block;
|
|
447
|
+
width: 0.55em;
|
|
448
|
+
height: 1em;
|
|
449
|
+
margin-left: 0.18em;
|
|
450
|
+
background: var(--rb-color-accent);
|
|
451
|
+
content: "";
|
|
452
|
+
vertical-align: -0.15em;
|
|
453
|
+
animation: rb-terminal-cursor 1s steps(1) infinite;
|
|
454
|
+
}
|
|
455
|
+
@keyframes rb-terminal-cursor {
|
|
456
|
+
50% {
|
|
457
|
+
opacity: 0;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
@media (prefers-reduced-motion: reduce) {
|
|
461
|
+
:is(:root, .rb-theme-root)[data-rb-theme="terminal"] * {
|
|
462
|
+
scroll-behavior: auto;
|
|
463
|
+
transition-duration: 0s;
|
|
464
|
+
animation: none;
|
|
465
|
+
}
|
|
466
|
+
}
|