@kadal/theme-classic 0.0.0-stage → 0.4.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 +22 -0
- package/README.md +49 -2
- package/index.tsx +32 -0
- package/package.json +86 -4
- package/style.css +355 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Slidev.js Team (the original theme, @slidev/theme-default)
|
|
4
|
+
Copyright (c) 2026 Mithunish Prabhakaran (the Kadal Deck port, @kadal/theme-classic)
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @kadal/theme-classic
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Classic**, a theme for [Kadal Deck](https://deck.kadal.cc): Slidev's default theme, ported.
|
|
4
|
+
Avenir Next (Nunito Sans where it is not installed), light headings, square bullets, dashed
|
|
5
|
+
links, a cyan primary, and a cover that dims a background picture. Light and dark.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @kadal/theme-classic
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
---
|
|
13
|
+
theme: classic
|
|
14
|
+
layout: cover
|
|
15
|
+
background: /cover.jpg # a picture is dimmed and the words turn white, as in Slidev
|
|
16
|
+
themeConfig:
|
|
17
|
+
primary: "#3ab9d5" # → --theme-primary: links on hover, the quote's rule, the progress bar
|
|
18
|
+
---
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Layouts
|
|
22
|
+
|
|
23
|
+
Every engine layout is styled. The theme's own:
|
|
24
|
+
|
|
25
|
+
| layout | frontmatter | what |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `cover` | `background` | the title, vertically centred; a picture background gets Slidev's dim |
|
|
28
|
+
|
|
29
|
+
`intro`, `section`, `statement`, `fact` and `quote` keep their Slidev look (a big centred
|
|
30
|
+
section title, a bold statement, a huge fact over a bold caption).
|
|
31
|
+
|
|
32
|
+
Fonts load through the fonts mechanism (`config.fonts` in package.json): Avenir Next is used
|
|
33
|
+
when installed, Nunito Sans from Google Fonts otherwise, Fira Code for code. Code is coloured with
|
|
34
|
+
Shiki's `vitesse-light` / `vitesse-dark`, Slidev's own.
|
|
35
|
+
|
|
36
|
+
## Develop
|
|
37
|
+
|
|
38
|
+
The preview deck (`preview/deck.mdx`) is the original theme's own example deck, slide for slide:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm run dev # the preview deck, live
|
|
42
|
+
npm run check # lint it
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Licence and attribution
|
|
46
|
+
|
|
47
|
+
MIT. This package is a port of [`@slidev/theme-default`](https://github.com/slidevjs/themes), MIT License,
|
|
48
|
+
Copyright (c) 2021 Slidev.js Team (the theme by Anthony Fu). The look, the layouts and their frontmatter are
|
|
49
|
+
theirs; the React layouts and the stylesheet were rewritten for Kadal Deck. The full notice is in
|
|
50
|
+
[LICENSE](./LICENSE).
|
package/index.tsx
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { LayoutProps, SlideBackground } from "@kadal/deck";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Classic: Slidev's default theme (@slidev/theme-default, MIT) for Kadal Deck.
|
|
5
|
+
*
|
|
6
|
+
* Slidev's theme ships six layouts: cover, intro, fact, quote, section and statement. Five of them
|
|
7
|
+
* are a `.slidev-layout <name>` box with the slot centred inside, which is exactly the markup
|
|
8
|
+
* Kadal's built-in layouts of the same names already give (`.deck-layout-<name>`), so style.css
|
|
9
|
+
* styles those and nothing here replaces them. The cover is the one with behaviour: a
|
|
10
|
+
* `background:` that is a picture gets Slidev's dim (a #0005 → #0008 gradient) and white words.
|
|
11
|
+
* The picture itself is painted by the engine's background layer, as on any slide.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** Is this background a picture or a film, rather than a colour (Slidev's handleBackground)? */
|
|
15
|
+
function isPicture(bg: SlideBackground | null | undefined): boolean {
|
|
16
|
+
return !!bg && !!(bg.image || bg.video);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** `layout: cover` with Slidev's `background:` behaviour. */
|
|
20
|
+
function Cover({ options, children }: LayoutProps) {
|
|
21
|
+
const picture = isPicture(options.background);
|
|
22
|
+
return (
|
|
23
|
+
<div className={`deck-layout deck-layout-cover${picture ? " classic-on-image" : ""}`}>
|
|
24
|
+
{picture ? <div className="classic-dim" aria-hidden="true" /> : null}
|
|
25
|
+
{children}
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
layouts: { cover: Cover },
|
|
32
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,88 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kadal/theme-classic",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "Classic: Slidev's default theme, ported to Kadal Deck. Avenir Next, light headings, square bullets, light and dark.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"kadal-theme",
|
|
7
|
+
"kadal-deck",
|
|
8
|
+
"presentation",
|
|
9
|
+
"slides",
|
|
10
|
+
"theme",
|
|
11
|
+
"slidev-port"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://deck.kadal.cc/docs/",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/kadalcc/deck.git",
|
|
17
|
+
"directory": "packages/theme-classic"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/kadalcc/deck/issues"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"author": "Mithunish Prabhakaran <pmithunish@gmail.com>",
|
|
24
|
+
"type": "module",
|
|
25
|
+
"files": [
|
|
26
|
+
"style.css",
|
|
27
|
+
"index.tsx",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE"
|
|
30
|
+
],
|
|
31
|
+
"exports": {
|
|
32
|
+
".": "./index.tsx",
|
|
33
|
+
"./style.css": "./style.css",
|
|
34
|
+
"./package.json": "./package.json"
|
|
35
|
+
},
|
|
36
|
+
"kadal": {
|
|
37
|
+
"theme": {
|
|
38
|
+
"name": "classic",
|
|
39
|
+
"title": "Classic",
|
|
40
|
+
"description": "Slidev's default theme: Avenir Next, light headings, square bullets.",
|
|
41
|
+
"colorScheme": "both",
|
|
42
|
+
"themeConfig": {
|
|
43
|
+
"primary": "#3ab9d5"
|
|
44
|
+
},
|
|
45
|
+
"config": {
|
|
46
|
+
"fonts": {
|
|
47
|
+
"sans": "Avenir Next,Nunito Sans",
|
|
48
|
+
"mono": "Fira Code",
|
|
49
|
+
"local": "Avenir Next",
|
|
50
|
+
"weights": "300,400,500,600,700"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"shiki": {
|
|
54
|
+
"light": "vitesse-light",
|
|
55
|
+
"dark": "vitesse-dark"
|
|
56
|
+
},
|
|
57
|
+
"defaults": {},
|
|
58
|
+
"layouts": [
|
|
59
|
+
"cover"
|
|
60
|
+
],
|
|
61
|
+
"components": []
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"publishConfig": {
|
|
65
|
+
"access": "public",
|
|
66
|
+
"provenance": true
|
|
67
|
+
},
|
|
68
|
+
"scripts": {
|
|
69
|
+
"dev": "kadal-deck dev -C preview",
|
|
70
|
+
"build": "kadal-deck build -C preview",
|
|
71
|
+
"check": "kadal-deck check -C preview",
|
|
72
|
+
"typecheck": "tsc --noEmit"
|
|
73
|
+
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"@kadal/deck": "^0.4.1",
|
|
76
|
+
"react": "^19.2.0"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@kadal/deck": "workspace:*",
|
|
80
|
+
"@types/react": "^19.2.0",
|
|
81
|
+
"@types/react-dom": "^19.2.0",
|
|
82
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
83
|
+
"react": "^19.2.7",
|
|
84
|
+
"react-dom": "^19.2.7",
|
|
85
|
+
"typescript": "^6.0.3",
|
|
86
|
+
"vite": "^8.0.16"
|
|
87
|
+
}
|
|
88
|
+
}
|
package/style.css
ADDED
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
/* Classic — a port of Slidev's default theme (@slidev/theme-default, MIT, © 2021 Slidev.js
|
|
2
|
+
Team) to Kadal Deck. Avenir Next (Nunito Sans where it is not installed), light headings,
|
|
3
|
+
square bullets, dashed links, a cyan primary; white on #121212 in the dark.
|
|
4
|
+
|
|
5
|
+
Units. Slidev draws on a 980px-wide canvas with a 16px rem and a 1.1rem body; Kadal draws on a
|
|
6
|
+
1920px one. Everything here is in `--classic-rem`, one Slidev rem at Kadal's scale, worked out
|
|
7
|
+
from the slide's base size the way Slidev's body is (1.1rem), so the proportions are Slidev's
|
|
8
|
+
exactly and a deck that changes --deck-base-size scales the whole theme with it.
|
|
9
|
+
|
|
10
|
+
Headings are weight 400 unless a layout says otherwise: Slidev's reset (Uno's preflight) makes
|
|
11
|
+
every heading inherit the body weight, and the default theme never sets one back.
|
|
12
|
+
|
|
13
|
+
themeConfig: `primary` → --theme-primary (links on hover, the quote's rule, the progress
|
|
14
|
+
bar). */
|
|
15
|
+
|
|
16
|
+
.theme-classic {
|
|
17
|
+
--classic-rem: calc(var(--deck-base-size) / 1.1);
|
|
18
|
+
/* colour (Slidev's bg-main / text-main / border-main / code background) */
|
|
19
|
+
--deck-bg: #ffffff;
|
|
20
|
+
--deck-fg: #181818;
|
|
21
|
+
--deck-muted: #737373;
|
|
22
|
+
--deck-accent: var(--theme-primary, #3ab9d5);
|
|
23
|
+
--deck-accent-2: #2993a3;
|
|
24
|
+
--deck-surface: #f5f5f5;
|
|
25
|
+
--deck-border: rgba(156, 163, 175, 0.2);
|
|
26
|
+
--deck-live: var(--theme-primary, #3ab9d5);
|
|
27
|
+
/* type: config.fonts (package.json) points these at Avenir Next and Fira Code */
|
|
28
|
+
--deck-heading-font: "Avenir Next", "Nunito Sans", ui-sans-serif, system-ui, sans-serif;
|
|
29
|
+
--deck-body-font: "Avenir Next", "Nunito Sans", ui-sans-serif, system-ui, sans-serif;
|
|
30
|
+
--deck-mono-font: "Fira Code", ui-monospace, "SF Mono", Menlo, monospace;
|
|
31
|
+
--deck-serif-font: ui-serif, Georgia, Cambria, "Times New Roman", serif;
|
|
32
|
+
--deck-base-size: 34.5px;
|
|
33
|
+
/* code */
|
|
34
|
+
--deck-code-bg: #f5f5f5;
|
|
35
|
+
--deck-code-fg: #1b1b1b;
|
|
36
|
+
--deck-code-active: rgba(58, 185, 213, 0.1);
|
|
37
|
+
/* shape: Slidev's 2.5rem × 3.5rem page padding; --deck-pad is the wider of the two */
|
|
38
|
+
--deck-radius: calc(var(--classic-rem) * 0.25);
|
|
39
|
+
--deck-pad: calc(var(--classic-rem) * 3.5);
|
|
40
|
+
--deck-transition: 500ms;
|
|
41
|
+
--deck-controls-color: var(--deck-fg);
|
|
42
|
+
}
|
|
43
|
+
.theme-classic[data-color-scheme="dark"] {
|
|
44
|
+
--deck-bg: #121212;
|
|
45
|
+
--deck-fg: #dddddd;
|
|
46
|
+
--deck-muted: #8a8a8a;
|
|
47
|
+
--deck-accent-2: #54b1bf;
|
|
48
|
+
--deck-surface: #1b1b1b;
|
|
49
|
+
--deck-border: rgba(156, 163, 175, 0.2);
|
|
50
|
+
--deck-code-bg: #1b1b1b;
|
|
51
|
+
--deck-code-fg: #eeeeee;
|
|
52
|
+
--deck-code-active: rgba(58, 185, 213, 0.16);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* ── the page ─────────────────────────────────────────────────────────── */
|
|
56
|
+
.theme-classic .deck-slide {
|
|
57
|
+
padding: calc(var(--classic-rem) * 2.5) calc(var(--classic-rem) * 3.5);
|
|
58
|
+
line-height: 1.5;
|
|
59
|
+
}
|
|
60
|
+
/* A `background:` covers the padding box: undo the two paddings, not one --deck-pad. */
|
|
61
|
+
.theme-classic .deck-slide-background {
|
|
62
|
+
inset: calc(var(--classic-rem) * -2.5) calc(var(--classic-rem) * -3.5);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* ── type (Slidev's layouts-base.css and the theme's layouts.css) ─────── */
|
|
66
|
+
.theme-classic .deck-slide :is(h1, h2, h3, h4, h5, h6) {
|
|
67
|
+
font-family: var(--deck-heading-font);
|
|
68
|
+
font-weight: 400;
|
|
69
|
+
letter-spacing: normal;
|
|
70
|
+
margin: 0;
|
|
71
|
+
text-wrap: wrap;
|
|
72
|
+
}
|
|
73
|
+
.theme-classic .deck-slide h1 {
|
|
74
|
+
font-size: calc(var(--classic-rem) * 2.25);
|
|
75
|
+
line-height: calc(var(--classic-rem) * 2.5);
|
|
76
|
+
margin-bottom: var(--classic-rem);
|
|
77
|
+
margin-inline-start: -0.05em;
|
|
78
|
+
}
|
|
79
|
+
.theme-classic .deck-slide h2 {
|
|
80
|
+
font-size: calc(var(--classic-rem) * 1.875);
|
|
81
|
+
line-height: calc(var(--classic-rem) * 2.25);
|
|
82
|
+
}
|
|
83
|
+
.theme-classic .deck-slide h3 {
|
|
84
|
+
font-size: calc(var(--classic-rem) * 1.5);
|
|
85
|
+
line-height: calc(var(--classic-rem) * 2);
|
|
86
|
+
}
|
|
87
|
+
.theme-classic .deck-slide h4 {
|
|
88
|
+
font-size: calc(var(--classic-rem) * 1.25);
|
|
89
|
+
line-height: calc(var(--classic-rem) * 1.75);
|
|
90
|
+
}
|
|
91
|
+
.theme-classic .deck-slide h5 {
|
|
92
|
+
font-size: var(--classic-rem);
|
|
93
|
+
line-height: calc(var(--classic-rem) * 1.5);
|
|
94
|
+
}
|
|
95
|
+
.theme-classic .deck-slide h6 {
|
|
96
|
+
font-size: calc(var(--classic-rem) * 0.875);
|
|
97
|
+
line-height: calc(var(--classic-rem) * 1.25);
|
|
98
|
+
padding-top: calc(var(--classic-rem) * 0.25);
|
|
99
|
+
text-transform: uppercase;
|
|
100
|
+
letter-spacing: 0.1em;
|
|
101
|
+
font-weight: 500;
|
|
102
|
+
margin-inline-start: -0.05em;
|
|
103
|
+
}
|
|
104
|
+
.theme-classic .deck-slide h6:not(.opacity-100) {
|
|
105
|
+
opacity: 0.4;
|
|
106
|
+
}
|
|
107
|
+
.theme-classic .deck-slide p {
|
|
108
|
+
margin: var(--classic-rem) 0;
|
|
109
|
+
line-height: calc(var(--classic-rem) * 1.5);
|
|
110
|
+
}
|
|
111
|
+
.theme-classic .deck-slide h1 + p {
|
|
112
|
+
margin-top: calc(var(--classic-rem) * -0.5);
|
|
113
|
+
margin-bottom: var(--classic-rem);
|
|
114
|
+
opacity: 0.5;
|
|
115
|
+
}
|
|
116
|
+
.theme-classic .deck-slide :is(p, ul, table) + h2 {
|
|
117
|
+
margin-top: calc(var(--classic-rem) * 2.5);
|
|
118
|
+
}
|
|
119
|
+
.theme-classic .deck-slide :is(ul, ol) {
|
|
120
|
+
margin: 0;
|
|
121
|
+
padding: 0;
|
|
122
|
+
}
|
|
123
|
+
.theme-classic .deck-slide ul {
|
|
124
|
+
list-style: square;
|
|
125
|
+
}
|
|
126
|
+
.theme-classic .deck-slide ol {
|
|
127
|
+
list-style: decimal;
|
|
128
|
+
}
|
|
129
|
+
.theme-classic .deck-slide li {
|
|
130
|
+
margin: 0 0 0 1.1em;
|
|
131
|
+
padding-inline-start: 0.2em;
|
|
132
|
+
line-height: 1.8em;
|
|
133
|
+
}
|
|
134
|
+
.theme-classic .deck-slide blockquote {
|
|
135
|
+
margin: 0;
|
|
136
|
+
padding: calc(var(--classic-rem) * 0.25) calc(var(--classic-rem) * 0.5);
|
|
137
|
+
font-size: calc(var(--classic-rem) * 0.875);
|
|
138
|
+
line-height: calc(var(--classic-rem) * 1.25);
|
|
139
|
+
font-style: normal;
|
|
140
|
+
color: var(--deck-code-fg);
|
|
141
|
+
background: var(--deck-code-bg);
|
|
142
|
+
border: 0;
|
|
143
|
+
border-inline-start: 1px solid var(--deck-accent);
|
|
144
|
+
border-radius: calc(var(--classic-rem) * 0.25);
|
|
145
|
+
}
|
|
146
|
+
.theme-classic .deck-slide blockquote > * {
|
|
147
|
+
margin-block: 0;
|
|
148
|
+
}
|
|
149
|
+
.theme-classic .deck-slide table {
|
|
150
|
+
width: 100%;
|
|
151
|
+
font-size: 1em;
|
|
152
|
+
line-height: calc(var(--classic-rem) * 1.5);
|
|
153
|
+
}
|
|
154
|
+
.theme-classic .deck-slide :is(th, td) {
|
|
155
|
+
padding: calc(var(--classic-rem) * 0.75) calc(var(--classic-rem) * 0.5);
|
|
156
|
+
border-bottom: 1px solid var(--deck-border);
|
|
157
|
+
}
|
|
158
|
+
.theme-classic .deck-slide th {
|
|
159
|
+
text-align: left;
|
|
160
|
+
font-size: 1em;
|
|
161
|
+
font-weight: 400;
|
|
162
|
+
text-transform: none;
|
|
163
|
+
letter-spacing: normal;
|
|
164
|
+
color: inherit;
|
|
165
|
+
}
|
|
166
|
+
.theme-classic .deck-slide a {
|
|
167
|
+
color: inherit;
|
|
168
|
+
text-decoration: none;
|
|
169
|
+
border-bottom: 1px dashed currentColor;
|
|
170
|
+
}
|
|
171
|
+
.theme-classic .deck-slide a:hover {
|
|
172
|
+
color: var(--deck-accent);
|
|
173
|
+
border-bottom-style: solid;
|
|
174
|
+
}
|
|
175
|
+
.theme-classic .deck-slide :is(b, strong) {
|
|
176
|
+
font-weight: 600;
|
|
177
|
+
}
|
|
178
|
+
.theme-classic .deck-slide :not(pre) > code {
|
|
179
|
+
font-family: var(--deck-mono-font);
|
|
180
|
+
font-size: 0.9em;
|
|
181
|
+
font-weight: 300;
|
|
182
|
+
padding: calc(var(--classic-rem) * 0.125) calc(var(--classic-rem) * 0.375);
|
|
183
|
+
background: var(--deck-code-bg);
|
|
184
|
+
border-radius: calc(var(--classic-rem) * 0.25);
|
|
185
|
+
}
|
|
186
|
+
.theme-classic .deck-slide :is(kbd, .deck-kbd) {
|
|
187
|
+
font-family: var(--deck-mono-font);
|
|
188
|
+
font-size: calc(var(--classic-rem) * 0.75);
|
|
189
|
+
padding: calc(var(--classic-rem) * 0.125) calc(var(--classic-rem) * 0.25);
|
|
190
|
+
border: 1px solid var(--deck-border);
|
|
191
|
+
border-bottom-width: 2px;
|
|
192
|
+
border-radius: calc(var(--classic-rem) * 0.25);
|
|
193
|
+
background: rgba(156, 163, 175, 0.05);
|
|
194
|
+
box-shadow: none;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* ── code: Slidev's 12px / 18px blocks with a 4px corner and no border ── */
|
|
198
|
+
.theme-classic .deck-code-block {
|
|
199
|
+
margin: calc(var(--classic-rem) * 0.25) 0;
|
|
200
|
+
border: 0;
|
|
201
|
+
border-radius: calc(var(--classic-rem) * 0.25);
|
|
202
|
+
}
|
|
203
|
+
.theme-classic pre.deck-code,
|
|
204
|
+
.theme-classic .shiki-magic-move-wrap {
|
|
205
|
+
font-size: calc(var(--classic-rem) * 0.75);
|
|
206
|
+
line-height: calc(var(--classic-rem) * 1.125);
|
|
207
|
+
padding: calc(var(--classic-rem) * 0.5) 0;
|
|
208
|
+
}
|
|
209
|
+
.theme-classic .shiki-magic-move-wrap {
|
|
210
|
+
padding-inline: calc(var(--classic-rem) * 0.5);
|
|
211
|
+
}
|
|
212
|
+
.theme-classic pre.deck-code .line {
|
|
213
|
+
padding: 0 calc(var(--classic-rem) * 0.5);
|
|
214
|
+
}
|
|
215
|
+
.theme-classic pre.deck-code .line.is-dim {
|
|
216
|
+
opacity: 0.3;
|
|
217
|
+
}
|
|
218
|
+
.theme-classic .deck-code-title {
|
|
219
|
+
font-size: calc(var(--classic-rem) * 0.75);
|
|
220
|
+
padding: calc(var(--classic-rem) * 0.5);
|
|
221
|
+
border-bottom-color: var(--deck-border);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* ── the layouts ──────────────────────────────────────────────────────── */
|
|
225
|
+
.theme-classic .deck-layout-default {
|
|
226
|
+
justify-content: flex-start;
|
|
227
|
+
}
|
|
228
|
+
/* Slidev's center does not centre the text by itself (its examples add `text-center`); Kadal's
|
|
229
|
+
does, which reads the same for a title and better for a line or two. */
|
|
230
|
+
.theme-classic .deck-layout-center {
|
|
231
|
+
justify-content: center;
|
|
232
|
+
}
|
|
233
|
+
.theme-classic :is(.deck-layout-cover, .deck-layout-intro) {
|
|
234
|
+
align-items: stretch;
|
|
235
|
+
text-align: start;
|
|
236
|
+
}
|
|
237
|
+
.theme-classic :is(.deck-layout-cover, .deck-layout-intro) h1 {
|
|
238
|
+
font-size: calc(var(--classic-rem) * 3.75);
|
|
239
|
+
line-height: calc(var(--classic-rem) * 5);
|
|
240
|
+
}
|
|
241
|
+
/* cover with a background image: Slidev's dim (#0005 → #0008) and white words */
|
|
242
|
+
.theme-classic .deck-layout-cover.classic-on-image {
|
|
243
|
+
color: #fff;
|
|
244
|
+
}
|
|
245
|
+
.theme-classic .classic-dim {
|
|
246
|
+
position: absolute;
|
|
247
|
+
inset: calc(var(--classic-rem) * -2.5) calc(var(--classic-rem) * -3.5);
|
|
248
|
+
background: linear-gradient(rgba(0, 0, 0, 0.333), rgba(0, 0, 0, 0.533));
|
|
249
|
+
pointer-events: none;
|
|
250
|
+
}
|
|
251
|
+
/* The dim sits under the words without lifting each one (`position: relative` on every child
|
|
252
|
+
would pin a deck's own `absolute` corners, Slidev's `abs-br`, back into the flow). */
|
|
253
|
+
.theme-classic .deck-layout-cover.classic-on-image {
|
|
254
|
+
isolation: isolate;
|
|
255
|
+
}
|
|
256
|
+
.theme-classic .classic-on-image > .classic-dim {
|
|
257
|
+
z-index: -1;
|
|
258
|
+
}
|
|
259
|
+
.theme-classic .deck-layout-section {
|
|
260
|
+
align-items: stretch;
|
|
261
|
+
text-align: center;
|
|
262
|
+
}
|
|
263
|
+
.theme-classic .deck-layout-section h1 {
|
|
264
|
+
font-size: calc(var(--classic-rem) * 3.75);
|
|
265
|
+
line-height: calc(var(--classic-rem) * 5);
|
|
266
|
+
font-weight: 500;
|
|
267
|
+
}
|
|
268
|
+
.theme-classic .deck-layout-statement {
|
|
269
|
+
text-align: center;
|
|
270
|
+
}
|
|
271
|
+
.theme-classic .deck-layout-statement h1 {
|
|
272
|
+
font-size: calc(var(--classic-rem) * 3.75);
|
|
273
|
+
line-height: 1;
|
|
274
|
+
font-weight: 700;
|
|
275
|
+
}
|
|
276
|
+
.theme-classic .deck-layout-fact {
|
|
277
|
+
text-align: center;
|
|
278
|
+
}
|
|
279
|
+
.theme-classic .deck-layout-fact > :is(h1, h2, p, .deck-counter) {
|
|
280
|
+
letter-spacing: normal;
|
|
281
|
+
}
|
|
282
|
+
.theme-classic .deck-layout-fact h1 {
|
|
283
|
+
font-size: calc(var(--classic-rem) * 6);
|
|
284
|
+
line-height: 1;
|
|
285
|
+
font-weight: 700;
|
|
286
|
+
}
|
|
287
|
+
.theme-classic .deck-layout-fact h1 + p {
|
|
288
|
+
font-size: calc(var(--classic-rem) * 1.5);
|
|
289
|
+
line-height: calc(var(--classic-rem) * 2);
|
|
290
|
+
font-weight: 700;
|
|
291
|
+
}
|
|
292
|
+
.theme-classic .deck-layout-quote {
|
|
293
|
+
padding-inline: 0;
|
|
294
|
+
font-size: 1em;
|
|
295
|
+
font-style: normal;
|
|
296
|
+
align-items: stretch;
|
|
297
|
+
}
|
|
298
|
+
.theme-classic .deck-layout-quote h1 + p {
|
|
299
|
+
margin-top: calc(var(--classic-rem) * 0.5);
|
|
300
|
+
}
|
|
301
|
+
/* Slidev's built-in end: white letters, spaced, on black, "END" when the slide is empty */
|
|
302
|
+
.theme-classic .deck-slide.layout-end {
|
|
303
|
+
background: #000;
|
|
304
|
+
}
|
|
305
|
+
.theme-classic .deck-layout-end {
|
|
306
|
+
color: rgba(255, 255, 255, 0.85);
|
|
307
|
+
font-size: calc(var(--classic-rem) * 1.25);
|
|
308
|
+
letter-spacing: 0.1em;
|
|
309
|
+
user-select: none;
|
|
310
|
+
}
|
|
311
|
+
.theme-classic .deck-layout-end:empty::before {
|
|
312
|
+
content: "END";
|
|
313
|
+
}
|
|
314
|
+
.theme-classic .deck-layout-full {
|
|
315
|
+
padding: 0;
|
|
316
|
+
}
|
|
317
|
+
.theme-classic .deck-layout-two-cols {
|
|
318
|
+
column-gap: var(--classic-rem);
|
|
319
|
+
}
|
|
320
|
+
.theme-classic .deck-layout-two-cols-header {
|
|
321
|
+
column-gap: var(--classic-rem);
|
|
322
|
+
}
|
|
323
|
+
/* image-left / image-right / image: the picture flush to the edge, the words on Slidev's page
|
|
324
|
+
padding from the top (a .slidev-layout default beside the picture), not centred */
|
|
325
|
+
.theme-classic :is(.deck-layout-image-left, .deck-layout-image-right) .deck-layout-image-content,
|
|
326
|
+
.theme-classic :is(.deck-layout-iframe-left, .deck-layout-iframe-right) .deck-layout-iframe-content {
|
|
327
|
+
justify-content: flex-start;
|
|
328
|
+
padding: calc(var(--classic-rem) * 2.5) calc(var(--classic-rem) * 3.5);
|
|
329
|
+
}
|
|
330
|
+
.theme-classic .deck-layout-image .deck-layout-image-content {
|
|
331
|
+
inset: 0;
|
|
332
|
+
justify-content: flex-start;
|
|
333
|
+
padding: calc(var(--classic-rem) * 2.5) calc(var(--classic-rem) * 3.5);
|
|
334
|
+
background: none;
|
|
335
|
+
}
|
|
336
|
+
.theme-classic .deck-layout-image .deck-layout-image-content:empty {
|
|
337
|
+
display: none;
|
|
338
|
+
}
|
|
339
|
+
.theme-classic :is(.deck-layout-iframe, .deck-layout-iframe-left, .deck-layout-iframe-right) {
|
|
340
|
+
padding: 0;
|
|
341
|
+
gap: 0;
|
|
342
|
+
}
|
|
343
|
+
.theme-classic .deck-frame.deck-layout-iframe-pane {
|
|
344
|
+
border: 0;
|
|
345
|
+
border-radius: 0;
|
|
346
|
+
box-shadow: none;
|
|
347
|
+
}
|
|
348
|
+
.theme-classic .deck-layout-two-cols-header > .deck-slot-bottom {
|
|
349
|
+
align-self: end;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/* ── chrome ───────────────────────────────────────────────────────────── */
|
|
353
|
+
.theme-classic .deck-progress span {
|
|
354
|
+
background: var(--deck-accent);
|
|
355
|
+
}
|