themekit-js 1.1.65 → 1.1.67
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/blocks/A.vue +47 -0
- package/dist/client/theme-default/components/blocks/Doc.vue +1 -1
- package/dist/client/theme-default/components/blocks/Features.vue +25 -14
- package/dist/client/theme-default/components/blocks/Heading.vue +33 -0
- package/dist/client/theme-default/components/blocks/P.vue +32 -0
- package/dist/client/theme-default/components/blocks/Text.vue +20 -0
- package/dist/node/cli.js +1 -1
- package/dist/node/index.js +2 -2
- package/dist/node/{serve-Bb2I6QNP.js → serve-px4aah3W.js} +4 -2
- package/package.json +2 -2
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue';
|
|
3
|
+
import Image from './Image.vue';
|
|
4
|
+
import Text from './Text.vue';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
block?:any
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const props = withDefaults(defineProps<Props>(), { })
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
const params = computed(() => {
|
|
16
|
+
const pattern = /[?&]([^=#]+)=([^&#]*)/g;
|
|
17
|
+
let params:any = {};
|
|
18
|
+
let match;
|
|
19
|
+
while ((match = pattern.exec(props.block==null?"":props.block.href)) !== null) {
|
|
20
|
+
params[match[1]] = decodeURIComponent(match[2])
|
|
21
|
+
}
|
|
22
|
+
return params
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const classes = computed(() => {
|
|
26
|
+
const vals:any=["block-a"]
|
|
27
|
+
if(params.value['class']!=null){
|
|
28
|
+
vals.push(params.value['class'])
|
|
29
|
+
}
|
|
30
|
+
return vals
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template >
|
|
36
|
+
<a :class="classes">
|
|
37
|
+
<template v-for="(item) in props.block.children" >
|
|
38
|
+
<Text v-if="item.block_type=='text'" :block="item"></Text>
|
|
39
|
+
<Image v-if="item.block_type=='image'||item.block_type=='img'" :block="item"></Image>
|
|
40
|
+
</template>
|
|
41
|
+
</a>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<style>
|
|
45
|
+
|
|
46
|
+
.block-a img{display: inline-block; float: left;}
|
|
47
|
+
</style>
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import type { DefaultTheme } from 'themekit-js/theme'
|
|
3
3
|
import { computed } from 'vue'
|
|
4
4
|
|
|
5
|
+
import Heading from './Heading.vue';
|
|
5
6
|
import Feature from './Feature.vue';
|
|
7
|
+
import P from './P.vue';
|
|
6
8
|
export interface Feature {
|
|
7
9
|
icon?: DefaultTheme.FeatureIcon
|
|
8
10
|
title: string
|
|
@@ -59,38 +61,47 @@ const styles= computed(() => {
|
|
|
59
61
|
<template >
|
|
60
62
|
<div :style="styles">
|
|
61
63
|
<template v-for="(ul,index) in block.children" >
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
>
|
|
70
|
-
|
|
64
|
+
|
|
65
|
+
<div v-if="ul.block_type=='h1'||ul.block_type=='h2'||ul.block_type=='h3'" class="block-features-title container vp-doc" >
|
|
66
|
+
<Heading :block="ul"></Heading>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="container" v-if="ul.block_type=='p'"> <P :block="ul"></P></div>
|
|
69
|
+
<div v-if="ul.block_type=='ul'" class="VPFeatures" >
|
|
70
|
+
<div class="container">
|
|
71
|
+
<div class="items">
|
|
72
|
+
<div
|
|
73
|
+
v-for="feature in ul.children"
|
|
74
|
+
class="item"
|
|
75
|
+
:class="grids[index]"
|
|
76
|
+
>
|
|
77
|
+
<Feature :block="feature"></Feature>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
71
80
|
</div>
|
|
72
81
|
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
82
|
</template></div>
|
|
76
83
|
</template>
|
|
77
84
|
|
|
78
|
-
<style scoped>
|
|
85
|
+
<style scoped>
|
|
79
86
|
.VPFeatures {
|
|
80
87
|
position: relative;
|
|
81
88
|
padding: 0 24px;
|
|
82
89
|
}
|
|
83
|
-
|
|
90
|
+
|
|
91
|
+
.block-features-title{ padding:12px 0 8px; }
|
|
92
|
+
|
|
84
93
|
@media (min-width: 640px) {
|
|
85
94
|
.VPFeatures {
|
|
86
95
|
padding: 0 48px;
|
|
87
96
|
}
|
|
97
|
+
.block-features-title{ padding: 16px 0 8px; }
|
|
88
98
|
}
|
|
89
99
|
|
|
90
100
|
@media (min-width: 960px) {
|
|
91
101
|
.VPFeatures {
|
|
92
102
|
padding: 0 64px;
|
|
93
|
-
}
|
|
103
|
+
}
|
|
104
|
+
.block-features-title{ padding: 24px 0 8px; }
|
|
94
105
|
}
|
|
95
106
|
|
|
96
107
|
.container {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
block?:any
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const props = withDefaults(defineProps<Props>(), { })
|
|
10
|
+
|
|
11
|
+
const component = computed(() => {
|
|
12
|
+
return props.block ? props.block.block_type : 'h5'
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
//[params['theme']==null?props.theme:params['theme'],params['size']==null?props.size:params['size'],props.baseClass]
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template >
|
|
22
|
+
<component
|
|
23
|
+
:is="component"
|
|
24
|
+
class="block-heading"
|
|
25
|
+
>
|
|
26
|
+
<template v-for="(item) in block.children" >{{item.content}}</template></component>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<style scoped>
|
|
30
|
+
.block-heading{
|
|
31
|
+
margin:0 !important;
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
|
|
3
|
+
import A from './A.vue';
|
|
4
|
+
import Text from './Text.vue';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
block?:any
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(defineProps<Props>(), { })
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
//[params['theme']==null?props.theme:params['theme'],params['size']==null?props.size:params['size'],props.baseClass]
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template >
|
|
17
|
+
<div class="block-p" >
|
|
18
|
+
<template v-for="(item) in props.block.children" >
|
|
19
|
+
<Text v-if="item.block_type=='text'" :block="item"></Text>
|
|
20
|
+
<A v-if="item.block_type=='a'" :block="item"></A>
|
|
21
|
+
</template>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<style scoped>
|
|
26
|
+
.block-p{
|
|
27
|
+
display: block;
|
|
28
|
+
padding-bottom: 8px;
|
|
29
|
+
}
|
|
30
|
+
.block-p img{display: inline-block;
|
|
31
|
+
float: left;}
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
block?:any
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<Props>(), { })
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
//[params['theme']==null?props.theme:params['theme'],params['size']==null?props.size:params['size'],props.baseClass]
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template >
|
|
16
|
+
<p class="block-text" >
|
|
17
|
+
{{props.block.content}}
|
|
18
|
+
</p>
|
|
19
|
+
</template>
|
|
20
|
+
|
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-px4aah3W.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-px4aah3W.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-px4aah3W.js';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import 'crypto';
|
|
7
7
|
import 'module';
|
|
@@ -37155,8 +37155,9 @@ const imagePlugin = (md, { lazyLoading } = {}, base) => {
|
|
|
37155
37155
|
if (url.substring(0, 1) == "/" && base != null) {
|
|
37156
37156
|
url = base + url.substring(1, url.length);
|
|
37157
37157
|
}
|
|
37158
|
-
token.attrSet("src", decodeURIComponent(url));
|
|
37159
37158
|
}
|
|
37159
|
+
if (url)
|
|
37160
|
+
token.attrSet("src", decodeURIComponent(url));
|
|
37160
37161
|
}
|
|
37161
37162
|
if (lazyLoading) {
|
|
37162
37163
|
token.attrSet("loading", "lazy");
|
|
@@ -46740,11 +46741,12 @@ function escapeHtml(string) {
|
|
|
46740
46741
|
|
|
46741
46742
|
var escape$1 = /*@__PURE__*/getDefaultExportFromCjs(escapeHtml_1);
|
|
46742
46743
|
|
|
46743
|
-
var version = "1.1.
|
|
46744
|
+
var version = "1.1.67";
|
|
46744
46745
|
|
|
46745
46746
|
async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags) {
|
|
46746
46747
|
const routePath = `/${page.replace(/\.md$/, "")}`;
|
|
46747
46748
|
const siteData = resolveSiteDataByRoute(config.site, routePath);
|
|
46749
|
+
console.log("routePath:" + routePath);
|
|
46748
46750
|
const context = await render(routePath);
|
|
46749
46751
|
const { content, teleports } = await config.postRender?.(context) ?? context;
|
|
46750
46752
|
const pageName = sanitizeFileName(page.replace(/\//g, "_"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "themekit-js",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.67",
|
|
4
4
|
"description": "基于VitePress开发的Markdown静态网站生成器",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@8.15.6",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"keywords": [
|
|
50
50
|
"vite",
|
|
51
51
|
"vue",
|
|
52
|
-
"
|
|
52
|
+
"themekit-js"
|
|
53
53
|
],
|
|
54
54
|
"author": "Seedunk",
|
|
55
55
|
"license": "MIT",
|