@md-plugins/quasar-app-extension-q-press 0.1.0-alpha.10
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/LICENSE.md +21 -0
- package/README.md +230 -0
- package/old/prompts.js +44 -0
- package/old/uninstall.js +9 -0
- package/package.json +60 -0
- package/scripts/build.js +33 -0
- package/src/index.js +63 -0
- package/src/install.js +49 -0
- package/src/templates/.gitkeep +0 -0
- package/src/templates/init/src/_q-press/.gitkeep +0 -0
- package/src/templates/init/src/_q-press/api/components/DarkModeToggle.json +37 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownApi.json +67 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownApiEntry.json +76 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownCardLink.json +28 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownCardTitle.json +48 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownCode.json +37 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownCodePrism.json +29 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownCodepen.json +21 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownCopyButton.json +36 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownDrawerSidebar.json +17 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownDrawerToc.json +17 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownExample.json +22 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownHeader.json +28 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownHeaderIconLinks.json +16 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownHeaderMenu.json +77 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownHeaderTextLinks.json +33 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownInstallation.json +33 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownLayout.json +52 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownLink.json +23 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownPage.json +71 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownPageFooter.json +21 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownPageSidebar.json +56 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownPageToc.json +17 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownPrerender.json +25 -0
- package/src/templates/init/src/_q-press/api/components/MarkdownTree.json +27 -0
- package/src/templates/init/src/_q-press/api/composables/dark.json +29 -0
- package/src/templates/init/src/_q-press/api/composables/scroll.json +34 -0
- package/src/templates/init/src/_q-press/assets/get-meta.ts +29 -0
- package/src/templates/init/src/_q-press/components/DarkModeToggle.vue +105 -0
- package/src/templates/init/src/_q-press/components/MarkdownApi.vue +588 -0
- package/src/templates/init/src/_q-press/components/MarkdownApiEntry.ts +594 -0
- package/src/templates/init/src/_q-press/components/MarkdownCardLink.vue +25 -0
- package/src/templates/init/src/_q-press/components/MarkdownCardTitle.vue +21 -0
- package/src/templates/init/src/_q-press/components/MarkdownCode.vue +25 -0
- package/src/templates/init/src/_q-press/components/MarkdownCodePrism.ts +36 -0
- package/src/templates/init/src/_q-press/components/MarkdownCodepen.vue +183 -0
- package/src/templates/init/src/_q-press/components/MarkdownCopyButton.vue +104 -0
- package/src/templates/init/src/_q-press/components/MarkdownExample.vue +221 -0
- package/src/templates/init/src/_q-press/components/MarkdownInstallation.vue +166 -0
- package/src/templates/init/src/_q-press/components/MarkdownLink.vue +38 -0
- package/src/templates/init/src/_q-press/components/MarkdownPrerender.ts +82 -0
- package/src/templates/init/src/_q-press/components/MarkdownTree.vue +105 -0
- package/src/templates/init/src/_q-press/components/markdown-utils.ts +105 -0
- package/src/templates/init/src/_q-press/composables/dark.ts +39 -0
- package/src/templates/init/src/_q-press/composables/scroll.ts +115 -0
- package/src/templates/init/src/_q-press/css/app.scss +662 -0
- package/src/templates/init/src/_q-press/css/fonts.scss +100 -0
- package/src/templates/init/src/_q-press/css/prism-theme.scss +298 -0
- package/src/templates/init/src/_q-press/css/themes/default.scss +68 -0
- package/src/templates/init/src/_q-press/css/themes/newspaper.scss +69 -0
- package/src/templates/init/src/_q-press/css/themes/sunrise.scss +67 -0
- package/src/templates/init/src/_q-press/css/themes/tawny.scss +69 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownDrawerSidebar.vue +32 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownDrawerToc.vue +37 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownHeader.vue +412 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownHeaderIconLinks.vue +31 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownHeaderMenu.ts +93 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownHeaderTextLinks.vue +37 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownLayout.vue +239 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownPage.vue +307 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownPageFooter.vue +187 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownPageSidebar.scss +54 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownPageSidebar.ts +218 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownPageToc.vue +23 -0
- package/src/templates/init/src/_q-press/layouts/MarkdownSearch.vue +449 -0
- package/src/templates/init/src/_q-press/stores/markdown.ts +101 -0
- package/src/templates/init/src/components/LandingPage/LandingPage.vue +341 -0
- package/src/templates/init/src/components/Releases/PackageReleases.vue +164 -0
- package/src/templates/init/src/components/Releases/PublicReleases.vue +149 -0
- package/src/templates/init/src/components/Releases/ReleasesAvailable.vue +74 -0
- package/src/templates/init/src/examples/QAvatar/BasicExample.vue +11 -0
- package/src/templates/init/src/markdown/__elements.md +548 -0
- package/src/templates/init/src/markdown/__elements2.md +347 -0
- package/src/templates/init/src/markdown/faq/best-practices.md +0 -0
- package/src/templates/init/src/markdown/faq/general.md +0 -0
- package/src/templates/init/src/markdown/faq/troubleshooting.md +0 -0
- package/src/templates/init/src/markdown/getting-started/introduction.md +67 -0
- package/src/templates/init/src/markdown/guides/contributing.md +101 -0
- package/src/templates/init/src/markdown/guides/faq.md +115 -0
- package/src/templates/init/src/markdown/guides/release-notes.md +0 -0
- package/src/templates/init/src/markdown/guides/style-guide.md +0 -0
- package/src/templates/init/src/markdown/landing-page.md +11 -0
- package/src/templates/init/src/markdown/listing.ts +3 -0
- package/src/templates/init/src/markdown/md-plugins/blockquote/advanced.md +83 -0
- package/src/templates/init/src/markdown/md-plugins/blockquote/overview.md +183 -0
- package/src/templates/init/src/markdown/md-plugins/codeblocks/advanced.md +210 -0
- package/src/templates/init/src/markdown/md-plugins/codeblocks/overview.md +616 -0
- package/src/templates/init/src/markdown/md-plugins/containers/advanced.md +301 -0
- package/src/templates/init/src/markdown/md-plugins/containers/overview.md +206 -0
- package/src/templates/init/src/markdown/md-plugins/frontmatter/advanced.md +164 -0
- package/src/templates/init/src/markdown/md-plugins/frontmatter/overview.md +131 -0
- package/src/templates/init/src/markdown/md-plugins/headers/advanced.md +236 -0
- package/src/templates/init/src/markdown/md-plugins/headers/overview.md +134 -0
- package/src/templates/init/src/markdown/md-plugins/image/advanced.md +114 -0
- package/src/templates/init/src/markdown/md-plugins/image/overview.md +124 -0
- package/src/templates/init/src/markdown/md-plugins/imports/advanced.md +105 -0
- package/src/templates/init/src/markdown/md-plugins/imports/overview.md +80 -0
- package/src/templates/init/src/markdown/md-plugins/inline-code/advanced.md +133 -0
- package/src/templates/init/src/markdown/md-plugins/inline-code/overview.md +101 -0
- package/src/templates/init/src/markdown/md-plugins/link/advanced.md +157 -0
- package/src/templates/init/src/markdown/md-plugins/link/overview.md +126 -0
- package/src/templates/init/src/markdown/md-plugins/shared/overview.md +175 -0
- package/src/templates/init/src/markdown/md-plugins/table/advanced.md +190 -0
- package/src/templates/init/src/markdown/md-plugins/table/overview.md +186 -0
- package/src/templates/init/src/markdown/md-plugins/title/advanced.md +88 -0
- package/src/templates/init/src/markdown/md-plugins/title/overview.md +99 -0
- package/src/templates/init/src/markdown/other/release-notes.md +12 -0
- package/src/templates/init/src/markdown/privacy-policy.md +12 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/advanced.md +101 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/components.md +69 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/overview.md +254 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/qpress/themes.md +4 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/vitemdpluginappext/advanced.md +4 -0
- package/src/templates/init/src/markdown/quasar-app-extensions/vitemdpluginappext/overview.md +103 -0
- package/src/templates/init/src/markdown/vite-plugins/index.md +6 -0
- package/src/templates/init/src/markdown/vite-plugins/viteexamplesplugin/advanced.md +138 -0
- package/src/templates/init/src/markdown/vite-plugins/viteexamplesplugin/overview.md +88 -0
- package/src/templates/init/src/markdown/vite-plugins/vitemdplugin/advanced.md +226 -0
- package/src/templates/init/src/markdown/vite-plugins/vitemdplugin/index.md +6 -0
- package/src/templates/init/src/markdown/vite-plugins/vitemdplugin/overview.md +166 -0
- package/src/templates/init/src/q-press.globals.d.ts +36 -0
- package/src/templates/init/src/siteConfig/index.ts +440 -0
- package/src/templates/update/src/_q-press/.gitkeep +0 -0
- package/src/templates/update/src/_q-press/api/components/DarkModeToggle.json +37 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownApi.json +67 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownApiEntry.json +76 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownCardLink.json +28 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownCardTitle.json +48 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownCode.json +37 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownCodePrism.json +29 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownCodepen.json +21 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownCopyButton.json +36 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownDrawerSidebar.json +17 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownDrawerToc.json +17 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownExample.json +22 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownHeader.json +28 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownHeaderIconLinks.json +16 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownHeaderMenu.json +77 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownHeaderTextLinks.json +33 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownInstallation.json +33 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownLayout.json +52 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownLink.json +23 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownPage.json +71 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownPageFooter.json +21 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownPageSidebar.json +56 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownPageToc.json +17 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownPrerender.json +25 -0
- package/src/templates/update/src/_q-press/api/components/MarkdownTree.json +27 -0
- package/src/templates/update/src/_q-press/api/composables/dark.json +29 -0
- package/src/templates/update/src/_q-press/api/composables/scroll.json +34 -0
- package/src/templates/update/src/_q-press/assets/get-meta.ts +29 -0
- package/src/templates/update/src/_q-press/components/DarkModeToggle.vue +105 -0
- package/src/templates/update/src/_q-press/components/MarkdownApi.vue +588 -0
- package/src/templates/update/src/_q-press/components/MarkdownApiEntry.ts +594 -0
- package/src/templates/update/src/_q-press/components/MarkdownCardLink.vue +25 -0
- package/src/templates/update/src/_q-press/components/MarkdownCardTitle.vue +21 -0
- package/src/templates/update/src/_q-press/components/MarkdownCode.vue +25 -0
- package/src/templates/update/src/_q-press/components/MarkdownCodePrism.ts +36 -0
- package/src/templates/update/src/_q-press/components/MarkdownCodepen.vue +183 -0
- package/src/templates/update/src/_q-press/components/MarkdownCopyButton.vue +104 -0
- package/src/templates/update/src/_q-press/components/MarkdownExample.vue +221 -0
- package/src/templates/update/src/_q-press/components/MarkdownInstallation.vue +166 -0
- package/src/templates/update/src/_q-press/components/MarkdownLink.vue +38 -0
- package/src/templates/update/src/_q-press/components/MarkdownPrerender.ts +82 -0
- package/src/templates/update/src/_q-press/components/MarkdownTree.vue +105 -0
- package/src/templates/update/src/_q-press/components/markdown-utils.ts +105 -0
- package/src/templates/update/src/_q-press/composables/dark.ts +39 -0
- package/src/templates/update/src/_q-press/composables/scroll.ts +115 -0
- package/src/templates/update/src/_q-press/css/app.scss +662 -0
- package/src/templates/update/src/_q-press/css/fonts.scss +100 -0
- package/src/templates/update/src/_q-press/css/prism-theme.scss +298 -0
- package/src/templates/update/src/_q-press/css/themes/default.scss +68 -0
- package/src/templates/update/src/_q-press/css/themes/newspaper.scss +69 -0
- package/src/templates/update/src/_q-press/css/themes/sunrise.scss +67 -0
- package/src/templates/update/src/_q-press/css/themes/tawny.scss +69 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownDrawerSidebar.vue +32 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownDrawerToc.vue +37 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownHeader.vue +412 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownHeaderIconLinks.vue +31 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownHeaderMenu.ts +93 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownHeaderTextLinks.vue +37 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownLayout.vue +239 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownPage.vue +307 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownPageFooter.vue +187 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownPageSidebar.scss +54 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownPageSidebar.ts +218 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownPageToc.vue +23 -0
- package/src/templates/update/src/_q-press/layouts/MarkdownSearch.vue +449 -0
- package/src/templates/update/src/_q-press/stores/markdown.ts +101 -0
- package/src/templates/update/src/q-press.globals.d.ts +36 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-layout class="markdown-layout markdown-technical" view="hHh LpR fff" @scroll="onPageScroll">
|
|
3
|
+
<MarkdownHeader />
|
|
4
|
+
|
|
5
|
+
<q-page-container>
|
|
6
|
+
<q-page :class="pageClass" key="q-page">
|
|
7
|
+
<router-view v-if="isFullscreen" key="page-fullscreen" />
|
|
8
|
+
<div v-else :class="pageContentClass" key="page-standard">
|
|
9
|
+
<div
|
|
10
|
+
v-if="siteConfig.config.useSidebar === true"
|
|
11
|
+
class="markdown-layout__menu-container row justify-center"
|
|
12
|
+
>
|
|
13
|
+
<q-scroll-area class="markdown-layout__menu q-ml-md">
|
|
14
|
+
<MarkdownPageSidebar />
|
|
15
|
+
</q-scroll-area>
|
|
16
|
+
</div>
|
|
17
|
+
<router-view />
|
|
18
|
+
</div>
|
|
19
|
+
</q-page>
|
|
20
|
+
<MarkdownPageFooter :fullscreen="isFullscreen" />
|
|
21
|
+
</q-page-container>
|
|
22
|
+
|
|
23
|
+
<q-page-scroller>
|
|
24
|
+
<q-btn fab-mini color="brand-accent" :icon="mdiArrowUp" aria-label="Back to top">
|
|
25
|
+
<q-tooltip>Back to top</q-tooltip>
|
|
26
|
+
</q-btn>
|
|
27
|
+
</q-page-scroller>
|
|
28
|
+
|
|
29
|
+
<q-no-ssr>
|
|
30
|
+
<MarkdownDrawerSidebar v-if="siteConfig.config.useSidebar === true" />
|
|
31
|
+
<MarkdownDrawerToc v-if="siteConfig.config.useToc === true" />
|
|
32
|
+
</q-no-ssr>
|
|
33
|
+
</q-layout>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script setup lang="ts">
|
|
37
|
+
import { computed } from 'vue'
|
|
38
|
+
import { useRoute } from 'vue-router'
|
|
39
|
+
import { mdiArrowUp } from '@quasar/extras/mdi-v7'
|
|
40
|
+
|
|
41
|
+
// import { useMarkdownStore } from 'src/.q-press/stores/doc'
|
|
42
|
+
import { useScroll } from '../composables/scroll'
|
|
43
|
+
|
|
44
|
+
import MarkdownHeader from './MarkdownHeader.vue'
|
|
45
|
+
import MarkdownDrawerSidebar from './MarkdownDrawerSidebar.vue'
|
|
46
|
+
import MarkdownDrawerToc from './MarkdownDrawerToc.vue'
|
|
47
|
+
import MarkdownPageSidebar from './MarkdownPageSidebar'
|
|
48
|
+
import MarkdownPageFooter from './MarkdownPageFooter.vue'
|
|
49
|
+
|
|
50
|
+
import siteConfig from '../../siteConfig'
|
|
51
|
+
|
|
52
|
+
const { onPageScroll } = useScroll()
|
|
53
|
+
|
|
54
|
+
const route = useRoute()
|
|
55
|
+
// const markdownStore = useMarkdownStore()
|
|
56
|
+
|
|
57
|
+
const isFullscreen = computed(() => route.meta.fullscreen === true)
|
|
58
|
+
const pageClass = computed(
|
|
59
|
+
() => `markdown-layout__page--${isFullscreen.value === true ? 'fullscreen' : 'standard'}`,
|
|
60
|
+
)
|
|
61
|
+
const pageContentClass = computed(
|
|
62
|
+
() =>
|
|
63
|
+
'markdown-layout__page row no-wrap justify-start ' +
|
|
64
|
+
`markdown-layout__page--${route.meta.fullwidth === true ? 'fullwidth' : 'standard'}`,
|
|
65
|
+
)
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style lang="scss">
|
|
69
|
+
.markdown-layout {
|
|
70
|
+
.q-page-container :target {
|
|
71
|
+
scroll-margin-top: $header-height;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// keep the button on top of sticky in examples
|
|
75
|
+
.q-page-scroller > .q-page-sticky {
|
|
76
|
+
z-index: 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&__page {
|
|
80
|
+
width: 100%;
|
|
81
|
+
|
|
82
|
+
&--standard {
|
|
83
|
+
/**
|
|
84
|
+
16px - left menu margin
|
|
85
|
+
+ 330px - left menu
|
|
86
|
+
+ 1200px - page content
|
|
87
|
+
+ 300px - toc menu
|
|
88
|
+
*/
|
|
89
|
+
max-width: 2500px;
|
|
90
|
+
|
|
91
|
+
.markdown-page__content {
|
|
92
|
+
width: auto;
|
|
93
|
+
min-width: 0;
|
|
94
|
+
flex: 10000 1 0%;
|
|
95
|
+
max-width: 1200px;
|
|
96
|
+
|
|
97
|
+
> div,
|
|
98
|
+
> pre {
|
|
99
|
+
margin-bottom: 22px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@media (max-width: 1845px) {
|
|
104
|
+
justify-content: start;
|
|
105
|
+
|
|
106
|
+
.markdown-page__toc-container--flowing {
|
|
107
|
+
display: none;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@media (min-width: 1846px) {
|
|
112
|
+
.markdown-layout__menu-container {
|
|
113
|
+
flex: 1 0 auto;
|
|
114
|
+
width: auto;
|
|
115
|
+
min-width: 0;
|
|
116
|
+
max-width: 100%;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&--fullwidth,
|
|
122
|
+
&--fullscreen {
|
|
123
|
+
.markdown-page__content {
|
|
124
|
+
width: 100%;
|
|
125
|
+
padding: 0 !important;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.markdown-page__toc-container {
|
|
129
|
+
display: none;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&__page-el--standard {
|
|
135
|
+
display: flex;
|
|
136
|
+
flex-direction: column;
|
|
137
|
+
align-items: center;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&__menu {
|
|
141
|
+
position: sticky;
|
|
142
|
+
top: $header-height;
|
|
143
|
+
height: calc(100vh - #{$header-height});
|
|
144
|
+
width: 330px;
|
|
145
|
+
min-width: 330px;
|
|
146
|
+
border-right: 1px solid $separator-color;
|
|
147
|
+
|
|
148
|
+
.markdown-page-menu {
|
|
149
|
+
padding: 32px 16px 32px 0; // page top padding
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&__item.q-item,
|
|
154
|
+
&__item .q-item {
|
|
155
|
+
letter-spacing: $letter-spacing-brand;
|
|
156
|
+
border-radius: 10px;
|
|
157
|
+
margin-top: 2px;
|
|
158
|
+
min-height: 30px;
|
|
159
|
+
padding: 0 4px 0 6px;
|
|
160
|
+
color: $light-text;
|
|
161
|
+
transition: none;
|
|
162
|
+
|
|
163
|
+
&:hover {
|
|
164
|
+
color: #000 !important; // $header-btn-hover-color--light makes little difference
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.q-item__section {
|
|
168
|
+
padding-top: 2px;
|
|
169
|
+
padding-bottom: 2px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&.q-item--dark {
|
|
173
|
+
color: $dark-text;
|
|
174
|
+
|
|
175
|
+
&:hover {
|
|
176
|
+
color: $header-btn-hover-color--dark !important;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.q-item__section--main ~ .q-item__section--side {
|
|
181
|
+
padding-left: 4px;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&__item .q-expansion-item > .q-expansion-item__container > .q-item .q-item__label {
|
|
186
|
+
padding-left: 8.5px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&__item--active {
|
|
190
|
+
color: $brand-primary !important;
|
|
191
|
+
background: scale-color($primary, $lightness: 90%);
|
|
192
|
+
|
|
193
|
+
&.q-item--dark {
|
|
194
|
+
background: scale-color($primary, $lightness: -50%);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@media (max-width: 1300px) {
|
|
200
|
+
.markdown-layout__menu,
|
|
201
|
+
.markdown-page__toc-container--flowing {
|
|
202
|
+
// let's position them off-screen
|
|
203
|
+
// instead of "display: none"
|
|
204
|
+
// so that QScrollArea won't compute the size uselessly
|
|
205
|
+
position: fixed;
|
|
206
|
+
left: -1000px;
|
|
207
|
+
top: 0;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.markdown-drawer {
|
|
212
|
+
// only show the shadow when the drawer is open
|
|
213
|
+
.q-drawer:not(.q-layout--prevent-focus) & {
|
|
214
|
+
box-shadow: 0 0 6px 3px $separator-color;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
&__header {
|
|
218
|
+
position: sticky;
|
|
219
|
+
top: 0;
|
|
220
|
+
z-index: 1;
|
|
221
|
+
background: linear-gradient(to bottom, #fff 0%, #fff 75%, transparent);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
body.body--dark {
|
|
226
|
+
.markdown-layout__menu {
|
|
227
|
+
border-right-color: $separator-dark-color;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// only show the shadow when the drawer is open
|
|
231
|
+
.q-drawer:not(.q-layout--prevent-focus) .markdown-drawer {
|
|
232
|
+
box-shadow: 0 0 6px 3px $brand-primary;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.markdown-drawer__header {
|
|
236
|
+
background: linear-gradient(to bottom, $dark 0%, $dark 75%, transparent);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
</style>
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="markdown-page__content">
|
|
3
|
+
<div v-if="!isFullscreen && props.overline" class="markdown-page__overline text-brand-primary">
|
|
4
|
+
{{ props.overline }}
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<div v-if="!isFullscreen && props.title" class="markdown-heading markdown-h1" id="introduction">
|
|
8
|
+
<div class="row items-center q-gutter-sm">
|
|
9
|
+
<div>{{ props.title }}</div>
|
|
10
|
+
<q-badge v-if="props.badge" :label="props.badge" />
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<q-space />
|
|
14
|
+
|
|
15
|
+
<q-btn
|
|
16
|
+
v-if="props.editLink"
|
|
17
|
+
class="self-start q-ml-sm"
|
|
18
|
+
:href="editHref"
|
|
19
|
+
target="_blank"
|
|
20
|
+
rel="noopener noreferrer"
|
|
21
|
+
flat
|
|
22
|
+
round
|
|
23
|
+
color="brand-primary"
|
|
24
|
+
:icon="mdiPencil"
|
|
25
|
+
>
|
|
26
|
+
<q-tooltip class="row no-wrap items-center">
|
|
27
|
+
<span>Caught a mistake? Edit this page in browser</span>
|
|
28
|
+
<q-icon class="q-ml-xs" :name="mdiFlash" size="2em" />
|
|
29
|
+
</q-tooltip>
|
|
30
|
+
</q-btn>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div class="markdown-page__nav" v-if="props.related">
|
|
34
|
+
<div class="q-gutter-sm flex">
|
|
35
|
+
<router-link
|
|
36
|
+
class="q-link markdown-page__related rounded-borders cursor-pointer column justify-center"
|
|
37
|
+
v-for="link in props.related"
|
|
38
|
+
:key="link.category + link.path"
|
|
39
|
+
:to="link.path"
|
|
40
|
+
>
|
|
41
|
+
<div class="markdown-page__nav-categ">{{ link.category || 'Docs' }}</div>
|
|
42
|
+
<div class="markdown-page__nav-name text-weight-bold row items-center no-wrap">
|
|
43
|
+
<div class="q-mr-xs">{{ link.name }}</div>
|
|
44
|
+
<q-icon :name="mdiLaunch" />
|
|
45
|
+
</div>
|
|
46
|
+
</router-link>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<slot />
|
|
51
|
+
|
|
52
|
+
<div class="markdown-page__nav markdown-page__nav--footer" v-if="props.nav">
|
|
53
|
+
<div class="text-h6 q-pb-md markdown-heading">Ready for more?</div>
|
|
54
|
+
<div class="q-gutter-sm flex">
|
|
55
|
+
<router-link
|
|
56
|
+
v-for="link in props.nav"
|
|
57
|
+
:key="link.category + link.path"
|
|
58
|
+
:to="link.path"
|
|
59
|
+
class="q-link markdown-page__related rounded-borders cursor-pointer column justify-center"
|
|
60
|
+
:class="link.classes"
|
|
61
|
+
>
|
|
62
|
+
<div class="markdown-page__nav-categ">{{ link.category || 'Docs' }}</div>
|
|
63
|
+
<div class="markdown-page__nav-name text-weight-bold">{{ link.name }}</div>
|
|
64
|
+
</router-link>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<div class="markdown-page__content-footer" v-if="props.editLink">
|
|
69
|
+
<q-separator class="q-mb-sm" />
|
|
70
|
+
|
|
71
|
+
<div class="q-mb-md">
|
|
72
|
+
<span>Caught a mistake?</span>
|
|
73
|
+
<MarkdownLink class="q-ml-xs" :to="editHref">Edit this page in browser</MarkdownLink>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div
|
|
79
|
+
v-if="hasToc"
|
|
80
|
+
class="markdown-page__toc-container col-grow row justify-center gt-sm"
|
|
81
|
+
:class="tocClass"
|
|
82
|
+
>
|
|
83
|
+
<q-scroll-area class="markdown-page__toc-area">
|
|
84
|
+
<MarkdownPageToc />
|
|
85
|
+
</q-scroll-area>
|
|
86
|
+
</div>
|
|
87
|
+
</template>
|
|
88
|
+
|
|
89
|
+
<script setup lang="ts">
|
|
90
|
+
import { useMeta } from 'quasar'
|
|
91
|
+
import { computed } from 'vue'
|
|
92
|
+
import { useRoute } from 'vue-router'
|
|
93
|
+
|
|
94
|
+
import { mdiPencil, mdiFlash, mdiLaunch } from '@quasar/extras/mdi-v7'
|
|
95
|
+
|
|
96
|
+
import type { NavItem, RelatedItem } from '@md-plugins/vite-md-plugin'
|
|
97
|
+
import type { TocItem } from '@md-plugins/md-plugin-headers'
|
|
98
|
+
import MarkdownLink from '../components/MarkdownLink.vue'
|
|
99
|
+
import MarkdownPageToc from './MarkdownPageToc.vue'
|
|
100
|
+
|
|
101
|
+
import getMeta from '../assets/get-meta'
|
|
102
|
+
import { useMarkdownStore } from '../stores/markdown'
|
|
103
|
+
import siteConfig from '../../siteConfig'
|
|
104
|
+
|
|
105
|
+
const props = defineProps({
|
|
106
|
+
title: String,
|
|
107
|
+
desc: String,
|
|
108
|
+
overline: String,
|
|
109
|
+
badge: String,
|
|
110
|
+
|
|
111
|
+
fullscreen: Boolean,
|
|
112
|
+
|
|
113
|
+
heading: Boolean,
|
|
114
|
+
editLink: String,
|
|
115
|
+
|
|
116
|
+
toc: Array<TocItem>,
|
|
117
|
+
related: Array<RelatedItem>,
|
|
118
|
+
nav: Array<NavItem>,
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
useMeta(
|
|
122
|
+
props.desc !== void 0
|
|
123
|
+
? {
|
|
124
|
+
title: props.title ?? '',
|
|
125
|
+
meta: getMeta(`${props.title ?? ''} || ${siteConfig.title ?? ''}`, props.desc),
|
|
126
|
+
}
|
|
127
|
+
: { title: props.title ?? '' },
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
const route = useRoute()
|
|
131
|
+
const markdownStore = useMarkdownStore()
|
|
132
|
+
|
|
133
|
+
// console.log('toc', props.toc)
|
|
134
|
+
|
|
135
|
+
if (props.toc !== void 0) {
|
|
136
|
+
markdownStore.setToc(props.toc)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const editHref = computed(() => `${siteConfig.githubEditRoot}${props.editLink}.md`)
|
|
140
|
+
|
|
141
|
+
const isFullscreen = computed(() => route.meta.fullscreen === true || props.fullscreen)
|
|
142
|
+
|
|
143
|
+
const hasToc = computed(
|
|
144
|
+
() =>
|
|
145
|
+
route.meta.fullwidth !== true &&
|
|
146
|
+
route.meta.fullscreen !== true &&
|
|
147
|
+
props.fullscreen !== true &&
|
|
148
|
+
siteConfig.config.useToc &&
|
|
149
|
+
markdownStore.toc.length !== 0,
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
const tocClass = computed(
|
|
153
|
+
() => `markdown-page__toc-container--${props.toc !== void 0 ? 'fixed' : 'flowing'}`,
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
console.log('MarkdownPage props', props)
|
|
157
|
+
</script>
|
|
158
|
+
|
|
159
|
+
<style lang="scss">
|
|
160
|
+
.markdown-page {
|
|
161
|
+
&__content {
|
|
162
|
+
padding: 80px 42px;
|
|
163
|
+
line-height: 1.5em;
|
|
164
|
+
|
|
165
|
+
@media (max-width: 1300px) {
|
|
166
|
+
padding: 32px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@media (max-width: 850px) {
|
|
170
|
+
padding: 32px 16px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
> .q-btn {
|
|
174
|
+
background: $brand-accent;
|
|
175
|
+
color: #fff;
|
|
176
|
+
font-weight: 700;
|
|
177
|
+
font-size: $font-size;
|
|
178
|
+
letter-spacing: $letter-spacing-brand;
|
|
179
|
+
padding: 8px 16px;
|
|
180
|
+
text-transform: none;
|
|
181
|
+
|
|
182
|
+
.on-right {
|
|
183
|
+
margin-left: 8px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.on-left {
|
|
187
|
+
margin-right: 8px;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&__toc-container {
|
|
193
|
+
position: sticky;
|
|
194
|
+
top: $header-height;
|
|
195
|
+
height: calc(100vh - #{$header-height});
|
|
196
|
+
min-width: 300px !important;
|
|
197
|
+
|
|
198
|
+
&--fixed {
|
|
199
|
+
.markdown-page__toc {
|
|
200
|
+
padding: 32px 16px 32px 0; // page top padding
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&__toc-area {
|
|
206
|
+
width: 300px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&__toc {
|
|
210
|
+
font-size: ($font-size - 2px);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&__content-footer {
|
|
214
|
+
margin-top: 64px;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
&__overline {
|
|
218
|
+
letter-spacing: $letter-spacing-brand;
|
|
219
|
+
margin-bottom: 0 !important;
|
|
220
|
+
|
|
221
|
+
& + .markdown-h1 {
|
|
222
|
+
margin-top: 0 !important;
|
|
223
|
+
padding-top: 0 !important;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&__related {
|
|
228
|
+
transition: color $header-transition;
|
|
229
|
+
word-break: break-word;
|
|
230
|
+
line-height: 1.4em;
|
|
231
|
+
padding: 16px 20px;
|
|
232
|
+
|
|
233
|
+
&:hover {
|
|
234
|
+
color: $brand-primary !important;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
&--left {
|
|
238
|
+
justify-content: flex-start;
|
|
239
|
+
text-align: left;
|
|
240
|
+
|
|
241
|
+
.markdown-page__nav-name:before {
|
|
242
|
+
content: '« ';
|
|
243
|
+
font-size: 1.2em;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
&--right {
|
|
248
|
+
justify-content: flex-end;
|
|
249
|
+
text-align: right;
|
|
250
|
+
|
|
251
|
+
.markdown-page__nav-name:after {
|
|
252
|
+
content: ' »';
|
|
253
|
+
font-size: 1.2em;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&__nav {
|
|
259
|
+
color: $brand-light-text;
|
|
260
|
+
|
|
261
|
+
&--footer {
|
|
262
|
+
margin: 68px 0 0;
|
|
263
|
+
margin-bottom: 0 !important;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
& + & {
|
|
267
|
+
margin-top: 0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&-categ {
|
|
271
|
+
font-size: 0.9em;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&-name {
|
|
275
|
+
letter-spacing: $letter-spacing-brand;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
body.body--light .markdown-page {
|
|
281
|
+
&__related {
|
|
282
|
+
color: $light-text;
|
|
283
|
+
background: $brand-light;
|
|
284
|
+
border: 1px solid $light-text; // match dark to avoid page reflow
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
&__toc-container .q-item {
|
|
288
|
+
color: $header-btn-color--light;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
body.body--dark .markdown-page {
|
|
293
|
+
&__related {
|
|
294
|
+
color: $dark-text;
|
|
295
|
+
background: $brand-dark;
|
|
296
|
+
border: 1px solid $dark-text;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
&__nav-name {
|
|
300
|
+
color: $brand-dark-text;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
&__toc-container .q-item {
|
|
304
|
+
color: $header-btn-color--dark;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
</style>
|