themekit-js 1.1.32 → 1.1.35
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.
|
@@ -13,27 +13,42 @@ defineProps<{
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
|
|
17
|
+
function hasMasker(children:any){
|
|
18
|
+
return hasParam(children,"masker" );
|
|
19
|
+
}
|
|
16
20
|
function hasCover(children:any){
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
return hasParam(children,"cover" );
|
|
22
|
+
}
|
|
23
|
+
function hasParam(children:any,name:string ){
|
|
24
|
+
const styles:any=[]
|
|
19
25
|
for(let i=0;i< children.length;i++){
|
|
20
26
|
const child=children[i]
|
|
21
27
|
if(child["src"]!=null ){
|
|
22
|
-
|
|
28
|
+
const src=child["src"]
|
|
29
|
+
const pattern = /[?&]([^=#]+)=([^&#]*)/g;
|
|
30
|
+
const params:any={}
|
|
23
31
|
let match;
|
|
24
|
-
while ((match = pattern.exec(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
while ((match = pattern.exec(src)) !== null) {
|
|
33
|
+
params[match[1]]=match[2]
|
|
34
|
+
}
|
|
35
|
+
if(params["class"]==name){
|
|
36
|
+
styles.push({"display":"block"})
|
|
29
37
|
if(src.substring(0,1)=="/"){
|
|
30
38
|
styles.push({"background-image":"url("+ base.value+src.substring(1,src.length) +")"})
|
|
31
39
|
}else{
|
|
32
40
|
styles.push({"background-image":"url("+ src +")"})
|
|
33
41
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
42
|
+
if(params["color"]){
|
|
43
|
+
styles.push({"color":params["color"]})
|
|
44
|
+
}
|
|
45
|
+
if(params["background"]){
|
|
46
|
+
styles.push({"background":params["background"]})
|
|
47
|
+
}
|
|
48
|
+
if(params["height"]){
|
|
49
|
+
styles.push({"height":params["height"]})
|
|
50
|
+
}
|
|
51
|
+
}
|
|
37
52
|
}
|
|
38
53
|
}
|
|
39
54
|
return styles
|
|
@@ -43,14 +58,12 @@ function hasCover(children:any){
|
|
|
43
58
|
<template>
|
|
44
59
|
<div class="VPFeature" >
|
|
45
60
|
<article class="box">
|
|
46
|
-
<template v-for="(item) in block.children" >
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
</
|
|
52
|
-
|
|
53
|
-
|
|
61
|
+
<template v-for="(item) in block.children" >
|
|
62
|
+
<div class="box-cover" :style="hasCover(item.children)" ></div>
|
|
63
|
+
<i class="box-cover-fixed" :style="hasCover(item.children)" ></i>
|
|
64
|
+
<div class="box-cover" :style="hasMasker(item.children)" >
|
|
65
|
+
<i class="box-marker" ></i>
|
|
66
|
+
</div>
|
|
54
67
|
<h1 class="title" v-if="item.block_type=='h1'">
|
|
55
68
|
<span v-for="(h1) in item.children" class="clip">{{h1.content}}</span>
|
|
56
69
|
</h1>
|
|
@@ -118,7 +131,11 @@ function hasCover(children:any){
|
|
|
118
131
|
background-size: cover;
|
|
119
132
|
background-position: center;
|
|
120
133
|
}
|
|
121
|
-
|
|
134
|
+
.VPFeature .box-cover-fixed{
|
|
135
|
+
display: none;
|
|
136
|
+
opacity: 0;
|
|
137
|
+
margin:-24px;
|
|
138
|
+
}
|
|
122
139
|
.VPFeature.link:hover {
|
|
123
140
|
border-color: var(--vp-c-brand-1);
|
|
124
141
|
}
|
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-XcggAXcG.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-XcggAXcG.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-XcggAXcG.js';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import 'crypto';
|
|
7
7
|
import 'module';
|
|
@@ -46733,7 +46733,7 @@ function escapeHtml(string) {
|
|
|
46733
46733
|
|
|
46734
46734
|
var escape$1 = /*@__PURE__*/getDefaultExportFromCjs(escapeHtml_1);
|
|
46735
46735
|
|
|
46736
|
-
var version = "1.1.
|
|
46736
|
+
var version = "1.1.35";
|
|
46737
46737
|
|
|
46738
46738
|
async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags) {
|
|
46739
46739
|
const routePath = `/${page.replace(/\.md$/, "")}`;
|