Skip to content

Commit

Permalink
fix: update create-slidev-theme
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jun 4, 2021
1 parent d16c7dd commit c0041e4
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 23 deletions.
13 changes: 8 additions & 5 deletions packages/create-theme/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
A (...) theme for [Slidev](https://github.com/slidevjs/slidev).

<!--
run `npm run dev` to check out the slides for more details of how to start writing a theme
-->
Learn more about how to write a theme:
https://sli.dev/themes/write-a-theme.html
--->

<!--
put some screenshots here to demonstrate your theme,
run `npm run dev` to check out the slides for more details of how to start writing a theme
-->

<!--
Live demo: [...]
<!--
Put some screenshots here to demonstrate your theme
Live demo: [...]
-->

## Install
Expand Down
4 changes: 2 additions & 2 deletions packages/create-theme/template/example.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
theme: none
theme: ./
---

# Slidev Theme Starter
Expand All @@ -17,7 +17,7 @@ Presentation slides for developers
# What is Slidev?

Slidev is a slides maker and presenter designed for developers, consist of the following features

- 📝 **Text-based** - focus on the content with Markdown, and then style them later
- 🎨 **Themable** - theme can be shared and used with npm packages
- 🧑‍💻 **Developer Friendly** - code highlighting, live coding with autocompletion
Expand Down
4 changes: 0 additions & 4 deletions packages/create-theme/template/index.html

This file was deleted.

16 changes: 14 additions & 2 deletions packages/create-theme/template/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
{
"engines": {
"node": ">=14.0.0",
"slidev": ">=0.19.3"
},
"keywords": [
"slidev-theme",
"slidev"
],
"//": "Learn more: https://sli.dev/themes/write-a-theme.html",
"slidev": {
"colorSchema": "both",
"highlighter": "all"
"highlighter": "all",
"defaults": {
"fonts": {
"sans": "Nunito Sans",
"mono": "Fira Code"
},
"hightlighter": "prism"
}
},
"scripts": {
"dev": "slidev example.md --open",
Expand All @@ -20,6 +32,6 @@
"theme-vitesse": "^0.1.11"
},
"devDependencies": {
"@slidev/cli": "*"
"@slidev/cli": "^0.19.3"
}
}
9 changes: 0 additions & 9 deletions packages/create-theme/template/setup/windicss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,4 @@ export default defineWindiSetup(() => ({
// custom the default background
'bg-main': 'bg-white text-[#181818] dark:(bg-[#121212] text-[#ddd])',
},
theme: {
extend: {
// fonts can be replaced here, remember to update the web font links in `index.html`
fontFamily: {
sans: '"Nunito Sans", ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',
mono: '"Fira Code", monospace',
},
},
},
}))
14 changes: 13 additions & 1 deletion packages/create-theme/template/styles/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
}

h1 + p {
@apply opacity-40 -mt-4 text-2xl;
@apply -mt-2 opacity-50 mb-4;
}

p + h2, ul + h2, table + h2 {
@apply mt-10;
}

h3 {
@apply text-sm pt-2 uppercase tracking-widest font-500 -ml-[0.05em];
}

h3:not(.opacity-100) {
@apply opacity-40;
}
}

0 comments on commit c0041e4

Please sign in to comment.