Skip to content

Commit

Permalink
docs: update theme info
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed May 10, 2021
1 parent 06702a6 commit 24c2211
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 18 deletions.
18 changes: 17 additions & 1 deletion demo/composable-vue/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/svg" href="https://antfu.me/favicon.svg" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="https://raw.githubusercontent.com/slidevjs/slidev/main/assets/favicon.png">

<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&family=Nunito+Sans:wght@200;400;600&display=swap" rel="stylesheet">
<link rel="icon" type="image/svg" href="https://antfu.me/favicon.svg" />
</head>
<body>
<div id="app"></div>
<script type="module" src="/@fs/Users/antfu/i/slidev/packages/client/main.ts"></script>



</body>
</html>
15 changes: 8 additions & 7 deletions docs/.vitepress/theme/components/demo/Demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import { ref, onMounted, watch } from 'vue'
import TypeIt from 'typeit'
import Markdown from 'markdown-it'
import type { SlidevMarkdown } from '@slidev/types'
import { parse } from '../../../../../packages/parser/src/core'
import Default from '../../../../../packages/client/layouts/default.vue'
import Center from '../../../../../packages/client/layouts/center.vue'
import SlideContainer from '../../../../../packages/client/internals/SlideContainer.vue'
import Cover from '../../../../../packages/theme-default/layouts/cover.vue'
import '../../../../../packages/client/styles/layouts-base.css'
import '../../../../../packages/theme-default/styles/layouts.css'
// @ts-ignore
import Cover from '@slidev/theme-default/layouts/cover.vue'
import { parse } from '@slidev/parser'
import Default from '@slidev/client/layouts/default.vue'
import Center from '@slidev/client/layouts/center.vue'
import SlideContainer from '@slidev/client/internals/SlideContainer.vue'
import '@slidev/client/styles/layouts-base.css'
import '@slidev/theme-default/styles/layouts.css'
const page = ref(0)
const paused = ref(false)
Expand Down
14 changes: 7 additions & 7 deletions docs/.vitepress/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const official: ThemeInfo[] = [
name: 'Anthony Fu',
link: 'https://github.com/antfu',
},
repo: 'https://github.com/slidevjs/slidev/tree/main/packages/theme-default',
repo: 'https://github.com/slidevjs/themes/tree/main/packages/theme-default',
previews: [
'/themes/default.png',
'/themes/default-1.png',
Expand All @@ -49,7 +49,7 @@ export const official: ThemeInfo[] = [
name: 'Anthony Fu',
link: 'https://github.com/antfu',
},
repo: 'https://github.com/slidevjs/slidev/tree/main/packages/theme-seriph',
repo: 'https://github.com/slidevjs/themes/tree/main/packages/theme-seriph',
previews: [
'/themes/seriph.png',
],
Expand All @@ -60,18 +60,15 @@ export const official: ThemeInfo[] = [
'light',
],
},
]

export const community: ThemeInfo[] = [
{
id: 'slidev-theme-apple-basic',
id: '@slidev/theme-apple-basic',
name: 'Apple Basic',
description: 'Inspired by the Basic Black/White theme from Apple Keynote',
author: {
name: 'Jeremy Meissner',
link: 'https://github.com/JeremyMeissner',
},
repo: 'https://github.com/JeremyMeissner/slidev-theme-apple-basic',
repo: 'https://github.com/slidevjs/themes/tree/main/packages/theme-apple-basic',
previews: [
'https://i.imgur.com/976e8Hu.png',
'https://i.imgur.com/dE1r2bg.png',
Expand All @@ -83,6 +80,9 @@ export const community: ThemeInfo[] = [
'light',
],
},
]

export const community: ThemeInfo[] = [
// Add yours here!
{
id: '',
Expand Down
6 changes: 6 additions & 0 deletions docs/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import Components from 'vite-plugin-components'
import WindiCSS from 'vite-plugin-windicss'

const config: UserConfig = {
resolve: {
alias: {
'@slidev/client': resolve(__dirname, '../packages/client'),
'@slidev/parser': resolve(__dirname, '../packages/parser'),
},
},
optimizeDeps: {
exclude: [
'vue-demi',
Expand Down
7 changes: 4 additions & 3 deletions packages/slidev/node/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { parseNi, run } from '@antfu/ni'
import { isRelative } from './options'

const officialThemes: Record<string, string> = {
none: '',
default: '@slidev/theme-default',
seriph: '@slidev/theme-seriph',
'none': '',
'default': '@slidev/theme-default',
'seriph': '@slidev/theme-seriph',
'apple-basic': '@slidev/theme-apple-basic',
}

export function packageExists(name: string) {
Expand Down

0 comments on commit 24c2211

Please sign in to comment.