@kadal/theme-neon 0.0.0-stage → 0.4.0
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 +661 -0
- package/README.md +64 -2
- package/index.tsx +57 -0
- package/package.json +102 -4
- package/style.css +718 -0
package/README.md
CHANGED
|
@@ -1,3 +1,65 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @kadal/theme-neon
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Neon**, a theme for [Kadal Deck](https://deck.kadal.cc). A dark synthwave theme for meetups and launches. Midnight violet, a striped sunset sun over a grid that runs to the horizon, Orbitron for display, Space Grotesk for text, the Synthwave '84 code colours. The glows stay legible: the letters keep near white and only the halo takes the colour. Every glow, blur and animation is dropped on a still copy (the print view, an export, an overview tile), so a PDF gets solid colour and clean edges rather than grey halos. Dark only.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Use it
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @kadal/theme-neon
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
---
|
|
15
|
+
theme: neon
|
|
16
|
+
themeConfig: # all optional
|
|
17
|
+
primary: "#ff3ec8"
|
|
18
|
+
secondary: "#2de2e6"
|
|
19
|
+
grid: true
|
|
20
|
+
---
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The deck plugin brings the stylesheet and the module in; nothing to import. The prebuilt shell (the hosted builder, published decks) bundles this theme already. Schemes: dark only. Fonts: Orbitron (headings), Space Grotesk (text), JetBrains Mono (code), loaded through the theme's `config.fonts`. Code colours: Shiki's synthwave-84 (both). To show it beside other themes in the theme menu (<kbd>T</kbd>), list it: `themes: [neon, minimal]`.
|
|
24
|
+
|
|
25
|
+
## themeConfig
|
|
26
|
+
|
|
27
|
+
Every key arrives on the deck root as a CSS variable (`accentDark` → `--theme-accent-dark`); the theme reads them with fallbacks, so set only what you change.
|
|
28
|
+
|
|
29
|
+
| key | type | default | what it does |
|
|
30
|
+
| --- | --- | --- | --- |
|
|
31
|
+
| `primary` | colour | `#ff3ec8` | Magenta: headings' glow, the accent. |
|
|
32
|
+
| `secondary` | colour | `#2de2e6` | Cyan: bullets, links, labels. |
|
|
33
|
+
| `grid` | boolean | `true` | `false` hides the floor grid on covers and the theme's layouts. |
|
|
34
|
+
|
|
35
|
+
## Layouts
|
|
36
|
+
|
|
37
|
+
Every built-in layout is styled (`default`, `center`, `cover`, `intro`, `section`, `end`, `fact`, `quote`, `statement`, `full`, `two-cols`, `two-cols-header`, `image`, `image-left`, `image-right`, `iframe`, `iframe-left`, `iframe-right`), and the theme adds:
|
|
38
|
+
|
|
39
|
+
| layout | what |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `launch` | The title over the striped sun with the grid running to the horizon, and a pulsing chip above it (`chip: "Live · 24 Oct"`, or `date:`). |
|
|
42
|
+
| `horizon` | An ordinary content slide with the grid along its foot. |
|
|
43
|
+
|
|
44
|
+
## Components
|
|
45
|
+
|
|
46
|
+
| component | what |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| `<Glow tone>` | A word or phrase in neon: `tone` pink (default) · cyan · amber. |
|
|
49
|
+
|
|
50
|
+
## Preview
|
|
51
|
+
|
|
52
|
+
`preview/deck.mdx` walks through every layout and component (`theme: ../`). In this repository:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
bun run --filter @kadal/theme-neon dev # the preview deck, live
|
|
56
|
+
node tools/theme-shots.mjs neon # screenshots in light and dark, contrast and overflow checks
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Accessibility and print
|
|
60
|
+
|
|
61
|
+
Body and muted text meet WCAG AA (4.5:1) on the page and on cards in every scheme the theme draws (checked by `tools/theme-shots.mjs`). Anything that moves stands still under `prefers-reduced-motion` and on a still copy; printed pages and exports drop shadows and glows.
|
|
62
|
+
|
|
63
|
+
## Licence
|
|
64
|
+
|
|
65
|
+
AGPL-3.0-or-later, like the engine (see LICENSE); a commercial licence is available — see [LICENSING](https://github.com/kadalcc/deck/blob/main/LICENSING.md).
|
package/index.tsx
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
import type { LayoutProps } from "@kadal/deck";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
7
|
+
* Neon's module: two layouts for the big moment, and a word in neon.
|
|
8
|
+
*
|
|
9
|
+
* layout: launch the title over the striped sun with the grid running to the horizon, and
|
|
10
|
+
* a pulsing chip above it (`chip: "Live · 24 Oct"`, or `date:`)
|
|
11
|
+
* layout: horizon an ordinary content slide with the grid along its foot
|
|
12
|
+
* <Glow tone> a word or phrase in neon: tone pink (default) · cyan · amber
|
|
13
|
+
*
|
|
14
|
+
* The sun and the floor are decoration (aria-hidden), stilled under prefers-reduced-motion and
|
|
15
|
+
* on every still copy; `themeConfig.grid: false` hides the floor. They carry `deck-absolute`, the
|
|
16
|
+
* engine's mark for what is placed rather than flowed, so the auto-fit does not count the floor
|
|
17
|
+
* that hangs past the layout's foot as overflow and shrink the slide.
|
|
18
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const str = (v: unknown) => (typeof v === "string" && v.trim() ? v.trim() : null);
|
|
22
|
+
|
|
23
|
+
function Launch({ children, frontmatter }: LayoutProps) {
|
|
24
|
+
const chip = str(frontmatter.chip) ?? str(frontmatter.date);
|
|
25
|
+
return (
|
|
26
|
+
<div className="deck-layout deck-layout-launch">
|
|
27
|
+
<div className="neon-sun deck-absolute" aria-hidden="true" />
|
|
28
|
+
<div className="neon-floor deck-absolute" aria-hidden="true" />
|
|
29
|
+
{chip ? <span className="neon-chip">{chip}</span> : null}
|
|
30
|
+
{children}
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function Horizon({ children }: LayoutProps) {
|
|
36
|
+
return (
|
|
37
|
+
<div className="deck-layout deck-layout-horizon">
|
|
38
|
+
<div className="neon-floor deck-absolute" aria-hidden="true" />
|
|
39
|
+
{children}
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function Glow({
|
|
45
|
+
tone = "pink",
|
|
46
|
+
children,
|
|
47
|
+
}: {
|
|
48
|
+
tone?: "pink" | "cyan" | "amber";
|
|
49
|
+
children?: ReactNode;
|
|
50
|
+
}) {
|
|
51
|
+
return <span className={`neon-glow tone-${tone}`}>{children}</span>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default {
|
|
55
|
+
layouts: { launch: Launch, horizon: Horizon },
|
|
56
|
+
components: { Glow },
|
|
57
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,104 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kadal/theme-neon",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Neon, a theme for Kadal Deck (@kadal/deck). A dark synthwave theme for meetups and launches: a sunset horizon, glows that stay legible, and a solid print fallback.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"kadal-theme",
|
|
7
|
+
"kadal-deck",
|
|
8
|
+
"presentation",
|
|
9
|
+
"slides",
|
|
10
|
+
"theme",
|
|
11
|
+
"synthwave",
|
|
12
|
+
"neon",
|
|
13
|
+
"dark",
|
|
14
|
+
"launch"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://deck.kadal.cc/docs/",
|
|
17
|
+
"funding": {
|
|
18
|
+
"type": "github",
|
|
19
|
+
"url": "https://github.com/sponsors/pmithunish"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/kadalcc/deck.git",
|
|
24
|
+
"directory": "packages/theme-neon"
|
|
25
|
+
},
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/kadalcc/deck/issues"
|
|
28
|
+
},
|
|
29
|
+
"license": "AGPL-3.0-or-later",
|
|
30
|
+
"author": "Mithunish Prabhakaran <pmithunish@gmail.com>",
|
|
31
|
+
"type": "module",
|
|
32
|
+
"sideEffects": [
|
|
33
|
+
"*.css"
|
|
34
|
+
],
|
|
35
|
+
"files": [
|
|
36
|
+
"style.css",
|
|
37
|
+
"index.tsx",
|
|
38
|
+
"README.md",
|
|
39
|
+
"LICENSE"
|
|
40
|
+
],
|
|
41
|
+
"exports": {
|
|
42
|
+
".": "./index.tsx",
|
|
43
|
+
"./style.css": "./style.css",
|
|
44
|
+
"./package.json": "./package.json"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public",
|
|
48
|
+
"provenance": true
|
|
49
|
+
},
|
|
50
|
+
"kadal": {
|
|
51
|
+
"theme": {
|
|
52
|
+
"name": "neon",
|
|
53
|
+
"title": "Neon",
|
|
54
|
+
"description": "A dark synthwave theme for meetups and launches: a sunset horizon, glows that stay legible, and a solid print fallback.",
|
|
55
|
+
"colorScheme": "dark",
|
|
56
|
+
"config": {
|
|
57
|
+
"transition": "fade",
|
|
58
|
+
"fonts": {
|
|
59
|
+
"heading": "Orbitron",
|
|
60
|
+
"sans": "Space Grotesk",
|
|
61
|
+
"mono": "JetBrains Mono",
|
|
62
|
+
"weights": "400,500,700"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"themeConfig": {
|
|
66
|
+
"primary": "#ff3ec8",
|
|
67
|
+
"secondary": "#2de2e6",
|
|
68
|
+
"grid": true
|
|
69
|
+
},
|
|
70
|
+
"shiki": {
|
|
71
|
+
"light": "synthwave-84",
|
|
72
|
+
"dark": "synthwave-84"
|
|
73
|
+
},
|
|
74
|
+
"defaults": {},
|
|
75
|
+
"layouts": [
|
|
76
|
+
"launch",
|
|
77
|
+
"horizon"
|
|
78
|
+
],
|
|
79
|
+
"components": [
|
|
80
|
+
"Glow"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"scripts": {
|
|
85
|
+
"dev": "kadal-deck dev -C preview",
|
|
86
|
+
"check": "kadal-deck check -C preview",
|
|
87
|
+
"typecheck": "tsc --noEmit",
|
|
88
|
+
"test": "bun test"
|
|
89
|
+
},
|
|
90
|
+
"peerDependencies": {
|
|
91
|
+
"@kadal/deck": "^0.4.0",
|
|
92
|
+
"react": "^19.2.0"
|
|
93
|
+
},
|
|
94
|
+
"devDependencies": {
|
|
95
|
+
"@kadal/deck": "workspace:*",
|
|
96
|
+
"@types/react": "^19.2.0",
|
|
97
|
+
"@types/react-dom": "^19.2.0",
|
|
98
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
99
|
+
"react": "^19.2.7",
|
|
100
|
+
"react-dom": "^19.2.7",
|
|
101
|
+
"typescript": "^6.0.3",
|
|
102
|
+
"vite": "^8.0.16"
|
|
103
|
+
}
|
|
104
|
+
}
|