From 5f2ab685573b2df0317af38871f50546141b4619 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 3 Feb 2026 14:26:12 +0800 Subject: Migrate docs to VitePress --- doc/docs/.vitepress/config.mts | 62 +++++ .../image/favicon/android-chrome-192x192.png | Bin 0 -> 13954 bytes .../image/favicon/android-chrome-512x512.png | Bin 0 -> 35977 bytes .../public/image/favicon/apple-touch-icon.png | Bin 0 -> 12771 bytes .../public/image/favicon/favicon-16x16.png | Bin 0 -> 695 bytes .../public/image/favicon/favicon-32x32.png | Bin 0 -> 1565 bytes .../.vitepress/public/image/favicon/favicon.ico | Bin 0 -> 15406 bytes doc/docs/.vitepress/public/image/yuescript.png | Bin 0 -> 67752 bytes doc/docs/.vitepress/public/image/yuescript.svg | 53 +++++ doc/docs/.vitepress/public/js/.gitkeep | 0 .../.vitepress/theme/components/CompilerModal.vue | 73 ++++++ .../.vitepress/theme/components/YueCompiler.vue | 243 ++++++++++++++++++++ .../.vitepress/theme/components/YueDisplay.vue | 47 ++++ doc/docs/.vitepress/theme/custom.css | 8 + doc/docs/.vitepress/theme/index.ts | 15 ++ doc/docs/.vuepress/components/CompilerModal.vue | 32 --- doc/docs/.vuepress/components/YueCompiler.vue | 250 -------------------- doc/docs/.vuepress/components/YueDisplay.vue | 49 ---- doc/docs/.vuepress/config.js | 128 ----------- doc/docs/.vuepress/enhanceApp.js | 14 -- .../image/favicon/android-chrome-192x192.png | Bin 13954 -> 0 bytes .../image/favicon/android-chrome-512x512.png | Bin 35977 -> 0 bytes .../public/image/favicon/apple-touch-icon.png | Bin 12771 -> 0 bytes .../public/image/favicon/favicon-16x16.png | Bin 695 -> 0 bytes .../public/image/favicon/favicon-32x32.png | Bin 1565 -> 0 bytes .../.vuepress/public/image/favicon/favicon.ico | Bin 15406 -> 0 bytes doc/docs/.vuepress/public/image/yuescript.png | Bin 67752 -> 0 bytes doc/docs/.vuepress/public/image/yuescript.svg | 53 ----- doc/docs/.vuepress/public/js/.gitkeep | 0 doc/docs/.vuepress/styles/index.styl | 12 - doc/docs/.vuepress/styles/palette.styl | 12 - doc/docs/.vuepress/theme/LICENSE | 21 -- doc/docs/.vuepress/theme/README.md | 11 - .../theme/components/AlgoliaSearchBox.vue | 172 -------------- .../.vuepress/theme/components/DropdownLink.vue | 252 --------------------- .../theme/components/DropdownTransition.vue | 33 --- doc/docs/.vuepress/theme/components/Home.vue | 175 -------------- doc/docs/.vuepress/theme/components/NavLink.vue | 90 -------- doc/docs/.vuepress/theme/components/NavLinks.vue | 156 ------------- doc/docs/.vuepress/theme/components/Navbar.vue | 140 ------------ doc/docs/.vuepress/theme/components/Page.vue | 31 --- doc/docs/.vuepress/theme/components/PageEdit.vue | 155 ------------- doc/docs/.vuepress/theme/components/PageNav.vue | 163 ------------- doc/docs/.vuepress/theme/components/Sidebar.vue | 64 ------ .../.vuepress/theme/components/SidebarButton.vue | 40 ---- .../.vuepress/theme/components/SidebarGroup.vue | 141 ------------ .../.vuepress/theme/components/SidebarLink.vue | 133 ----------- .../.vuepress/theme/components/SidebarLinks.vue | 106 --------- .../.vuepress/theme/global-components/Badge.vue | 44 ---- .../theme/global-components/CodeBlock.vue | 41 ---- .../theme/global-components/CodeGroup.vue | 120 ---------- doc/docs/.vuepress/theme/index.js | 59 ----- doc/docs/.vuepress/theme/layouts/404.vue | 30 --- doc/docs/.vuepress/theme/layouts/Layout.vue | 151 ------------ doc/docs/.vuepress/theme/noopModule.js | 1 - doc/docs/.vuepress/theme/package.json | 44 ---- doc/docs/.vuepress/theme/styles/arrow.styl | 22 -- doc/docs/.vuepress/theme/styles/code.styl | 176 -------------- doc/docs/.vuepress/theme/styles/config.styl | 1 - doc/docs/.vuepress/theme/styles/custom-blocks.styl | 44 ---- doc/docs/.vuepress/theme/styles/index.styl | 202 ----------------- doc/docs/.vuepress/theme/styles/mobile.styl | 37 --- doc/docs/.vuepress/theme/styles/toc.styl | 3 - doc/docs/.vuepress/theme/styles/wrapper.styl | 9 - doc/docs/.vuepress/theme/util/index.js | 244 -------------------- doc/docs/README.md | 16 +- doc/docs/zh/README.md | 16 +- 67 files changed, 523 insertions(+), 3671 deletions(-) create mode 100644 doc/docs/.vitepress/config.mts create mode 100644 doc/docs/.vitepress/public/image/favicon/android-chrome-192x192.png create mode 100644 doc/docs/.vitepress/public/image/favicon/android-chrome-512x512.png create mode 100644 doc/docs/.vitepress/public/image/favicon/apple-touch-icon.png create mode 100644 doc/docs/.vitepress/public/image/favicon/favicon-16x16.png create mode 100644 doc/docs/.vitepress/public/image/favicon/favicon-32x32.png create mode 100644 doc/docs/.vitepress/public/image/favicon/favicon.ico create mode 100644 doc/docs/.vitepress/public/image/yuescript.png create mode 100644 doc/docs/.vitepress/public/image/yuescript.svg create mode 100644 doc/docs/.vitepress/public/js/.gitkeep create mode 100755 doc/docs/.vitepress/theme/components/CompilerModal.vue create mode 100755 doc/docs/.vitepress/theme/components/YueCompiler.vue create mode 100755 doc/docs/.vitepress/theme/components/YueDisplay.vue create mode 100644 doc/docs/.vitepress/theme/custom.css create mode 100644 doc/docs/.vitepress/theme/index.ts delete mode 100755 doc/docs/.vuepress/components/CompilerModal.vue delete mode 100755 doc/docs/.vuepress/components/YueCompiler.vue delete mode 100755 doc/docs/.vuepress/components/YueDisplay.vue delete mode 100755 doc/docs/.vuepress/config.js delete mode 100755 doc/docs/.vuepress/enhanceApp.js delete mode 100755 doc/docs/.vuepress/public/image/favicon/android-chrome-192x192.png delete mode 100755 doc/docs/.vuepress/public/image/favicon/android-chrome-512x512.png delete mode 100755 doc/docs/.vuepress/public/image/favicon/apple-touch-icon.png delete mode 100755 doc/docs/.vuepress/public/image/favicon/favicon-16x16.png delete mode 100755 doc/docs/.vuepress/public/image/favicon/favicon-32x32.png delete mode 100755 doc/docs/.vuepress/public/image/favicon/favicon.ico delete mode 100644 doc/docs/.vuepress/public/image/yuescript.png delete mode 100644 doc/docs/.vuepress/public/image/yuescript.svg delete mode 100644 doc/docs/.vuepress/public/js/.gitkeep delete mode 100755 doc/docs/.vuepress/styles/index.styl delete mode 100755 doc/docs/.vuepress/styles/palette.styl delete mode 100644 doc/docs/.vuepress/theme/LICENSE delete mode 100644 doc/docs/.vuepress/theme/README.md delete mode 100644 doc/docs/.vuepress/theme/components/AlgoliaSearchBox.vue delete mode 100644 doc/docs/.vuepress/theme/components/DropdownLink.vue delete mode 100644 doc/docs/.vuepress/theme/components/DropdownTransition.vue delete mode 100644 doc/docs/.vuepress/theme/components/Home.vue delete mode 100644 doc/docs/.vuepress/theme/components/NavLink.vue delete mode 100644 doc/docs/.vuepress/theme/components/NavLinks.vue delete mode 100644 doc/docs/.vuepress/theme/components/Navbar.vue delete mode 100644 doc/docs/.vuepress/theme/components/Page.vue delete mode 100644 doc/docs/.vuepress/theme/components/PageEdit.vue delete mode 100644 doc/docs/.vuepress/theme/components/PageNav.vue delete mode 100644 doc/docs/.vuepress/theme/components/Sidebar.vue delete mode 100644 doc/docs/.vuepress/theme/components/SidebarButton.vue delete mode 100644 doc/docs/.vuepress/theme/components/SidebarGroup.vue delete mode 100644 doc/docs/.vuepress/theme/components/SidebarLink.vue delete mode 100644 doc/docs/.vuepress/theme/components/SidebarLinks.vue delete mode 100644 doc/docs/.vuepress/theme/global-components/Badge.vue delete mode 100644 doc/docs/.vuepress/theme/global-components/CodeBlock.vue delete mode 100644 doc/docs/.vuepress/theme/global-components/CodeGroup.vue delete mode 100644 doc/docs/.vuepress/theme/index.js delete mode 100644 doc/docs/.vuepress/theme/layouts/404.vue delete mode 100644 doc/docs/.vuepress/theme/layouts/Layout.vue delete mode 100644 doc/docs/.vuepress/theme/noopModule.js delete mode 100644 doc/docs/.vuepress/theme/package.json delete mode 100644 doc/docs/.vuepress/theme/styles/arrow.styl delete mode 100644 doc/docs/.vuepress/theme/styles/code.styl delete mode 100644 doc/docs/.vuepress/theme/styles/config.styl delete mode 100644 doc/docs/.vuepress/theme/styles/custom-blocks.styl delete mode 100644 doc/docs/.vuepress/theme/styles/index.styl delete mode 100644 doc/docs/.vuepress/theme/styles/mobile.styl delete mode 100644 doc/docs/.vuepress/theme/styles/toc.styl delete mode 100644 doc/docs/.vuepress/theme/styles/wrapper.styl delete mode 100644 doc/docs/.vuepress/theme/util/index.js (limited to 'doc/docs') diff --git a/doc/docs/.vitepress/config.mts b/doc/docs/.vitepress/config.mts new file mode 100644 index 0000000..7f7416d --- /dev/null +++ b/doc/docs/.vitepress/config.mts @@ -0,0 +1,62 @@ +import { defineConfig } from 'vitepress' + +export default defineConfig({ + title: 'YueScript', + description: 'A language that compiles to Lua', + head: [ + ['meta', { name: 'theme-color', content: '#3eaf7c' }], + ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }], + ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }], + ['meta', { property: 'og:title', content: 'YueScript' }], + ['meta', { property: 'og:description', content: 'A language that compiles to Lua' }], + ['meta', { property: 'og:type', content: 'website' }], + ['meta', { property: 'og:image', content: '/image/yuescript.png' }], + ['meta', { property: 'og:image:secure_url', content: '/image/yuescript.png' }], + ['meta', { property: 'og:image:type', content: 'image/png' }], + ['meta', { property: 'og:image:width', content: '1200' }], + ['meta', { property: 'og:image:height', content: '1200' }], + ['link', { rel: 'icon', href: '/image/favicon/favicon-16x16.png', sizes: '16x16', type: 'image/png' }], + ['link', { rel: 'icon', href: '/image/favicon/favicon-32x32.png', sizes: '32x32', type: 'image/png' }], + ['link', { rel: 'apple-touch-icon', href: '/image/favicon/apple-touch-icon.png', sizes: '180x180', type: 'image/png' }], + ['link', { rel: 'android-chrome', href: '/image/favicon/android-chrome-192x192.png', sizes: '192x192', type: 'image/png' }], + ['link', { rel: 'android-chrome', href: '/image/favicon/android-chrome-512x512.png', sizes: '512x512', type: 'image/png' }], + ['script', {}, 'window.global = window;'], + [ + 'script', + {}, + `var Module = { + onRuntimeInitialized: function() { + window.yue = Module; + window.dispatchEvent(new Event('yue:ready')); + } +};` + ], + ['script', { src: '/js/yuescript.js' }] + ], + locales: { + root: { + label: 'English', + lang: 'en-US', + description: 'A language that compiles to Lua', + themeConfig: { + nav: [ + { text: 'Document', link: '/doc/' }, + { text: 'Try yue!', link: '/try/' }, + { text: 'Github', link: 'https://github.com/pigpigyyy/Yuescript' } + ] + } + }, + zh: { + label: '简体中文', + lang: 'zh-CN', + description: '一门编译到 Lua 的语言', + themeConfig: { + nav: [ + { text: '文档', link: '/zh/doc/' }, + { text: '试一试!', link: '/zh/try/' }, + { text: 'Github', link: 'https://github.com/pigpigyyy/Yuescript' } + ] + } + } + } +}) diff --git a/doc/docs/.vitepress/public/image/favicon/android-chrome-192x192.png b/doc/docs/.vitepress/public/image/favicon/android-chrome-192x192.png new file mode 100644 index 0000000..08c42cc Binary files /dev/null and b/doc/docs/.vitepress/public/image/favicon/android-chrome-192x192.png differ diff --git a/doc/docs/.vitepress/public/image/favicon/android-chrome-512x512.png b/doc/docs/.vitepress/public/image/favicon/android-chrome-512x512.png new file mode 100644 index 0000000..557d8af Binary files /dev/null and b/doc/docs/.vitepress/public/image/favicon/android-chrome-512x512.png differ diff --git a/doc/docs/.vitepress/public/image/favicon/apple-touch-icon.png b/doc/docs/.vitepress/public/image/favicon/apple-touch-icon.png new file mode 100644 index 0000000..5780626 Binary files /dev/null and b/doc/docs/.vitepress/public/image/favicon/apple-touch-icon.png differ diff --git a/doc/docs/.vitepress/public/image/favicon/favicon-16x16.png b/doc/docs/.vitepress/public/image/favicon/favicon-16x16.png new file mode 100644 index 0000000..f067228 Binary files /dev/null and b/doc/docs/.vitepress/public/image/favicon/favicon-16x16.png differ diff --git a/doc/docs/.vitepress/public/image/favicon/favicon-32x32.png b/doc/docs/.vitepress/public/image/favicon/favicon-32x32.png new file mode 100644 index 0000000..2865ef5 Binary files /dev/null and b/doc/docs/.vitepress/public/image/favicon/favicon-32x32.png differ diff --git a/doc/docs/.vitepress/public/image/favicon/favicon.ico b/doc/docs/.vitepress/public/image/favicon/favicon.ico new file mode 100644 index 0000000..2c1360d Binary files /dev/null and b/doc/docs/.vitepress/public/image/favicon/favicon.ico differ diff --git a/doc/docs/.vitepress/public/image/yuescript.png b/doc/docs/.vitepress/public/image/yuescript.png new file mode 100644 index 0000000..7d9b896 Binary files /dev/null and b/doc/docs/.vitepress/public/image/yuescript.png differ diff --git a/doc/docs/.vitepress/public/image/yuescript.svg b/doc/docs/.vitepress/public/image/yuescript.svg new file mode 100644 index 0000000..87fdb45 --- /dev/null +++ b/doc/docs/.vitepress/public/image/yuescript.svg @@ -0,0 +1,53 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + diff --git a/doc/docs/.vitepress/public/js/.gitkeep b/doc/docs/.vitepress/public/js/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/docs/.vitepress/theme/components/CompilerModal.vue b/doc/docs/.vitepress/theme/components/CompilerModal.vue new file mode 100755 index 0000000..8620536 --- /dev/null +++ b/doc/docs/.vitepress/theme/components/CompilerModal.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/doc/docs/.vitepress/theme/components/YueCompiler.vue b/doc/docs/.vitepress/theme/components/YueCompiler.vue new file mode 100755 index 0000000..fc83486 --- /dev/null +++ b/doc/docs/.vitepress/theme/components/YueCompiler.vue @@ -0,0 +1,243 @@ + + + + + diff --git a/doc/docs/.vitepress/theme/components/YueDisplay.vue b/doc/docs/.vitepress/theme/components/YueDisplay.vue new file mode 100755 index 0000000..c633b43 --- /dev/null +++ b/doc/docs/.vitepress/theme/components/YueDisplay.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/doc/docs/.vitepress/theme/custom.css b/doc/docs/.vitepress/theme/custom.css new file mode 100644 index 0000000..67131ae --- /dev/null +++ b/doc/docs/.vitepress/theme/custom.css @@ -0,0 +1,8 @@ +:root { + --vp-c-brand-1: #3eaf7c; +} + +.VPHomeHero .image img { + width: 450px; + max-width: 450px !important; +} diff --git a/doc/docs/.vitepress/theme/index.ts b/doc/docs/.vitepress/theme/index.ts new file mode 100644 index 0000000..fd0f640 --- /dev/null +++ b/doc/docs/.vitepress/theme/index.ts @@ -0,0 +1,15 @@ +import DefaultTheme from 'vitepress/theme' +import './custom.css' + +import CompilerModal from './components/CompilerModal.vue' +import YueCompiler from './components/YueCompiler.vue' +import YueDisplay from './components/YueDisplay.vue' + +export default { + extends: DefaultTheme, + enhanceApp({ app }) { + app.component('CompilerModal', CompilerModal) + app.component('YueCompiler', YueCompiler) + app.component('YueDisplay', YueDisplay) + } +} diff --git a/doc/docs/.vuepress/components/CompilerModal.vue b/doc/docs/.vuepress/components/CompilerModal.vue deleted file mode 100755 index 65ae9b0..0000000 --- a/doc/docs/.vuepress/components/CompilerModal.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - - diff --git a/doc/docs/.vuepress/components/YueCompiler.vue b/doc/docs/.vuepress/components/YueCompiler.vue deleted file mode 100755 index 3a22d1c..0000000 --- a/doc/docs/.vuepress/components/YueCompiler.vue +++ /dev/null @@ -1,250 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/components/YueDisplay.vue b/doc/docs/.vuepress/components/YueDisplay.vue deleted file mode 100755 index b89805b..0000000 --- a/doc/docs/.vuepress/components/YueDisplay.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - diff --git a/doc/docs/.vuepress/config.js b/doc/docs/.vuepress/config.js deleted file mode 100755 index 1fe44ce..0000000 --- a/doc/docs/.vuepress/config.js +++ /dev/null @@ -1,128 +0,0 @@ -const { description } = require('../../package') - -module.exports = { - /** - * Ref:https://v1.vuepress.vuejs.org/config/#title - */ - title: 'YueScript', - /** - * Ref:https://v1.vuepress.vuejs.org/config/#description - */ - description: description, - - /** - * Extra tags to be injected to the page HTML `` - * - * ref:https://v1.vuepress.vuejs.org/config/#head - */ - head: [ - ['meta', { name: 'theme-color', content: '#3eaf7c' }], - ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }], - ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }], - ['meta', { property: 'og:title', content: 'YueScript' }], - ['meta', { property: 'og:description', content: description }], - // Should probably have a og:url but I'm not sure how to add that without it being the same on all pages - ['meta', { property: 'og:type', content: 'website' }], - ['meta', { property: 'og:image', content: '/image/yuescript.png' }], - ['meta', { property: 'og:image:secure_url', content: '/image/yuescript.png' }], - ['meta', { property: 'og:image:type', content: 'image/png' }], - ['meta', { property: 'og:image:width', content: '1200' }], - ['meta', { property: 'og:image:height', content: '1200' }], - ['link', { rel: 'icon', href: '/image/favicon/favicon-16x16.png', sizes: '16x16', type: 'image/png' }], - ['link', { rel: 'icon', href: '/image/favicon/favicon-32x32.png', sizes: '32x32', type: 'image/png' }], - ['link', { rel: 'apple-touch-icon', href: '/image/favicon/apple-touch-icon-180x180.png', sizes: '180x180', type: 'image/png' }], - ['link', { rel: 'android-chrome', href: '/image/favicon/android-chrome-192x192.png', sizes: '192x192', type: 'image/png' }], - ['link', { rel: 'android-chrome', href: '/image/favicon/android-chrome-512x512.png', sizes: '512x512', type: 'image/png' }], - ['script', {}, `window.global = window;`], - ['script', {}, ` - var Module = { - onRuntimeInitialized: function() { - window.yue = Module; - window.Vue.$data.readonly = false; - window.Vue.$data.info = Module.version(); - } - }; - `], - ['script', { src: '/js/yuescript.js' }], - ], - - locales: { - '/': { - lang: 'en-US', - title: 'YueScript', - description: 'A language that compiles to Lua' - }, - - '/zh/': { - lang: 'zh-CN', - title: '月之脚本', - description: '一门编译到 Lua 的语言' - } - }, - - /** - * Theme configuration, here is the default theme configuration for VuePress. - * - * ref:https://v1.vuepress.vuejs.org/theme/default-theme-config.html - */ - themeConfig: { - locales: { - '/': { - selectText: 'Languages', - label: 'English', - repo: '', - editLinks: false, - docsDir: '', - editLinkText: '', - lastUpdated: false, - nav: [ - { - text: 'Document', - link: '/doc/' - }, - { - text: 'Try yue!', - link: '/try/', - }, - { - text: 'Github', - link: 'https://github.com/pigpigyyy/Yuescript' - } - ], - }, - - '/zh/': { - selectText: '选择语言', - label: '简体中文', - repo: '', - editLinks: false, - docsDir: '', - editLinkText: '', - lastUpdated: false, - nav: [ - { - text: '文档', - link: '/zh/doc/' - }, - { - text: '试一试!', - link: '/zh/try/', - }, - { - text: 'Github', - link: 'https://github.com/pigpigyyy/Yuescript' - } - ], - }, - } - }, - - /** - * Apply plugins,ref:https://v1.vuepress.vuejs.org/zh/plugin/ - */ - plugins: [ - '@vuepress/plugin-back-to-top', - '@vuepress/plugin-medium-zoom', - '~plugins/vue-js-modal.js', - ] -} diff --git a/doc/docs/.vuepress/enhanceApp.js b/doc/docs/.vuepress/enhanceApp.js deleted file mode 100755 index 8452a86..0000000 --- a/doc/docs/.vuepress/enhanceApp.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Client app enhancement file. - * - * https://v1.vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements - */ - -export default ({ - Vue, // the version of Vue being used in the VuePress app - options, // the options for the root Vue instance - router, // the router instance for the app - siteData // site metadata -}) => { - // ...apply enhancements for the site. -} diff --git a/doc/docs/.vuepress/public/image/favicon/android-chrome-192x192.png b/doc/docs/.vuepress/public/image/favicon/android-chrome-192x192.png deleted file mode 100755 index 08c42cc..0000000 Binary files a/doc/docs/.vuepress/public/image/favicon/android-chrome-192x192.png and /dev/null differ diff --git a/doc/docs/.vuepress/public/image/favicon/android-chrome-512x512.png b/doc/docs/.vuepress/public/image/favicon/android-chrome-512x512.png deleted file mode 100755 index 557d8af..0000000 Binary files a/doc/docs/.vuepress/public/image/favicon/android-chrome-512x512.png and /dev/null differ diff --git a/doc/docs/.vuepress/public/image/favicon/apple-touch-icon.png b/doc/docs/.vuepress/public/image/favicon/apple-touch-icon.png deleted file mode 100755 index 5780626..0000000 Binary files a/doc/docs/.vuepress/public/image/favicon/apple-touch-icon.png and /dev/null differ diff --git a/doc/docs/.vuepress/public/image/favicon/favicon-16x16.png b/doc/docs/.vuepress/public/image/favicon/favicon-16x16.png deleted file mode 100755 index f067228..0000000 Binary files a/doc/docs/.vuepress/public/image/favicon/favicon-16x16.png and /dev/null differ diff --git a/doc/docs/.vuepress/public/image/favicon/favicon-32x32.png b/doc/docs/.vuepress/public/image/favicon/favicon-32x32.png deleted file mode 100755 index 2865ef5..0000000 Binary files a/doc/docs/.vuepress/public/image/favicon/favicon-32x32.png and /dev/null differ diff --git a/doc/docs/.vuepress/public/image/favicon/favicon.ico b/doc/docs/.vuepress/public/image/favicon/favicon.ico deleted file mode 100755 index 2c1360d..0000000 Binary files a/doc/docs/.vuepress/public/image/favicon/favicon.ico and /dev/null differ diff --git a/doc/docs/.vuepress/public/image/yuescript.png b/doc/docs/.vuepress/public/image/yuescript.png deleted file mode 100644 index 7d9b896..0000000 Binary files a/doc/docs/.vuepress/public/image/yuescript.png and /dev/null differ diff --git a/doc/docs/.vuepress/public/image/yuescript.svg b/doc/docs/.vuepress/public/image/yuescript.svg deleted file mode 100644 index 87fdb45..0000000 --- a/doc/docs/.vuepress/public/image/yuescript.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - diff --git a/doc/docs/.vuepress/public/js/.gitkeep b/doc/docs/.vuepress/public/js/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/doc/docs/.vuepress/styles/index.styl b/doc/docs/.vuepress/styles/index.styl deleted file mode 100755 index 31c4d51..0000000 --- a/doc/docs/.vuepress/styles/index.styl +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Custom Styles here. - * - * ref:https://v1.vuepress.vuejs.org/config/#index-styl - */ - -.home .hero img - width: 450px - max-width 450px!important - -.prism-editor__container - min-height: 100% diff --git a/doc/docs/.vuepress/styles/palette.styl b/doc/docs/.vuepress/styles/palette.styl deleted file mode 100755 index 389aa76..0000000 --- a/doc/docs/.vuepress/styles/palette.styl +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Custom palette here. - * - * ref:https://v1.vuepress.vuejs.org/zh/config/#palette-styl - */ - -$accentColor = #b7ae8f -$textColor = #2c3e50 -$borderColor = #eaecef -$codeBgColor = #f5f7ff - -$contentWidth = 900px diff --git a/doc/docs/.vuepress/theme/LICENSE b/doc/docs/.vuepress/theme/LICENSE deleted file mode 100644 index 15f1f7e..0000000 --- a/doc/docs/.vuepress/theme/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018-present, Yuxi (Evan) You - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/doc/docs/.vuepress/theme/README.md b/doc/docs/.vuepress/theme/README.md deleted file mode 100644 index fc49626..0000000 --- a/doc/docs/.vuepress/theme/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# @vuepress/theme-default - -> theme-default for VuePress - -## Plugins - -The default theme has the following plugin built in: - -- [@vuepress/plugin-active-header-links](https://github.com/vuejs/vuepress/tree/master/packages/@vuepress/plugin-active-header-links) -- [@vuepress/plugin-google-analytics](https://github.com/vuejs/vuepress/tree/master/packages/%40vuepress/plugin-google-analytics) -- [@vuepress/plugin-search](https://github.com/vuejs/vuepress/tree/master/packages/%40vuepress/plugin-search) diff --git a/doc/docs/.vuepress/theme/components/AlgoliaSearchBox.vue b/doc/docs/.vuepress/theme/components/AlgoliaSearchBox.vue deleted file mode 100644 index 7071fb8..0000000 --- a/doc/docs/.vuepress/theme/components/AlgoliaSearchBox.vue +++ /dev/null @@ -1,172 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/theme/components/DropdownLink.vue b/doc/docs/.vuepress/theme/components/DropdownLink.vue deleted file mode 100644 index be6563f..0000000 --- a/doc/docs/.vuepress/theme/components/DropdownLink.vue +++ /dev/null @@ -1,252 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/theme/components/DropdownTransition.vue b/doc/docs/.vuepress/theme/components/DropdownTransition.vue deleted file mode 100644 index eeaf12b..0000000 --- a/doc/docs/.vuepress/theme/components/DropdownTransition.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/theme/components/Home.vue b/doc/docs/.vuepress/theme/components/Home.vue deleted file mode 100644 index acd8744..0000000 --- a/doc/docs/.vuepress/theme/components/Home.vue +++ /dev/null @@ -1,175 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/theme/components/NavLink.vue b/doc/docs/.vuepress/theme/components/NavLink.vue deleted file mode 100644 index f7e65a4..0000000 --- a/doc/docs/.vuepress/theme/components/NavLink.vue +++ /dev/null @@ -1,90 +0,0 @@ - - - diff --git a/doc/docs/.vuepress/theme/components/NavLinks.vue b/doc/docs/.vuepress/theme/components/NavLinks.vue deleted file mode 100644 index 2656ae2..0000000 --- a/doc/docs/.vuepress/theme/components/NavLinks.vue +++ /dev/null @@ -1,156 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/theme/components/Navbar.vue b/doc/docs/.vuepress/theme/components/Navbar.vue deleted file mode 100644 index f8dd49c..0000000 --- a/doc/docs/.vuepress/theme/components/Navbar.vue +++ /dev/null @@ -1,140 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/theme/components/Page.vue b/doc/docs/.vuepress/theme/components/Page.vue deleted file mode 100644 index 04ec7cb..0000000 --- a/doc/docs/.vuepress/theme/components/Page.vue +++ /dev/null @@ -1,31 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/theme/components/PageEdit.vue b/doc/docs/.vuepress/theme/components/PageEdit.vue deleted file mode 100644 index cf9b2d2..0000000 --- a/doc/docs/.vuepress/theme/components/PageEdit.vue +++ /dev/null @@ -1,155 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/theme/components/PageNav.vue b/doc/docs/.vuepress/theme/components/PageNav.vue deleted file mode 100644 index 4c19aae..0000000 --- a/doc/docs/.vuepress/theme/components/PageNav.vue +++ /dev/null @@ -1,163 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/theme/components/Sidebar.vue b/doc/docs/.vuepress/theme/components/Sidebar.vue deleted file mode 100644 index e70e333..0000000 --- a/doc/docs/.vuepress/theme/components/Sidebar.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/theme/components/SidebarButton.vue b/doc/docs/.vuepress/theme/components/SidebarButton.vue deleted file mode 100644 index 3f54afd..0000000 --- a/doc/docs/.vuepress/theme/components/SidebarButton.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - diff --git a/doc/docs/.vuepress/theme/components/SidebarGroup.vue b/doc/docs/.vuepress/theme/components/SidebarGroup.vue deleted file mode 100644 index d7f1929..0000000 --- a/doc/docs/.vuepress/theme/components/SidebarGroup.vue +++ /dev/null @@ -1,141 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/theme/components/SidebarLink.vue b/doc/docs/.vuepress/theme/components/SidebarLink.vue deleted file mode 100644 index 4cd7665..0000000 --- a/doc/docs/.vuepress/theme/components/SidebarLink.vue +++ /dev/null @@ -1,133 +0,0 @@ - - - diff --git a/doc/docs/.vuepress/theme/components/SidebarLinks.vue b/doc/docs/.vuepress/theme/components/SidebarLinks.vue deleted file mode 100644 index 55e6288..0000000 --- a/doc/docs/.vuepress/theme/components/SidebarLinks.vue +++ /dev/null @@ -1,106 +0,0 @@ - - - diff --git a/doc/docs/.vuepress/theme/global-components/Badge.vue b/doc/docs/.vuepress/theme/global-components/Badge.vue deleted file mode 100644 index 53951f9..0000000 --- a/doc/docs/.vuepress/theme/global-components/Badge.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - diff --git a/doc/docs/.vuepress/theme/global-components/CodeBlock.vue b/doc/docs/.vuepress/theme/global-components/CodeBlock.vue deleted file mode 100644 index d59d85b..0000000 --- a/doc/docs/.vuepress/theme/global-components/CodeBlock.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/theme/global-components/CodeGroup.vue b/doc/docs/.vuepress/theme/global-components/CodeGroup.vue deleted file mode 100644 index ac6ec55..0000000 --- a/doc/docs/.vuepress/theme/global-components/CodeGroup.vue +++ /dev/null @@ -1,120 +0,0 @@ - - - - - diff --git a/doc/docs/.vuepress/theme/index.js b/doc/docs/.vuepress/theme/index.js deleted file mode 100644 index baaf102..0000000 --- a/doc/docs/.vuepress/theme/index.js +++ /dev/null @@ -1,59 +0,0 @@ -const path = require('path') - -// Theme API. -module.exports = (options, ctx) => { - const { themeConfig, siteConfig } = ctx - - // resolve algolia - const isAlgoliaSearch = ( - themeConfig.algolia - || Object - .keys(siteConfig.locales && themeConfig.locales || {}) - .some(base => themeConfig.locales[base].algolia) - ) - - const enableSmoothScroll = themeConfig.smoothScroll === true - - return { - alias () { - return { - '@AlgoliaSearchBox': isAlgoliaSearch - ? path.resolve(__dirname, 'components/AlgoliaSearchBox.vue') - : path.resolve(__dirname, 'noopModule.js') - } - }, - - plugins: [ - ['@vuepress/active-header-links', options.activeHeaderLinks], - '@vuepress/search', - '@vuepress/plugin-nprogress', - ['container', { - type: 'tip', - defaultTitle: { - '/': 'TIP', - '/zh/': '提示' - } - }], - ['container', { - type: 'warning', - defaultTitle: { - '/': 'WARNING', - '/zh/': '注意' - } - }], - ['container', { - type: 'danger', - defaultTitle: { - '/': 'WARNING', - '/zh/': '警告' - } - }], - ['container', { - type: 'details', - before: info => `
${info ? `${info}` : ''}\n`, - after: () => '
\n' - }], - ['smooth-scroll', enableSmoothScroll] - ] - } -} diff --git a/doc/docs/.vuepress/theme/layouts/404.vue b/doc/docs/.vuepress/theme/layouts/404.vue deleted file mode 100644 index 2cbfa0f..0000000 --- a/doc/docs/.vuepress/theme/layouts/404.vue +++ /dev/null @@ -1,30 +0,0 @@ - - - diff --git a/doc/docs/.vuepress/theme/layouts/Layout.vue b/doc/docs/.vuepress/theme/layouts/Layout.vue deleted file mode 100644 index 3298070..0000000 --- a/doc/docs/.vuepress/theme/layouts/Layout.vue +++ /dev/null @@ -1,151 +0,0 @@ - - - diff --git a/doc/docs/.vuepress/theme/noopModule.js b/doc/docs/.vuepress/theme/noopModule.js deleted file mode 100644 index b1c6ea4..0000000 --- a/doc/docs/.vuepress/theme/noopModule.js +++ /dev/null @@ -1 +0,0 @@ -export default {} diff --git a/doc/docs/.vuepress/theme/package.json b/doc/docs/.vuepress/theme/package.json deleted file mode 100644 index d5dfc26..0000000 --- a/doc/docs/.vuepress/theme/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "@vuepress/theme-default", - "version": "1.8.2", - "description": "Default theme for VuePress", - "keywords": [ - "documentation", - "generator", - "vue", - "vuepress" - ], - "homepage": "https://github.com/vuejs/vuepress/blob/master/packages/@vuepress/theme-default#readme", - "bugs": { - "url": "https://github.com/vuejs/vuepress/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/vuejs/vuepress.git", - "directory": "packages/@vuepress/theme-default" - }, - "license": "MIT", - "author": "Evan You", - "main": "index.js", - "dependencies": { - "@vuepress/plugin-active-header-links": "1.8.2", - "@vuepress/plugin-nprogress": "1.8.2", - "@vuepress/plugin-search": "1.8.2", - "docsearch.js": "^2.5.2", - "lodash": "^4.17.15", - "stylus": "^0.54.8", - "stylus-loader": "^3.0.2", - "vuepress-plugin-container": "^2.0.2", - "vuepress-plugin-smooth-scroll": "^0.0.3" - }, - "publishConfig": { - "access": "public" - }, - "maintainers": [ - { - "name": "ULIVZ", - "email": "chl814@foxmail.com" - } - ], - "gitHead": "11eed0f0f105b97a7324cfa8e59d7d27bb966842" -} diff --git a/doc/docs/.vuepress/theme/styles/arrow.styl b/doc/docs/.vuepress/theme/styles/arrow.styl deleted file mode 100644 index 20bffc0..0000000 --- a/doc/docs/.vuepress/theme/styles/arrow.styl +++ /dev/null @@ -1,22 +0,0 @@ -@require './config' - -.arrow - display inline-block - width 0 - height 0 - &.up - border-left 4px solid transparent - border-right 4px solid transparent - border-bottom 6px solid $arrowBgColor - &.down - border-left 4px solid transparent - border-right 4px solid transparent - border-top 6px solid $arrowBgColor - &.right - border-top 4px solid transparent - border-bottom 4px solid transparent - border-left 6px solid $arrowBgColor - &.left - border-top 4px solid transparent - border-bottom 4px solid transparent - border-right 6px solid $arrowBgColor diff --git a/doc/docs/.vuepress/theme/styles/code.styl b/doc/docs/.vuepress/theme/styles/code.styl deleted file mode 100644 index a89c18e..0000000 --- a/doc/docs/.vuepress/theme/styles/code.styl +++ /dev/null @@ -1,176 +0,0 @@ -/* - -Name: Base16 Atelier Sulphurpool Light -Author: Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) - -Prism template by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/prism/) -Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) - -*/ -code[class*="language-"], -pre[class*="language-"] { - font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace; - font-size: 15px; - line-height: 1.375; - direction: ltr; - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; - background: #f5f7ff; - color: #5e6687; -} - -pre > code[class*="language-"] { - font-size: 15px; -} - -pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, -code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { - text-shadow: none; - background: #dfe2f1; -} - -pre[class*="language-"]::selection, pre[class*="language-"] ::selection, -code[class*="language-"]::selection, code[class*="language-"] ::selection { - text-shadow: none; - background: #dfe2f1; -} - -/* Code blocks */ -pre[class*="language-"] { - padding: 1em; - margin: .5em 0; - overflow: auto; -} - -/* Inline code */ -:not(pre) > code[class*="language-"] { - padding: .1em; - border-radius: .3em; -} - -.token.comment, -.token.prolog, -.token.doctype, -.token.cdata { - color: #898ea4; -} - -.token.punctuation { - color: #5e6687; -} - -.token.namespace { - opacity: .7; -} - -.token.operator, -.token.boolean, -.token.number { - color: #c76b29; -} - -.token.property { - color: #c08b30; -} - -.token.tag { - color: #3d8fd1; -} - -.token.string { - color: #22a2c9; -} - -.token.selector { - color: #6679cc; -} - -.token.attr-name { - color: #c76b29; -} - -.token.entity, -.token.url, -.language-css .token.string, -.style .token.string { - color: #22a2c9; -} - -.token.attr-value, -.token.keyword, -.token.control, -.token.directive, -.token.unit { - color: #ac9739; -} - -.token.statement, -.token.regex, -.token.atrule { - color: #22a2c9; -} - -.token.placeholder, -.token.variable { - color: #3d8fd1; -} - -.token.deleted { - text-decoration: line-through; -} - -.token.inserted { - border-bottom: 1px dotted #202746; - text-decoration: none; -} - -.token.italic { - font-style: italic; -} - -.token.important, -.token.bold { - font-weight: bold; -} - -.token.important { - color: #c94922; -} - -.token.entity { - cursor: help; -} - -pre > code.highlight { - outline: 0.4em solid #c94922; - outline-offset: .4em; -} - -/* overrides color-values for the Line Numbers plugin - * http://prismjs.com/plugins/line-numbers/ - */ -.line-numbers .line-numbers-rows { - border-right-color: #dfe2f1; -} - -.line-numbers-rows > span:before { - color: #979db4; -} - -/* overrides color-values for the Line Highlight plugin - * http://prismjs.com/plugins/line-highlight/ - */ -.line-highlight { - background: rgba(107, 115, 148, 0.2); - background: -webkit-linear-gradient(left, rgba(107, 115, 148, 0.2) 70%, rgba(107, 115, 148, 0)); - background: linear-gradient(to right, rgba(107, 115, 148, 0.2) 70%, rgba(107, 115, 148, 0)); -} diff --git a/doc/docs/.vuepress/theme/styles/config.styl b/doc/docs/.vuepress/theme/styles/config.styl deleted file mode 100644 index 9e40321..0000000 --- a/doc/docs/.vuepress/theme/styles/config.styl +++ /dev/null @@ -1 +0,0 @@ -$contentClass = '.theme-default-content' diff --git a/doc/docs/.vuepress/theme/styles/custom-blocks.styl b/doc/docs/.vuepress/theme/styles/custom-blocks.styl deleted file mode 100644 index 5b86816..0000000 --- a/doc/docs/.vuepress/theme/styles/custom-blocks.styl +++ /dev/null @@ -1,44 +0,0 @@ -.custom-block - .custom-block-title - font-weight 600 - margin-bottom -0.4rem - &.tip, &.warning, &.danger - padding .1rem 1.5rem - border-left-width .5rem - border-left-style solid - margin 1rem 0 - &.tip - background-color #f3f5f7 - border-color #42b983 - &.warning - background-color rgba(255,229,100,.3) - border-color darken(#ffe564, 35%) - color darken(#ffe564, 70%) - .custom-block-title - color darken(#ffe564, 50%) - a - color $textColor - &.danger - background-color #ffe6e6 - border-color darken(red, 20%) - color darken(red, 70%) - .custom-block-title - color darken(red, 40%) - a - color $textColor - &.details - display block - position relative - border-radius 2px - margin 1.6em 0 - padding 1.6em - background-color #eee - h4 - margin-top 0 - figure, p - &:last-child - margin-bottom 0 - padding-bottom 0 - summary - outline none - cursor pointer diff --git a/doc/docs/.vuepress/theme/styles/index.styl b/doc/docs/.vuepress/theme/styles/index.styl deleted file mode 100644 index ecef658..0000000 --- a/doc/docs/.vuepress/theme/styles/index.styl +++ /dev/null @@ -1,202 +0,0 @@ -@require './config' -@require './code' -@require './custom-blocks' -@require './arrow' -@require './wrapper' -@require './toc' - -html, body - padding 0 - margin 0 - background-color #fff - -body - font-family -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif - -webkit-font-smoothing antialiased - -moz-osx-font-smoothing grayscale - font-size 16px - color $textColor - -.page - padding-left $sidebarWidth - -.navbar - position fixed - z-index 20 - top 0 - left 0 - right 0 - height $navbarHeight - background-color #fff - box-sizing border-box - border-bottom 1px solid $borderColor - -.sidebar-mask - position fixed - z-index 9 - top 0 - left 0 - width 100vw - height 100vh - display none - -.sidebar - font-size 16px - background-color #fff - width $sidebarWidth - position fixed - z-index 10 - margin 0 - top $navbarHeight - left 0 - bottom 0 - box-sizing border-box - border-right 1px solid $borderColor - overflow-y auto - -{$contentClass}:not(.custom) - @extend $wrapper - > *:first-child - margin-top $navbarHeight - - a:hover - text-decoration underline - - p.demo - padding 1rem 1.5rem - border 1px solid #ddd - border-radius 4px - - img - max-width 100% - -{$contentClass}.custom - padding 0 - margin 0 - - img - max-width 100% - -a - font-weight 500 - color $accentColor - text-decoration none - -p a code - font-weight 400 - color $accentColor - -kbd - background #eee - border solid 0.15rem #ddd - border-bottom solid 0.25rem #ddd - border-radius 0.15rem - padding 0 0.15em - -blockquote - font-size 1rem - color #999; - border-left .2rem solid #dfe2e5 - margin 1rem 0 - padding .25rem 0 .25rem 1rem - - & > p - margin 0 - -ul, ol - padding-left 1.2em - -strong - font-weight 600 - -h1, h2, h3, h4, h5, h6 - font-weight 600 - line-height 1.25 - - {$contentClass}:not(.custom) > & - margin-top (0.5rem - $navbarHeight) - padding-top ($navbarHeight + 1rem) - margin-bottom 0 - - &:first-child - margin-top -1.5rem - margin-bottom 1rem - - + p, + pre, + .custom-block - margin-top 2rem - - &:focus .header-anchor, - &:hover .header-anchor - opacity: 1 - -h1 - font-size 2.2rem - -h2 - font-size 1.65rem - padding-bottom .3rem - border-bottom 1px solid $borderColor - -h3 - font-size 1.35rem - -a.header-anchor - font-size 0.85em - float left - margin-left -0.87em - padding-right 0.23em - margin-top 0.125em - opacity 0 - - &:focus, - &:hover - text-decoration none - -code, kbd, .line-number - font-family Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace - -p, ul, ol - line-height 1.7 - -hr - border 0 - border-top 1px solid $borderColor - -table - border-collapse collapse - margin 1rem 0 - display: block - overflow-x: auto - -tr - border-top 1px solid #dfe2e5 - - &:nth-child(2n) - background-color #f6f8fa - -th, td - border 1px solid #dfe2e5 - padding .6em 1em - -.theme-container - &.sidebar-open - .sidebar-mask - display: block - - &.no-navbar - {$contentClass}:not(.custom) > h1, h2, h3, h4, h5, h6 - margin-top 1.5rem - padding-top 0 - - .sidebar - top 0 - -@media (min-width: ($MQMobile + 1px)) - .theme-container.no-sidebar - .sidebar - display none - - .page - padding-left 0 - -@require 'mobile.styl' diff --git a/doc/docs/.vuepress/theme/styles/mobile.styl b/doc/docs/.vuepress/theme/styles/mobile.styl deleted file mode 100644 index f5bd327..0000000 --- a/doc/docs/.vuepress/theme/styles/mobile.styl +++ /dev/null @@ -1,37 +0,0 @@ -@require './config' - -$mobileSidebarWidth = $sidebarWidth * 0.82 - -// narrow desktop / iPad -@media (max-width: $MQNarrow) - .sidebar - font-size 15px - width $mobileSidebarWidth - .page - padding-left $mobileSidebarWidth - -// wide mobile -@media (max-width: $MQMobile) - .sidebar - top 0 - padding-top $navbarHeight - transform translateX(-100%) - transition transform .2s ease - .page - padding-left 0 - .theme-container - &.sidebar-open - .sidebar - transform translateX(0) - &.no-navbar - .sidebar - padding-top: 0 - -// narrow mobile -@media (max-width: $MQMobileNarrow) - h1 - font-size 1.9rem - {$contentClass} - div[class*="language-"] - margin 0.85rem -1.5rem - border-radius 0 diff --git a/doc/docs/.vuepress/theme/styles/toc.styl b/doc/docs/.vuepress/theme/styles/toc.styl deleted file mode 100644 index d3e7106..0000000 --- a/doc/docs/.vuepress/theme/styles/toc.styl +++ /dev/null @@ -1,3 +0,0 @@ -.table-of-contents - .badge - vertical-align middle diff --git a/doc/docs/.vuepress/theme/styles/wrapper.styl b/doc/docs/.vuepress/theme/styles/wrapper.styl deleted file mode 100644 index a99262c..0000000 --- a/doc/docs/.vuepress/theme/styles/wrapper.styl +++ /dev/null @@ -1,9 +0,0 @@ -$wrapper - max-width $contentWidth - margin 0 auto - padding 2rem 2.5rem - @media (max-width: $MQNarrow) - padding 2rem - @media (max-width: $MQMobileNarrow) - padding 1.5rem - diff --git a/doc/docs/.vuepress/theme/util/index.js b/doc/docs/.vuepress/theme/util/index.js deleted file mode 100644 index 92fcd3b..0000000 --- a/doc/docs/.vuepress/theme/util/index.js +++ /dev/null @@ -1,244 +0,0 @@ -export const hashRE = /#.*$/ -export const extRE = /\.(md|html)$/ -export const endingSlashRE = /\/$/ -export const outboundRE = /^[a-z]+:/i - -export function normalize (path) { - return decodeURI(path) - .replace(hashRE, '') - .replace(extRE, '') -} - -export function getHash (path) { - const match = path.match(hashRE) - if (match) { - return match[0] - } -} - -export function isExternal (path) { - return outboundRE.test(path) -} - -export function isMailto (path) { - return /^mailto:/.test(path) -} - -export function isTel (path) { - return /^tel:/.test(path) -} - -export function ensureExt (path) { - if (isExternal(path)) { - return path - } - const hashMatch = path.match(hashRE) - const hash = hashMatch ? hashMatch[0] : '' - const normalized = normalize(path) - - if (endingSlashRE.test(normalized)) { - return path - } - return normalized + '.html' + hash -} - -export function isActive (route, path) { - const routeHash = decodeURIComponent(route.hash) - const linkHash = getHash(path) - if (linkHash && routeHash !== linkHash) { - return false - } - const routePath = normalize(route.path) - const pagePath = normalize(path) - return routePath === pagePath -} - -export function resolvePage (pages, rawPath, base) { - if (isExternal(rawPath)) { - return { - type: 'external', - path: rawPath - } - } - if (base) { - rawPath = resolvePath(rawPath, base) - } - const path = normalize(rawPath) - for (let i = 0; i < pages.length; i++) { - if (normalize(pages[i].regularPath) === path) { - return Object.assign({}, pages[i], { - type: 'page', - path: ensureExt(pages[i].path) - }) - } - } - console.error(`[vuepress] No matching page found for sidebar item "${rawPath}"`) - return {} -} - -function resolvePath (relative, base, append) { - const firstChar = relative.charAt(0) - if (firstChar === '/') { - return relative - } - - if (firstChar === '?' || firstChar === '#') { - return base + relative - } - - const stack = base.split('/') - - // remove trailing segment if: - // - not appending - // - appending to trailing slash (last segment is empty) - if (!append || !stack[stack.length - 1]) { - stack.pop() - } - - // resolve relative path - const segments = relative.replace(/^\//, '').split('/') - for (let i = 0; i < segments.length; i++) { - const segment = segments[i] - if (segment === '..') { - stack.pop() - } else if (segment !== '.') { - stack.push(segment) - } - } - - // ensure leading slash - if (stack[0] !== '') { - stack.unshift('') - } - - return stack.join('/') -} - -/** - * @param { Page } page - * @param { string } regularPath - * @param { SiteData } site - * @param { string } localePath - * @returns { SidebarGroup } - */ -export function resolveSidebarItems (page, regularPath, site, localePath) { - const { pages, themeConfig } = site - - const localeConfig = localePath && themeConfig.locales - ? themeConfig.locales[localePath] || themeConfig - : themeConfig - - const pageSidebarConfig = page.frontmatter.sidebar || localeConfig.sidebar || themeConfig.sidebar - if (pageSidebarConfig === 'auto') { - return resolveHeaders(page) - } - - const sidebarConfig = localeConfig.sidebar || themeConfig.sidebar - if (!sidebarConfig) { - return [] - } else { - const { base, config } = resolveMatchingConfig(regularPath, sidebarConfig) - if (config === 'auto') { - return resolveHeaders(page) - } - return config - ? config.map(item => resolveItem(item, pages, base)) - : [] - } -} - -/** - * @param { Page } page - * @returns { SidebarGroup } - */ -function resolveHeaders (page) { - const headers = groupHeaders(page.headers || []) - return [{ - type: 'group', - collapsable: false, - title: page.title, - path: null, - children: headers.map(h => ({ - type: 'auto', - title: h.title, - basePath: page.path, - path: page.path + '#' + h.slug, - children: h.children || [] - })) - }] -} - -export function groupHeaders (headers) { - // group h3s under h2 - headers = headers.map(h => Object.assign({}, h)) - let lastH2 - headers.forEach(h => { - if (h.level === 2) { - lastH2 = h - } else if (lastH2) { - (lastH2.children || (lastH2.children = [])).push(h) - } - }) - return headers.filter(h => h.level === 2) -} - -export function resolveNavLinkItem (linkItem) { - return Object.assign(linkItem, { - type: linkItem.items && linkItem.items.length ? 'links' : 'link' - }) -} - -/** - * @param { Route } route - * @param { Array | Array | [link: string]: SidebarConfig } config - * @returns { base: string, config: SidebarConfig } - */ -export function resolveMatchingConfig (regularPath, config) { - if (Array.isArray(config)) { - return { - base: '/', - config: config - } - } - for (const base in config) { - if (ensureEndingSlash(regularPath).indexOf(encodeURI(base)) === 0) { - return { - base, - config: config[base] - } - } - } - return {} -} - -function ensureEndingSlash (path) { - return /(\.html|\/)$/.test(path) - ? path - : path + '/' -} - -function resolveItem (item, pages, base, groupDepth = 1) { - if (typeof item === 'string') { - return resolvePage(pages, item, base) - } else if (Array.isArray(item)) { - return Object.assign(resolvePage(pages, item[0], base), { - title: item[1] - }) - } else { - const children = item.children || [] - if (children.length === 0 && item.path) { - return Object.assign(resolvePage(pages, item.path, base), { - title: item.title - }) - } - return { - type: 'group', - path: item.path, - title: item.title, - sidebarDepth: item.sidebarDepth, - initialOpenGroupIndex: item.initialOpenGroupIndex, - children: children.map(child => resolveItem(child, pages, base, groupDepth + 1)), - collapsable: item.collapsable !== false - } - } -} diff --git a/doc/docs/README.md b/doc/docs/README.md index 098d7da..b7255a2 100755 --- a/doc/docs/README.md +++ b/doc/docs/README.md @@ -1,8 +1,14 @@ --- -home: true -heroImage: ./image/yuescript.svg -actionText: Quick Start → -actionLink: /doc/ +layout: home +hero: + name: YueScript + text: A language that compiles to Lua + image: + src: /image/yuescript.svg + alt: YueScript + actions: + - theme: brand + text: Quick Start → + link: /doc/ footer: MIT Licensed | Copyright © 2017-2026 Li Jin --- - diff --git a/doc/docs/zh/README.md b/doc/docs/zh/README.md index 05b2069..e76a477 100755 --- a/doc/docs/zh/README.md +++ b/doc/docs/zh/README.md @@ -1,8 +1,14 @@ --- -home: true -heroImage: /image/yuescript.svg -actionText: 快速上手 → -actionLink: /zh/doc/ +layout: home +hero: + name: 月之脚本 + text: 一门编译到 Lua 的语言 + image: + src: /image/yuescript.svg + alt: 月之脚本 + actions: + - theme: brand + text: 快速上手 → + link: /zh/doc/ footer: MIT Licensed | Copyright © 2017-2026 Li Jin --- - -- cgit v1.2.3-55-g6feb