themekit-js 1.47.2918 → 1.47.3018
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/Feature.vue +102 -70
- package/dist/client/theme-default/components/blocks/Feature.vue_240730 +214 -0
- package/dist/client/theme-default/components/blocks/Features.vue +7 -7
- package/dist/node/cli.js +1 -1
- package/dist/node/index.js +2 -2
- package/dist/node/{serve-Co6mVlDt.js → serve-C1giFHyt.js} +4 -6
- package/package.json +1 -1
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import Image from './Image.vue'
|
|
3
3
|
import Button from './Button.vue'
|
|
4
|
-
|
|
5
|
-
import { useData } from '../../composables/data'
|
|
6
4
|
|
|
7
|
-
const { base } = useData()
|
|
8
5
|
const _blank:string="_blank"
|
|
9
6
|
|
|
10
7
|
defineProps<{
|
|
@@ -13,17 +10,17 @@ defineProps<{
|
|
|
13
10
|
|
|
14
11
|
|
|
15
12
|
|
|
13
|
+
/**
|
|
14
|
+
|
|
15
|
+
function CoverStyles(children:any){
|
|
16
|
+
return itemStyles(children,"cover" );
|
|
17
|
+
}*/
|
|
18
|
+
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
function hasCover(children:any){
|
|
21
|
-
return hasParam(children,"cover" );
|
|
22
|
-
}
|
|
23
|
-
function hasParam(children:any,name:string ){
|
|
20
|
+
|
|
21
|
+
function ItemStyles(child:any,name:string ){
|
|
24
22
|
const styles:any=[]
|
|
25
|
-
|
|
26
|
-
const child=children[i]
|
|
23
|
+
|
|
27
24
|
if(child["src"]!=null ){
|
|
28
25
|
const src=child["src"]
|
|
29
26
|
const pattern = /[?&]([^=#]+)=([^&#]*)/g;
|
|
@@ -33,62 +30,90 @@ function hasParam(children:any,name:string ){
|
|
|
33
30
|
params[match[1]]=match[2]
|
|
34
31
|
}
|
|
35
32
|
if(params["class"]==name){
|
|
36
|
-
|
|
37
|
-
if(src.substring(0,1)=="/"){
|
|
38
|
-
styles.push({"background-image":"url("+ base.value+src.substring(1,src.length) +")"})
|
|
39
|
-
}else{
|
|
40
|
-
styles.push({"background-image":"url("+ src +")"})
|
|
41
|
-
}
|
|
42
|
-
if(params["color"]){
|
|
43
|
-
styles.push({"color": decodeURIComponent(params["color"])})
|
|
44
|
-
}
|
|
33
|
+
styles.push({"display":"block"})
|
|
45
34
|
if(params["background"]){
|
|
46
35
|
styles.push({"background":decodeURIComponent(params["background"])})
|
|
47
|
-
|
|
48
36
|
}
|
|
49
37
|
if(params["height"]){
|
|
50
38
|
styles.push({"height":params["height"]})
|
|
51
39
|
}
|
|
52
40
|
}
|
|
53
41
|
}
|
|
54
|
-
|
|
42
|
+
|
|
55
43
|
return styles
|
|
56
44
|
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
function hasImageParam(child:any,name:string ){
|
|
48
|
+
|
|
49
|
+
if(child["src"]!=null ){
|
|
50
|
+
const src=child["src"]
|
|
51
|
+
const pattern = /[?&]([^=#]+)=([^&#]*)/g;
|
|
52
|
+
const params:any={}
|
|
53
|
+
let match;
|
|
54
|
+
while ((match = pattern.exec(src)) !== null) {
|
|
55
|
+
params[match[1]]=match[2]
|
|
56
|
+
}
|
|
57
|
+
if(params["class"]!=null&& params["class"]==name){
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
57
63
|
</script>
|
|
58
64
|
|
|
59
65
|
<template>
|
|
60
66
|
<div class="VPFeature" >
|
|
61
67
|
<article class="box">
|
|
62
|
-
<template
|
|
63
|
-
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
68
|
+
<template v-for="(item) in block.children" >
|
|
69
|
+
<template v-for="(subitem) in item.children">
|
|
70
|
+
<template v-if="hasImageParam(subitem,'masker')" >
|
|
71
|
+
<div class="block-feature-masker" :style="ItemStyles(subitem,'masker')">
|
|
72
|
+
<template v-if="subitem.src.substring(0,5)!='blank'">
|
|
73
|
+
<img v-if="subitem.block_type=='img' " :src="subitem.src" />
|
|
74
|
+
<i class="box-marker"></i>
|
|
75
|
+
</template>
|
|
76
|
+
</div>
|
|
77
|
+
</template>
|
|
78
|
+
</template>
|
|
79
|
+
</template>
|
|
80
|
+
<div class="box-inner">
|
|
81
|
+
<template v-for="(item) in block.children" >
|
|
82
|
+
<template v-for="(subitem) in item.children">
|
|
83
|
+
<template v-if="hasImageParam(subitem,'icon')" >
|
|
84
|
+
<div class="block-feature-icon" :style="ItemStyles(subitem,'icon')">
|
|
85
|
+
<img v-if="subitem.block_type=='img' " :src="subitem.src" />
|
|
86
|
+
</div>
|
|
87
|
+
</template>
|
|
88
|
+
</template>
|
|
89
|
+
</template>
|
|
90
|
+
<div class="box-main" >
|
|
91
|
+
<template class="box-main" v-for="(item) in block.children" >
|
|
92
|
+
<h1 class="title" v-if="item.block_type=='h1'">
|
|
93
|
+
<span v-for="(h1) in item.children" class="clip">{{h1.content}}</span>
|
|
94
|
+
</h1>
|
|
95
|
+
<h2 class="title" v-if="item.block_type=='h2'">
|
|
96
|
+
<span v-for="(h2) in item.children" class="clip">{{h2.content}}</span>
|
|
97
|
+
</h2>
|
|
98
|
+
<h3 class="title" v-if="item.block_type=='h3'">
|
|
99
|
+
<span v-for="(h3) in item.children" class="clip">{{h3.content}}</span>
|
|
100
|
+
</h3>
|
|
101
|
+
<p v-if="item.block_type=='p'" class="details" >
|
|
102
|
+
<template v-for="(subitem) in item.children">
|
|
103
|
+
<template v-if="subitem.block_type=='text'">{{subitem.content}} </template>
|
|
104
|
+
<Image v-if="subitem.block_type=='img'&&!hasImageParam(subitem,'masker')&&!hasImageParam(subitem,'icon')"
|
|
105
|
+
:block="subitem" />
|
|
106
|
+
<Button v-if="subitem.block_type=='a'"
|
|
107
|
+
tag="a"
|
|
108
|
+
size="medium"
|
|
109
|
+
:block="subitem"
|
|
110
|
+
:href="subitem.href"
|
|
111
|
+
:target="_blank" ></Button>
|
|
112
|
+
</template>
|
|
113
|
+
</p>
|
|
114
|
+
</template>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
92
117
|
</article>
|
|
93
118
|
</div>
|
|
94
119
|
</template>
|
|
@@ -112,31 +137,31 @@ function hasParam(children:any,name:string ){
|
|
|
112
137
|
right: 0;
|
|
113
138
|
bottom: 0;
|
|
114
139
|
z-index: 0;
|
|
115
|
-
opacity: 0.
|
|
116
|
-
background-color: #
|
|
140
|
+
opacity: 0.8;
|
|
141
|
+
background-color: #eee;
|
|
117
142
|
}
|
|
118
143
|
|
|
119
144
|
.dark .VPFeature .box-marker {
|
|
120
145
|
background-color: #222;
|
|
121
146
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
147
|
+
.block-feature-icon{
|
|
148
|
+
margin-right:16px;
|
|
149
|
+
}
|
|
150
|
+
.block-feature-masker {
|
|
151
|
+
z-index: 0;
|
|
125
152
|
position: absolute;
|
|
126
153
|
top: 0;
|
|
127
154
|
left: 0;
|
|
128
155
|
right: 0;
|
|
129
156
|
bottom: 0;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
background-position: center;
|
|
134
|
-
}
|
|
135
|
-
.VPFeature .box-cover-fixed{
|
|
136
|
-
display: none !important;
|
|
137
|
-
opacity: 0;
|
|
138
|
-
margin:-24px;
|
|
157
|
+
z-index: 0;
|
|
158
|
+
overflow:hidden;
|
|
159
|
+
|
|
139
160
|
}
|
|
161
|
+
.block-feature-masker img{ width: 100%;}
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
140
165
|
.VPFeature.link:hover {
|
|
141
166
|
border-color: var(--vp-c-brand-1);
|
|
142
167
|
}
|
|
@@ -144,10 +169,12 @@ function hasParam(children:any,name:string ){
|
|
|
144
169
|
.box {
|
|
145
170
|
display: flex;
|
|
146
171
|
flex-direction: column;
|
|
147
|
-
|
|
172
|
+
|
|
148
173
|
height: 100%;
|
|
174
|
+
position: relative;
|
|
149
175
|
}
|
|
150
|
-
|
|
176
|
+
.box-inner{ padding: 24px; z-index: 1; display: flex; }
|
|
177
|
+
.box-main{ flex-grow: 1;}
|
|
151
178
|
.box > :deep(.VPImage) {
|
|
152
179
|
margin-bottom: 20px;
|
|
153
180
|
}
|
|
@@ -171,8 +198,13 @@ h1.title{
|
|
|
171
198
|
font-weight: 500;
|
|
172
199
|
color: var(--vp-c-text-2);
|
|
173
200
|
z-index: 1;
|
|
201
|
+
display: flex;
|
|
202
|
+
justify-content: flex-start;
|
|
203
|
+
gap: 6px;
|
|
204
|
+
margin-bottom: 6px;
|
|
174
205
|
}
|
|
175
|
-
|
|
206
|
+
|
|
207
|
+
|
|
176
208
|
|
|
177
209
|
|
|
178
210
|
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import Image from './Image.vue'
|
|
3
|
+
import Button from './Button.vue'
|
|
4
|
+
|
|
5
|
+
import { useData } from '../../composables/data'
|
|
6
|
+
|
|
7
|
+
const { base } = useData()
|
|
8
|
+
const _blank:string="_blank"
|
|
9
|
+
|
|
10
|
+
defineProps<{
|
|
11
|
+
block?: any
|
|
12
|
+
}>()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
function MaskerStyles(children:any){
|
|
18
|
+
return itemStyles(children,"masker" );
|
|
19
|
+
}
|
|
20
|
+
function CoverStyles(children:any){
|
|
21
|
+
return itemStyles(children,"cover" );
|
|
22
|
+
}
|
|
23
|
+
function itemStyles(children:any,name:string ){
|
|
24
|
+
const styles:any=[]
|
|
25
|
+
for(let i=0;i< children.length;i++){
|
|
26
|
+
const child=children[i]
|
|
27
|
+
if(child["src"]!=null ){
|
|
28
|
+
const src=child["src"]
|
|
29
|
+
const pattern = /[?&]([^=#]+)=([^&#]*)/g;
|
|
30
|
+
const params:any={}
|
|
31
|
+
let match;
|
|
32
|
+
while ((match = pattern.exec(src)) !== null) {
|
|
33
|
+
params[match[1]]=match[2]
|
|
34
|
+
}
|
|
35
|
+
if(params["class"]==name){
|
|
36
|
+
styles.push({"display":"block"})
|
|
37
|
+
if(src.substring(0,1)=="/"){
|
|
38
|
+
styles.push({"background-image":"url("+ base.value+src.substring(1,src.length) +")"})
|
|
39
|
+
}else{
|
|
40
|
+
styles.push({"background-image":"url("+ src +")"})
|
|
41
|
+
}
|
|
42
|
+
if(params["color"]){
|
|
43
|
+
styles.push({"color": decodeURIComponent(params["color"])})
|
|
44
|
+
}
|
|
45
|
+
if(params["background"]){
|
|
46
|
+
styles.push({"background":decodeURIComponent(params["background"])})
|
|
47
|
+
}
|
|
48
|
+
if(params["height"]){
|
|
49
|
+
styles.push({"height":params["height"]})
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return styles
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
function hasImageParam(children:any,name:string ){
|
|
59
|
+
|
|
60
|
+
for(let i=0;i< children.length;i++){
|
|
61
|
+
const child=children[i]
|
|
62
|
+
if(child["src"]!=null ){
|
|
63
|
+
const src=child["src"]
|
|
64
|
+
const pattern = /[?&]([^=#]+)=([^&#]*)/g;
|
|
65
|
+
const params:any={}
|
|
66
|
+
let match;
|
|
67
|
+
while ((match = pattern.exec(src)) !== null) {
|
|
68
|
+
params[match[1]]=match[2]
|
|
69
|
+
}
|
|
70
|
+
if(params["class"]==name){
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<template>
|
|
80
|
+
<div class="VPFeature" >
|
|
81
|
+
<article class="box">
|
|
82
|
+
<template v-for="(item,index) in block.children" >
|
|
83
|
+
<div class="box-cover" :style="CoverStyles( item.children)" ></div>
|
|
84
|
+
<i class="box-cover-fixed" :style="CoverStyles( item.children)" ></i>
|
|
85
|
+
<div class="box-cover" :style="MaskerStyles( item.children)" >
|
|
86
|
+
<i class="box-marker" ></i>
|
|
87
|
+
</div>
|
|
88
|
+
<h1 class="title" v-if="item.block_type=='h1'">
|
|
89
|
+
<span v-for="(h1) in item.children" class="clip">{{h1.content}}</span>
|
|
90
|
+
</h1>
|
|
91
|
+
<h2 class="title" v-if="item.block_type=='h2'">
|
|
92
|
+
<span v-for="(h2) in item.children" class="clip">{{h2.content}}</span>
|
|
93
|
+
</h2>
|
|
94
|
+
<h3 class="title" v-if="item.block_type=='h3'">
|
|
95
|
+
<span v-for="(h3) in item.children" class="clip">{{h3.content}}</span>
|
|
96
|
+
</h3>
|
|
97
|
+
<p v-if="item.block_type=='p'" class="details" >
|
|
98
|
+
<template v-for="(subitem) in item.children">
|
|
99
|
+
<template v-if="subitem.block_type=='text'">{{subitem.content}} </template>
|
|
100
|
+
<Image v-if="subitem.block_type=='img'"
|
|
101
|
+
:block="subitem" />
|
|
102
|
+
<Button v-if="subitem.block_type=='a'"
|
|
103
|
+
tag="a"
|
|
104
|
+
size="medium"
|
|
105
|
+
:block="subitem"
|
|
106
|
+
:href="subitem.href"
|
|
107
|
+
:target="_blank" ></Button>
|
|
108
|
+
</template>
|
|
109
|
+
</p>
|
|
110
|
+
|
|
111
|
+
</template>
|
|
112
|
+
</article>
|
|
113
|
+
</div>
|
|
114
|
+
</template>
|
|
115
|
+
|
|
116
|
+
<style scoped>
|
|
117
|
+
.VPFeature {
|
|
118
|
+
display: block;
|
|
119
|
+
border-radius: 12px;
|
|
120
|
+
height: 100%;
|
|
121
|
+
background-color: var(--vp-c-bg-soft);
|
|
122
|
+
transition: border-color 0.25s, background-color 0.25s;
|
|
123
|
+
position: relative;
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.VPFeature .box-marker {
|
|
128
|
+
display: block;
|
|
129
|
+
position: absolute;
|
|
130
|
+
top: 0;
|
|
131
|
+
left: 0;
|
|
132
|
+
right: 0;
|
|
133
|
+
bottom: 0;
|
|
134
|
+
z-index: 0;
|
|
135
|
+
opacity: 0.75;
|
|
136
|
+
background-color: #fff;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.dark .VPFeature .box-marker {
|
|
140
|
+
background-color: #222;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.VPFeature .box-cover {
|
|
144
|
+
display: none;
|
|
145
|
+
position: absolute;
|
|
146
|
+
top: 0;
|
|
147
|
+
left: 0;
|
|
148
|
+
right: 0;
|
|
149
|
+
bottom: 0;
|
|
150
|
+
z-index: 0;
|
|
151
|
+
border-radius: 12px;
|
|
152
|
+
background-size: cover;
|
|
153
|
+
background-position: center;
|
|
154
|
+
}
|
|
155
|
+
.VPFeature .box-cover-fixed{
|
|
156
|
+
display: none !important;
|
|
157
|
+
opacity: 0;
|
|
158
|
+
margin:-24px;
|
|
159
|
+
}
|
|
160
|
+
.VPFeature.link:hover {
|
|
161
|
+
border-color: var(--vp-c-brand-1);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.box {
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
padding: 24px;
|
|
168
|
+
height: 100%;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.box > :deep(.VPImage) {
|
|
172
|
+
margin-bottom: 20px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
.title {
|
|
178
|
+
line-height: 24px;
|
|
179
|
+
font-size: 16px;
|
|
180
|
+
font-weight: 600;
|
|
181
|
+
z-index: 2;
|
|
182
|
+
}
|
|
183
|
+
h1.title{
|
|
184
|
+
font-size: 32px;
|
|
185
|
+
padding:16px 0;
|
|
186
|
+
}
|
|
187
|
+
.details {
|
|
188
|
+
flex-grow: 1;
|
|
189
|
+
line-height: 24px;
|
|
190
|
+
font-size: 14px;
|
|
191
|
+
font-weight: 500;
|
|
192
|
+
color: var(--vp-c-text-2);
|
|
193
|
+
z-index: 1;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
.link-text {
|
|
200
|
+
padding-top: 8px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.link-text-value {
|
|
204
|
+
display: flex;
|
|
205
|
+
align-items: center;
|
|
206
|
+
font-size: 14px;
|
|
207
|
+
font-weight: 500;
|
|
208
|
+
color: var(--vp-c-brand-1);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.link-text-icon {
|
|
212
|
+
margin-left: 6px;
|
|
213
|
+
}
|
|
214
|
+
</style>
|
|
@@ -62,8 +62,8 @@ const styles= computed(() => {
|
|
|
62
62
|
<div :style="styles">
|
|
63
63
|
<template v-for="(ul,index) in block.children" >
|
|
64
64
|
|
|
65
|
-
<div v-if="ul.block_type=='h1'||ul.block_type=='h2'||ul.block_type=='h3'" class="block-features-title
|
|
66
|
-
|
|
65
|
+
<div v-if="ul.block_type=='h1'||ul.block_type=='h2'||ul.block_type=='h3'" class="block-features-title vp-doc" >
|
|
66
|
+
<div class="container"> <Heading :block="ul"></Heading> </div>
|
|
67
67
|
</div>
|
|
68
68
|
<div class="container" v-if="ul.block_type=='p'"> <P :block="ul"></P></div>
|
|
69
69
|
<div v-if="ul.block_type=='ul'" class="VPFeatures" >
|
|
@@ -84,24 +84,24 @@ const styles= computed(() => {
|
|
|
84
84
|
|
|
85
85
|
<style scoped>
|
|
86
86
|
.VPFeatures {
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
position: relative;
|
|
88
|
+
padding: 0 24px;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
.block-features-title{ padding:12px
|
|
91
|
+
.block-features-title{ padding:12px 24px 8px; }
|
|
92
92
|
|
|
93
93
|
@media (min-width: 640px) {
|
|
94
94
|
.VPFeatures {
|
|
95
95
|
padding: 0 48px;
|
|
96
96
|
}
|
|
97
|
-
.block-features-title{ padding: 16px
|
|
97
|
+
.block-features-title{ padding: 16px 24px 8px; }
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
@media (min-width: 960px) {
|
|
101
101
|
.VPFeatures {
|
|
102
102
|
padding: 0 64px;
|
|
103
103
|
}
|
|
104
|
-
.block-features-title{ padding: 24px
|
|
104
|
+
.block-features-title{ padding: 24px 24px 8px; }
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
.container {
|
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-C1giFHyt.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-C1giFHyt.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-C1giFHyt.js';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import 'crypto';
|
|
7
7
|
import 'module';
|
|
@@ -37152,9 +37152,6 @@ const imagePlugin = (md, { lazyLoading } = {}, base) => {
|
|
|
37152
37152
|
if (url && !EXTERNAL_URL_RE.test(url)) {
|
|
37153
37153
|
if (!/^\.?\//.test(url))
|
|
37154
37154
|
url = "./" + url;
|
|
37155
|
-
if (url.substring(0, 1) == "/" && base != null) {
|
|
37156
|
-
url = base + url.substring(1, url.length);
|
|
37157
|
-
}
|
|
37158
37155
|
}
|
|
37159
37156
|
if (url)
|
|
37160
37157
|
token.attrSet("src", decodeURIComponent(url));
|
|
@@ -46741,14 +46738,13 @@ function escapeHtml(string) {
|
|
|
46741
46738
|
|
|
46742
46739
|
var escape$1 = /*@__PURE__*/getDefaultExportFromCjs(escapeHtml_1);
|
|
46743
46740
|
|
|
46744
|
-
var version = "1.47.
|
|
46741
|
+
var version = "1.47.3018";
|
|
46745
46742
|
|
|
46746
46743
|
async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags) {
|
|
46747
46744
|
const routePath = `/${page.replace(/\.md$/, "")}`;
|
|
46748
46745
|
const siteData = resolveSiteDataByRoute(config.site, routePath);
|
|
46749
|
-
console.log("routePath:" + routePath);
|
|
46750
46746
|
const context = await render(routePath);
|
|
46751
|
-
|
|
46747
|
+
let { content, teleports } = await config.postRender?.(context) ?? context;
|
|
46752
46748
|
const pageName = sanitizeFileName(page.replace(/\//g, "_"));
|
|
46753
46749
|
const pageServerJsFileName = pageName + ".js";
|
|
46754
46750
|
const pageHash = pageToHashMap[pageName.toLowerCase()];
|
|
@@ -46841,6 +46837,8 @@ async function renderPage(render, config, page, result, appChunk, cssChunk, asse
|
|
|
46841
46837
|
themeCssList = '<link rel="stylesheet" type="text/css" href="' + siteData.base + '.themekit/assets/bootstrap3/dist/css/bootstrap.min.css"/>';
|
|
46842
46838
|
themeCssList += '<link rel="stylesheet" type="text/css" href="' + siteData.base + '.themekit/assets/changzhou/dist/css/style.css"/>';
|
|
46843
46839
|
}
|
|
46840
|
+
content = content.replace("./.themekit/dist", "");
|
|
46841
|
+
content = content.replace(".themekit/dist", "");
|
|
46844
46842
|
const html = `<!DOCTYPE html>
|
|
46845
46843
|
<html lang="${siteData.lang}" dir="${dir}" theme="${theme}">
|
|
46846
46844
|
<head>
|