@zlict/slidev-theme-zli 0.0.9
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/CHANGELOG.md +25 -0
- package/README.md +46 -0
- package/components/.gitkeep +0 -0
- package/layouts/cover.vue +7 -0
- package/layouts/intro.vue +7 -0
- package/package.json +54 -0
- package/setup/shiki.ts +10 -0
- package/setup/windicss.ts +14 -0
- package/styles/code.css +76 -0
- package/styles/index.ts +4 -0
- package/styles/layout.css +22 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
### [0.0.9](https://github.com/zlict/slidev-theme/compare/v0.0.8...v0.0.9) (2022-05-23)
|
|
6
|
+
|
|
7
|
+
### [0.0.8](https://github.com/zlict/slidev-theme/compare/v0.0.7...v0.0.8) (2022-05-23)
|
|
8
|
+
|
|
9
|
+
### [0.0.7](https://github.com/zlict/slidev-theme/compare/v0.0.6...v0.0.7) (2022-05-23)
|
|
10
|
+
|
|
11
|
+
### [0.0.6](https://github.com/zlict/slidev-theme/compare/v0.0.5...v0.0.6) (2022-05-23)
|
|
12
|
+
|
|
13
|
+
### [0.0.5](https://github.com/zlict/slidev-theme/compare/v0.0.4...v0.0.5) (2022-05-23)
|
|
14
|
+
|
|
15
|
+
### [0.0.4](https://github.com/zlict/slidev-theme/compare/v0.0.3...v0.0.4) (2022-05-23)
|
|
16
|
+
|
|
17
|
+
### [0.0.3](https://github.com/zlict/slidev-theme/compare/v0.0.2...v0.0.3) (2022-05-23)
|
|
18
|
+
|
|
19
|
+
### 0.0.2 (2022-05-23)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### 🚀 Features
|
|
23
|
+
|
|
24
|
+
* add version management ([f139e3d](https://github.com/zlict/slidev-theme/commit/f139e3d35ca360f5afc18b2632cc40c6935cc603))
|
|
25
|
+
* generate zli theme ([82e0bfb](https://github.com/zlict/slidev-theme/commit/82e0bfb25507ec6d924da2d4ec9c4fa8f8d4934e))
|
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# slidev-theme-zli
|
|
2
|
+
|
|
3
|
+
<!--
|
|
4
|
+
Learn more about how to write a theme:
|
|
5
|
+
https://sli.dev/themes/write-a-theme.html
|
|
6
|
+
--->
|
|
7
|
+
|
|
8
|
+
<!--
|
|
9
|
+
run `npm run dev` to check out the slides for more details of how to start writing a theme
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<!--
|
|
13
|
+
Put some screenshots here to demonstrate your theme
|
|
14
|
+
|
|
15
|
+
Live demo: [...]
|
|
16
|
+
-->
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
Add the following frontmatter to your `slides.md`. Start Slidev then it will prompt you to install the theme automatically.
|
|
21
|
+
|
|
22
|
+
<pre><code>---
|
|
23
|
+
theme: <b>zli-theme</b>
|
|
24
|
+
---</code></pre>
|
|
25
|
+
|
|
26
|
+
Learn more about [how to use a theme](https://sli.dev/themes/use).
|
|
27
|
+
|
|
28
|
+
## Layouts
|
|
29
|
+
|
|
30
|
+
This theme provides the following layouts:
|
|
31
|
+
|
|
32
|
+
> TODO:
|
|
33
|
+
|
|
34
|
+
## Components
|
|
35
|
+
|
|
36
|
+
This theme provides the following components:
|
|
37
|
+
|
|
38
|
+
> TODO:
|
|
39
|
+
|
|
40
|
+
## Contributing
|
|
41
|
+
|
|
42
|
+
- `npm install`
|
|
43
|
+
- `npm run dev` to start theme preview of `example.md`
|
|
44
|
+
- Edit the `example.md` and style to see the changes
|
|
45
|
+
- `npm run export` to generate the preview PDF
|
|
46
|
+
- `npm run screenshot` to generate the preview PNG
|
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zlict/slidev-theme-zli",
|
|
3
|
+
"version": "0.0.9",
|
|
4
|
+
"description": "ZLI Slidev theme",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"slidev-theme",
|
|
7
|
+
"slidev"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/zlict/slidev-theme",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/zlict/slidev-theme"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/zlict/slidev-theme/issues"
|
|
16
|
+
},
|
|
17
|
+
"author": "openscript GmbH <hi+npm@openscript.ch>",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "slidev build example.md",
|
|
20
|
+
"dev": "slidev example.md --open",
|
|
21
|
+
"export": "slidev export example.md",
|
|
22
|
+
"screenshot": "slidev export example.md --format png",
|
|
23
|
+
"release:major": "standard-version --release-as major && git push --follow-tags",
|
|
24
|
+
"release:minor": "standard-version --release-as minor && git push --follow-tags",
|
|
25
|
+
"release:patch": "standard-version --release-as patch && git push --follow-tags",
|
|
26
|
+
"release:create-github-release": "conventional-github-releaser -p angular"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@slidev/types": "^0.31.4",
|
|
30
|
+
"codemirror-theme-vars": "^0.1.1",
|
|
31
|
+
"prism-theme-vars": "^0.2.2",
|
|
32
|
+
"theme-vitesse": "^0.4.10"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@slidev/cli": "^0.31.4",
|
|
36
|
+
"conventional-github-releaser": "^3.1.5",
|
|
37
|
+
"standard-version": "^9.5.0"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=14.0.0",
|
|
41
|
+
"slidev": ">=0.19.3"
|
|
42
|
+
},
|
|
43
|
+
"slidev": {
|
|
44
|
+
"colorSchema": "both",
|
|
45
|
+
"highlighter": "all",
|
|
46
|
+
"defaults": {
|
|
47
|
+
"fonts": {
|
|
48
|
+
"sans": "Nunito Sans",
|
|
49
|
+
"mono": "Fira Code"
|
|
50
|
+
},
|
|
51
|
+
"hightlighter": "prism"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
package/setup/shiki.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { defineShikiSetup } from '@slidev/types'
|
|
2
|
+
|
|
3
|
+
export default defineShikiSetup(async ({ loadTheme }) => {
|
|
4
|
+
return {
|
|
5
|
+
theme: {
|
|
6
|
+
dark: await loadTheme(require.resolve('theme-vitesse/themes/vitesse-dark.json')),
|
|
7
|
+
light: await loadTheme(require.resolve('theme-vitesse/themes/vitesse-light.json')),
|
|
8
|
+
},
|
|
9
|
+
}
|
|
10
|
+
})
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { resolve } from 'path'
|
|
2
|
+
import { defineWindiSetup } from '@slidev/types'
|
|
3
|
+
|
|
4
|
+
export default defineWindiSetup(() => ({
|
|
5
|
+
extract: {
|
|
6
|
+
include: [
|
|
7
|
+
resolve(__dirname, '../**/*.{vue,ts}'),
|
|
8
|
+
],
|
|
9
|
+
},
|
|
10
|
+
shortcuts: {
|
|
11
|
+
// custom the default background
|
|
12
|
+
'bg-main': 'bg-white text-[#181818] dark:(bg-[#121212] text-[#ddd])',
|
|
13
|
+
},
|
|
14
|
+
}))
|
package/styles/code.css
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
@import 'prism-theme-vars/base.css';
|
|
2
|
+
@import 'codemirror-theme-vars/base.css';
|
|
3
|
+
@import 'prism-theme-vars/to-codemirror.css';
|
|
4
|
+
|
|
5
|
+
:root {
|
|
6
|
+
--prism-font-family: var(--slidev-code-font-family);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
html:not(.dark) {
|
|
10
|
+
--prism-foreground: #393a34;
|
|
11
|
+
--prism-background: #f8f8f8;
|
|
12
|
+
--prism-comment: #a0ada0;
|
|
13
|
+
--prism-string: #b56959;
|
|
14
|
+
--prism-literal: #2f8a89;
|
|
15
|
+
--prism-number: #296aa3;
|
|
16
|
+
--prism-keyword: #1c6b48;
|
|
17
|
+
--prism-function: #6c7834;
|
|
18
|
+
--prism-boolean: #1c6b48;
|
|
19
|
+
--prism-constant: #a65e2b;
|
|
20
|
+
--prism-deleted: #a14f55;
|
|
21
|
+
--prism-class: #2993a3;
|
|
22
|
+
--prism-builtin: #ab5959;
|
|
23
|
+
--prism-property: #b58451;
|
|
24
|
+
--prism-namespace: #b05a78;
|
|
25
|
+
--prism-punctuation: #8e8f8b;
|
|
26
|
+
--prism-decorator: #bd8f8f;
|
|
27
|
+
--prism-regex: #ab5e3f;
|
|
28
|
+
--prism-json-property: #698c96;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
html.dark {
|
|
32
|
+
--prism-foreground: #d4cfbf;
|
|
33
|
+
--prism-background: #1b1b1b;
|
|
34
|
+
--prism-comment: #758575;
|
|
35
|
+
--prism-string: #d48372;
|
|
36
|
+
--prism-literal: #429988;
|
|
37
|
+
--prism-keyword: #4d9375;
|
|
38
|
+
--prism-boolean: #1c6b48;
|
|
39
|
+
--prism-number: #6394bf;
|
|
40
|
+
--prism-variable: #c2b36e;
|
|
41
|
+
--prism-function: #a1b567;
|
|
42
|
+
--prism-deleted: #a14f55;
|
|
43
|
+
--prism-class: #54b1bf;
|
|
44
|
+
--prism-builtin: #e0a569;
|
|
45
|
+
--prism-property: #dd8e6e;
|
|
46
|
+
--prism-namespace: #db889a;
|
|
47
|
+
--prism-punctuation: #858585;
|
|
48
|
+
--prism-decorator: #bd8f8f;
|
|
49
|
+
--prism-regex: #ab5e3f;
|
|
50
|
+
--prism-json-property: #6b8b9e;
|
|
51
|
+
--prism-line-number: #888888;
|
|
52
|
+
--prism-line-number-gutter: #eeeeee;
|
|
53
|
+
--prism-line-highlight-background: #444444;
|
|
54
|
+
--prism-selection-background: #444444;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
pre[class*='language-'] {
|
|
58
|
+
@apply p-2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:not(pre) > code {
|
|
62
|
+
font-size: 0.9em;
|
|
63
|
+
background: var(--prism-background);
|
|
64
|
+
@apply font-light py-0.5 rounded;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:not(pre) > code:before,
|
|
69
|
+
:not(pre) > code:after {
|
|
70
|
+
content: '`';
|
|
71
|
+
opacity: 0.50;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:not(pre) > code:before {
|
|
75
|
+
margin-right: -0.08em;
|
|
76
|
+
}
|
package/styles/index.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
// default theme color
|
|
3
|
+
// can be overrided by uses `themeConfig` option
|
|
4
|
+
--slidev-theme-primary: #5d8392;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.slidev-layout.cover,
|
|
8
|
+
.slidev-layout.intro {
|
|
9
|
+
@apply h-full grid;
|
|
10
|
+
|
|
11
|
+
h1 {
|
|
12
|
+
@apply text-6xl leading-20;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
h1 + p {
|
|
16
|
+
@apply -mt-2 opacity-50 mb-4;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
p + h2, ul + h2, table + h2 {
|
|
20
|
+
@apply mt-10;
|
|
21
|
+
}
|
|
22
|
+
}
|