themekit-js 1.48.909 → 1.48.923
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/dist/client/theme-default/components/TKBlock.vue +6 -3
- package/dist/client/theme-default/components/blocks/DocWithCatalog.vue +108 -0
- package/dist/client/theme-default/components/blocks/Hero.vue +4 -5
- package/dist/client/theme-default/composables/sidebar.js +2 -0
- package/dist/node/cli.js +1 -1
- package/dist/node/index.js +2 -2
- package/dist/node/{serve-BjXVGKTy.js → serve-BfzKQspH.js} +2 -2
- package/package.json +1 -1
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
import { useData } from '../composables/data'
|
|
4
4
|
import Hero from './blocks/Hero.vue';
|
|
5
5
|
import Doc from './blocks/Doc.vue';
|
|
6
|
+
import DocWithCatalog from './blocks/DocWithCatalog.vue'
|
|
6
7
|
import Notion from './blocks/Notion.vue';
|
|
7
8
|
import HTML from './blocks/HTML.vue';
|
|
8
9
|
import Features from './blocks/Features.vue';
|
|
9
10
|
const { frontmatter } = useData()
|
|
11
|
+
|
|
10
12
|
</script>
|
|
11
13
|
|
|
12
14
|
<template>
|
|
@@ -16,13 +18,14 @@ const { frontmatter } = useData()
|
|
|
16
18
|
<Hero :block="item" v-if="item.block_type =='Hero'"></Hero>
|
|
17
19
|
<Features :block="item" v-else-if="item.block_type =='Features'"></Features>
|
|
18
20
|
<Doc :block="item" v-else-if="item.block_type =='Doc'" ></Doc>
|
|
21
|
+
<DocWithCatalog :block="item" v-else-if="item.block_type =='DocWithCatalog'" ></DocWithCatalog>
|
|
19
22
|
<Notion :block="item" v-else-if="item.block_type =='Notion'" ></Notion>
|
|
20
|
-
<HTML :block="item" v-else-if="item.block_type =='HTML'" ></HTML>
|
|
21
|
-
|
|
22
|
-
</div>
|
|
23
|
+
<HTML :block="item" v-else-if="item.block_type =='HTML'" ></HTML>
|
|
24
|
+
</div>
|
|
23
25
|
<VPHomeContent v-if="frontmatter.markdownStyles !== false">
|
|
24
26
|
<Content />
|
|
25
27
|
</VPHomeContent>
|
|
28
|
+
|
|
26
29
|
<Content v-else />
|
|
27
30
|
</div>
|
|
28
31
|
</template>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
const { block} =defineProps<{
|
|
4
|
+
block?: any
|
|
5
|
+
}>()
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
import { useSidebar } from '../../composables/sidebar'
|
|
9
|
+
import VPDocAside from '../VPDocAside.vue'
|
|
10
|
+
const { hasAside,hasSidebar } = useSidebar()
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
import{ useData } from 'themekit-js'
|
|
14
|
+
const { base } = useData()
|
|
15
|
+
const styles= computed(() => {
|
|
16
|
+
|
|
17
|
+
let styles:any=[ ];
|
|
18
|
+
if(block['background']){
|
|
19
|
+
styles.push({ 'background':block['background']})
|
|
20
|
+
}
|
|
21
|
+
if(block['background-color']){
|
|
22
|
+
styles.push({ 'background-color':block['background-color']})
|
|
23
|
+
}
|
|
24
|
+
if(block['background-image']){
|
|
25
|
+
const src=block['background-image']
|
|
26
|
+
if(src.substring(0,1)=="/"){
|
|
27
|
+
styles.push({"background-image":"url("+ base.value+src.substring(1,src.length) +")"})
|
|
28
|
+
}else{
|
|
29
|
+
styles.push({"background-image":"url("+ src +")"})
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if(block['width']){
|
|
33
|
+
styles.push({ 'width':block['width']})
|
|
34
|
+
}
|
|
35
|
+
if(block['height']){
|
|
36
|
+
styles.push({ 'height':block['height']})
|
|
37
|
+
}
|
|
38
|
+
if(block['color']){
|
|
39
|
+
styles.push({ 'color':block['color']})
|
|
40
|
+
}
|
|
41
|
+
return styles
|
|
42
|
+
})
|
|
43
|
+
</script>
|
|
44
|
+
<template>
|
|
45
|
+
<div class="container" >
|
|
46
|
+
<div class="vp-doc VPDoc" v-if="block!=null " :style="styles" v-html="block.content" ></div>
|
|
47
|
+
<div :class="{ 'has-sidebar': hasSidebar, 'has-aside': hasAside }" style="margin-top:48px;">
|
|
48
|
+
<div class="aside-curtain" />
|
|
49
|
+
<div class="aside-container">
|
|
50
|
+
<div class="aside-content">
|
|
51
|
+
<VPDocAside>
|
|
52
|
+
<template #aside-top><slot name="aside-top" /></template>
|
|
53
|
+
<template #aside-bottom><slot name="aside-bottom" /></template>
|
|
54
|
+
<template #aside-outline-before><slot name="aside-outline-before" /></template>
|
|
55
|
+
<template #aside-outline-after><slot name="aside-outline-after" /></template>
|
|
56
|
+
<template #aside-ads-before><slot name="aside-ads-before" /></template>
|
|
57
|
+
<template #aside-ads-after><slot name="aside-ads-after" /></template>
|
|
58
|
+
</VPDocAside>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<style scoped>
|
|
67
|
+
.vp-doc{ max-width: 100%;flex:1;}
|
|
68
|
+
|
|
69
|
+
.container {
|
|
70
|
+
display: flex;
|
|
71
|
+
gap: 64px;
|
|
72
|
+
margin: auto;
|
|
73
|
+
width: 100%;
|
|
74
|
+
max-width: 1280px;
|
|
75
|
+
padding: 0 24px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@media (min-width: 640px) {
|
|
79
|
+
.container {
|
|
80
|
+
padding: 0 48px;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media (min-width: 960px) {
|
|
85
|
+
.container {
|
|
86
|
+
width: 100%;
|
|
87
|
+
padding: 0 64px;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.vp-doc :deep(.VPHomeSponsors),
|
|
92
|
+
.vp-doc :deep(.VPTeamPage) {
|
|
93
|
+
margin-left: var(--vp-offset, calc(50% - 50vw));
|
|
94
|
+
margin-right: var(--vp-offset, calc(50% - 50vw));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.vp-doc :deep(.VPHomeSponsors h2) {
|
|
98
|
+
border-top: none;
|
|
99
|
+
letter-spacing: normal;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.vp-doc :deep(.VPHomeSponsors a),
|
|
103
|
+
.vp-doc :deep(.VPTeamPage a){
|
|
104
|
+
text-decoration: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</style>
|
|
@@ -141,13 +141,12 @@ const styles= computed(() => {
|
|
|
141
141
|
</div>
|
|
142
142
|
</template>
|
|
143
143
|
|
|
144
|
-
<style scoped>
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
<style scoped>
|
|
145
|
+
.hero-frame{ display: flex; position: relative; background-size: cover;
|
|
146
|
+
background-position: center; }
|
|
147
147
|
.VPHero {
|
|
148
148
|
padding: 64px 24px;
|
|
149
|
-
|
|
150
|
-
background-position: center;
|
|
149
|
+
|
|
151
150
|
margin: 0 auto;
|
|
152
151
|
max-width: 1152px;
|
|
153
152
|
flex: 1 ;align-self: center
|
|
@@ -32,6 +32,8 @@ export function useSidebar() {
|
|
|
32
32
|
});
|
|
33
33
|
const hasAside = computed(() => {
|
|
34
34
|
//@seedunk if (frontmatter.value.layout === 'home') return false
|
|
35
|
+
if (frontmatter.value.layout == 'block')
|
|
36
|
+
return true;
|
|
35
37
|
if (frontmatter.value.layout !== 'doc')
|
|
36
38
|
return false;
|
|
37
39
|
if (frontmatter.value.aside != null)
|
package/dist/node/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getDefaultExportFromCjs, q as c, t as clearCache, n as init, b as build, o as serve, v as version, p as createServer } from './serve-
|
|
1
|
+
import { a as getDefaultExportFromCjs, q as c, t as clearCache, n as init, b as build, o as serve, v as version, p as createServer } from './serve-BfzKQspH.js';
|
|
2
2
|
import { createLogger } from 'vite';
|
|
3
3
|
import 'path';
|
|
4
4
|
import 'shiki';
|
package/dist/node/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizePath } from 'vite';
|
|
2
2
|
export { loadEnv } from 'vite';
|
|
3
|
-
import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, a as getDefaultExportFromCjs } from './serve-
|
|
4
|
-
export { S as ScaffoldThemeType, b as build, p as createServer, e as defineConfig, h as defineConfigWithTheme, d as defineLoader, n as init, j as mergeConfig, r as resolveConfig, l as resolvePages, k as resolveSiteData, i as resolveUserConfig, s as scaffold, o as serve } from './serve-
|
|
3
|
+
import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, a as getDefaultExportFromCjs } from './serve-BfzKQspH.js';
|
|
4
|
+
export { S as ScaffoldThemeType, b as build, p as createServer, e as defineConfig, h as defineConfigWithTheme, d as defineLoader, n as init, j as mergeConfig, r as resolveConfig, l as resolvePages, k as resolveSiteData, i as resolveUserConfig, s as scaffold, o as serve } from './serve-BfzKQspH.js';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import 'crypto';
|
|
7
7
|
import 'module';
|
|
@@ -38332,7 +38332,7 @@ async function createMarkdownToVueRenderFn(srcDir, options = {}, pages, isBuild
|
|
|
38332
38332
|
const blockTypeRegex = /(?<=<!--#).*?(?=-->)/g;
|
|
38333
38333
|
const blockType = blockTypeRegex.exec(block);
|
|
38334
38334
|
let blockContent = "";
|
|
38335
|
-
if (blockType == null) ; else if (blockType[0] == "Doc" || blockType[0] == "Github") {
|
|
38335
|
+
if (blockType == null) ; else if (blockType[0] == "Doc" || blockType[0] == "Github" || blockType[0] == "DocWithCatalog") {
|
|
38336
38336
|
blockContent = md.render(block, env);
|
|
38337
38337
|
} else if (blockType[0] == "HTML") {
|
|
38338
38338
|
blockContent = encodeURIComponent(block);
|
|
@@ -46744,7 +46744,7 @@ function escapeHtml(string) {
|
|
|
46744
46744
|
|
|
46745
46745
|
var escape$1 = /*@__PURE__*/getDefaultExportFromCjs(escapeHtml_1);
|
|
46746
46746
|
|
|
46747
|
-
var version = "1.48.
|
|
46747
|
+
var version = "1.48.0923";
|
|
46748
46748
|
|
|
46749
46749
|
async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags) {
|
|
46750
46750
|
const routePath = `/${page.replace(/\.md$/, "")}`;
|