themekit-js 1.1.21 → 1.1.30
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/VPNavBar.vue +3 -2
- package/dist/client/theme-default/components/blocks/Feature.vue +62 -2
- package/dist/client/theme-default/components/blocks/Image.vue +3 -10
- package/dist/node/cli.js +1 -1
- package/dist/node/index.js +2 -2
- package/dist/node/{serve-BL40pKQQ.js → serve-mJVIC3K8.js} +1 -1
- package/package.json +1 -1
|
@@ -31,10 +31,10 @@ const styles=computed(()=>{
|
|
|
31
31
|
|
|
32
32
|
let _styles:string=""
|
|
33
33
|
if(frontmatter.value["header-background"]!=null){
|
|
34
|
-
_styles+="background:"+frontmatter.value["header-background"]
|
|
34
|
+
_styles+="background:"+frontmatter.value["header-background"]
|
|
35
35
|
}
|
|
36
36
|
if(frontmatter.value["header-color"]!=null){
|
|
37
|
-
_styles+="color:"+frontmatter.value["header-color"]
|
|
37
|
+
_styles+="color:"+frontmatter.value["header-color"]
|
|
38
38
|
}
|
|
39
39
|
return _styles
|
|
40
40
|
|
|
@@ -95,6 +95,7 @@ watchPostEffect(() => {
|
|
|
95
95
|
transition: background-color 0.5s;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
.dark .VPNavBar{ background-color: var(--vp-c-bg) !important;}
|
|
98
99
|
.VPNavBar:not(.home) {
|
|
99
100
|
background-color: var(--vp-nav-bg-color);
|
|
100
101
|
}
|
|
@@ -2,17 +2,50 @@
|
|
|
2
2
|
import Image from './Image.vue'
|
|
3
3
|
import Button from './Button.vue'
|
|
4
4
|
|
|
5
|
+
import { useData } from '../../composables/data'
|
|
6
|
+
|
|
7
|
+
const { base } = useData()
|
|
5
8
|
const _blank:string="_blank"
|
|
6
9
|
|
|
7
10
|
defineProps<{
|
|
8
11
|
block?: any
|
|
9
12
|
}>()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
function hasCover(children:any){
|
|
17
|
+
|
|
18
|
+
const styles:any=[]
|
|
19
|
+
for(let i=0;i< children.length;i++){
|
|
20
|
+
const child=children[i]
|
|
21
|
+
if(child["src"]!=null ){
|
|
22
|
+
const pattern = /[?&]([^=#]+)=([^&#]*)/g;
|
|
23
|
+
let match;
|
|
24
|
+
while ((match = pattern.exec(child["src"])) !== null) {
|
|
25
|
+
|
|
26
|
+
if(match.length>2&&match[1]=="class"&&match[2]=="cover"){
|
|
27
|
+
styles.push({"display":"block"})
|
|
28
|
+
styles.push({"background-image":"url("+ base.value+ child["src"] +")"})
|
|
29
|
+
break
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return styles
|
|
35
|
+
}
|
|
10
36
|
</script>
|
|
11
37
|
|
|
12
38
|
<template>
|
|
13
39
|
<div class="VPFeature" >
|
|
14
40
|
<article class="box">
|
|
15
41
|
<template v-for="(item) in block.children" >
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
<i class="box-cover" :style="hasCover(item.children)" >
|
|
45
|
+
<i class="box-marker" ></i>
|
|
46
|
+
</i>
|
|
47
|
+
|
|
48
|
+
|
|
16
49
|
<h1 class="title" v-if="item.block_type=='h1'">
|
|
17
50
|
<span v-for="(h1) in item.children" class="clip">{{h1.content}}</span>
|
|
18
51
|
</h1>
|
|
@@ -46,8 +79,7 @@ defineProps<{
|
|
|
46
79
|
|
|
47
80
|
<style scoped>
|
|
48
81
|
.VPFeature {
|
|
49
|
-
display: block;
|
|
50
|
-
border: 1px solid var(--vp-c-bg-soft);
|
|
82
|
+
display: block;
|
|
51
83
|
border-radius: 12px;
|
|
52
84
|
height: 100%;
|
|
53
85
|
background-color: var(--vp-c-bg-soft);
|
|
@@ -56,6 +88,34 @@ defineProps<{
|
|
|
56
88
|
overflow: hidden;
|
|
57
89
|
}
|
|
58
90
|
|
|
91
|
+
.VPFeature .box-marker {
|
|
92
|
+
display: block;
|
|
93
|
+
position: absolute;
|
|
94
|
+
top: 0;
|
|
95
|
+
left: 0;
|
|
96
|
+
right: 0;
|
|
97
|
+
bottom: 0;
|
|
98
|
+
z-index: 0;
|
|
99
|
+
opacity: 0.75;
|
|
100
|
+
background-color: #fff;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.dark .VPFeature .box-marker {
|
|
104
|
+
background-color: #222;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.VPFeature .box-cover {
|
|
108
|
+
display: none;
|
|
109
|
+
position: absolute;
|
|
110
|
+
top: 0;
|
|
111
|
+
left: 0;
|
|
112
|
+
right: 0;
|
|
113
|
+
bottom: 0;
|
|
114
|
+
z-index: 0;
|
|
115
|
+
border-radius: 12px;
|
|
116
|
+
background-size: cover;
|
|
117
|
+
background-position: center;
|
|
118
|
+
}
|
|
59
119
|
|
|
60
120
|
.VPFeature.link:hover {
|
|
61
121
|
border-color: var(--vp-c-brand-1);
|
|
@@ -85,15 +85,8 @@ html:not(.dark) .VPImage.dark {
|
|
|
85
85
|
.dark .VPImage.light {
|
|
86
86
|
display: none;
|
|
87
87
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
.cover{
|
|
91
|
-
position: absolute;
|
|
92
|
-
top: 0;
|
|
93
|
-
left: 0;
|
|
94
|
-
right: 0;
|
|
95
|
-
bottom: 0;
|
|
96
|
-
z-index: -1;
|
|
97
|
-
border-radius: 12px;
|
|
88
|
+
.VPImage.cover{
|
|
89
|
+
display: none;
|
|
98
90
|
}
|
|
91
|
+
|
|
99
92
|
</style>
|
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-mJVIC3K8.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-mJVIC3K8.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-mJVIC3K8.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.30";
|
|
46737
46737
|
|
|
46738
46738
|
async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags) {
|
|
46739
46739
|
const routePath = `/${page.replace(/\.md$/, "")}`;
|