-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e28cef8
commit 64e84a6
Showing
12 changed files
with
223 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export const PREVIEW_URL = | ||
'//www.mpxjs.cn/mpx-cube-ui/demo-theme-passenger/index.html' | ||
|
||
export const THEME = 'passenger' | ||
|
||
export const DOCS_HOST = 'https://www.mpxjs.cn/mpx-cube-ui/' | ||
|
||
export const EXAMPLE_DOC_PORT = 8090 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ export default md => { | |
}).value, lang) | ||
} | ||
} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<script setup lang="ts"> | ||
import NotFound from 'vitepress/dist/client/theme-default/NotFound.vue' | ||
import { useData } from 'vitepress/dist/client/theme-default/composables/data' | ||
import { useSidebar } from 'vitepress/dist/client/theme-default/composables/sidebar' | ||
import VPDoc from 'vitepress/dist/client/theme-default/components/VPDoc.vue' | ||
import VPHome from 'vitepress/dist/client/theme-default/components/VPHome.vue' | ||
import VPPage from 'vitepress/dist/client/theme-default/components/VPPage.vue' | ||
const { page, frontmatter } = useData() | ||
const { hasSidebar } = useSidebar() | ||
</script> | ||
|
||
<template> | ||
<div | ||
class="VPContent" | ||
id="VPContent" | ||
:class="{ | ||
'has-sidebar': hasSidebar, | ||
'is-home': frontmatter.layout === 'home' | ||
}" | ||
> | ||
<slot name="not-found" v-if="page.isNotFound"><NotFound /></slot> | ||
|
||
<VPPage v-else-if="frontmatter.layout === 'page'"> | ||
<template #page-top><slot name="page-top" /></template> | ||
<template #page-bottom><slot name="page-bottom" /></template> | ||
</VPPage> | ||
|
||
<VPHome v-else-if="frontmatter.layout === 'home'"> | ||
<template #home-hero-before><slot name="home-hero-before" /></template> | ||
<template #home-hero-info-before><slot name="home-hero-info-before" /></template> | ||
<template #home-hero-info><slot name="home-hero-info" /></template> | ||
<template #home-hero-info-after><slot name="home-hero-info-after" /></template> | ||
<template #home-hero-actions-after><slot name="home-hero-actions-after" /></template> | ||
<template #home-hero-image><slot name="home-hero-image" /></template> | ||
<template #home-hero-after><slot name="home-hero-after" /></template> | ||
<template #home-features-before><slot name="home-features-before" /></template> | ||
<template #home-features-after><slot name="home-features-after" /></template> | ||
</VPHome> | ||
|
||
<component | ||
v-else-if="frontmatter.layout && frontmatter.layout !== 'doc'" | ||
:is="frontmatter.layout" | ||
/> | ||
|
||
<VPDoc v-else> | ||
<template #doc-top><slot name="doc-top" /></template> | ||
<template #doc-bottom><slot name="doc-bottom" /></template> | ||
|
||
<template #doc-footer-before><slot name="doc-footer-before" /></template> | ||
<template #doc-before><slot name="doc-before" /></template> | ||
<template #doc-after><slot name="doc-after" /></template> | ||
|
||
<template #aside-top><slot name="aside-top" /></template> | ||
<template #aside-outline-before><slot name="aside-outline-before" /></template> | ||
<template #aside-outline-after><slot name="aside-outline-after" /></template> | ||
<template #aside-ads-before><slot name="aside-ads-before" /></template> | ||
<template #aside-ads-after><slot name="aside-ads-after" /></template> | ||
<template #aside-bottom><slot name="aside-bottom" /></template> | ||
</VPDoc> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.VPContent { | ||
flex-grow: 1; | ||
flex-shrink: 0; | ||
margin: var(--vp-layout-top-height, 0px) auto 0; | ||
width: 100%; | ||
} | ||
.VPContent.is-home { | ||
width: 100%; | ||
max-width: 100%; | ||
} | ||
.VPContent.has-sidebar { | ||
margin: 0; | ||
} | ||
@media (min-width: 960px) { | ||
.VPContent { | ||
padding-top: var(--vp-nav-height); | ||
} | ||
.VPContent.has-sidebar { | ||
margin: var(--vp-layout-top-height, 0px) 0 0; | ||
padding-left: var(--vp-sidebar-width); | ||
} | ||
} | ||
@media (min-width: 1440px) { | ||
.VPContent.has-sidebar { | ||
padding-right: calc((100vw - var(--vp-layout-max-width)) / 2); | ||
padding-left: calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width)); | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
import DefaultTheme from 'vitepress/theme' | ||
// import { defineConfig } from 'vitepress' | ||
import Layout from './layouts/Layout.vue' | ||
|
||
|
||
export default { | ||
extend: DefaultTheme, | ||
Layout: DefaultTheme.Layout | ||
Layout: Layout, | ||
enhanceApp({ router }) { | ||
router.go('/mpx-ui/guide/button.html') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.