themekit-js 1.48.113 → 1.48.817

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.
@@ -87,7 +87,16 @@ const styles= computed(() => {
87
87
 
88
88
  <template>
89
89
  <div class="VPHero block-hero" :class="[{ 'has-image':hasImg},block.class?block.class:'']" :style="styles">
90
-
90
+ <template v-for="(item) in block.children" >
91
+
92
+ <template v-if="item.block_type=='p'">
93
+ <template v-for="(pItem) in item.children" >
94
+ <div class="block-hero-background" v-if="pItem.block_type=='img'&&pItem.alt=='background' ">
95
+ <Image :block="pItem" ></Image>
96
+ </div>
97
+ </template>
98
+ </template>
99
+ </template>
91
100
  <div v-if="hasBgImg" class="hero-bgi-nav" :style="{'background-color':block['nav-color']}"></div>
92
101
  <div class="container">
93
102
  <div class="main">
@@ -117,7 +126,7 @@ const styles= computed(() => {
117
126
  <A v-if="pItem.block_type=='a'" :block="pItem"></A>
118
127
  <template v-if="pItem.block_type=='text'">{{pItem.content}}</template>
119
128
  <template v-if="pItem.block_type=='img'&&pItem.src!=HeroImg.src">
120
- <Image :block="pItem" ></Image>
129
+ <Image :block="pItem" ></Image>
121
130
  </template>
122
131
  </template>
123
132
  </p>
@@ -137,12 +146,19 @@ const styles= computed(() => {
137
146
 
138
147
  <style scoped>
139
148
  .VPHero {
149
+ position: relative;
140
150
  margin-top: calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);
141
151
  padding: calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px;
142
152
  background-size: cover;
143
153
  background-position: center;
144
154
  position: relative;
145
155
  }
156
+
157
+ .block-hero-background{
158
+ position: absolute;
159
+ left: 0;
160
+ top: 0;
161
+ }
146
162
  .hero-bgi-nav{
147
163
  height:var(--vp-nav-height) ;
148
164
  position: absolute;
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-D2UHHglD.js';
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-CByv2PSW.js';
2
2
  import { createLogger } from 'vite';
3
3
  import 'path';
4
4
  import 'shiki';
@@ -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-D2UHHglD.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-D2UHHglD.js';
3
+ import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, a as getDefaultExportFromCjs } from './serve-CByv2PSW.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-CByv2PSW.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));
@@ -38291,12 +38288,10 @@ async function createMarkdownToVueRenderFn(srcDir, options = {}, pages, isBuild
38291
38288
  if (token.type == "image") {
38292
38289
  const alt = token.children != null && token.children.length > 0 ? token.children[0]["content"] : "";
38293
38290
  let src2 = token.attrGet("src") == null ? "" : token.attrGet("src");
38294
- console.log("src1:" + src2);
38295
- if (src2 != null) {
38291
+ if (src2 != null && isBuild) {
38296
38292
  src2 = src2.replace("../.themekit/dist", "..");
38297
38293
  src2 = src2.replace(".themekit/dist/", "/");
38298
38294
  }
38299
- console.log("src2:" + src2);
38300
38295
  parent["children"].push({ "block_type": "img", "content": token.attrGet("content"), "alt": alt, "src": src2 });
38301
38296
  continue;
38302
38297
  }
@@ -46749,7 +46744,7 @@ function escapeHtml(string) {
46749
46744
 
46750
46745
  var escape$1 = /*@__PURE__*/getDefaultExportFromCjs(escapeHtml_1);
46751
46746
 
46752
- var version = "1.48.0113";
46747
+ var version = "1.48.0817";
46753
46748
 
46754
46749
  async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags) {
46755
46750
  const routePath = `/${page.replace(/\.md$/, "")}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "themekit-js",
3
- "version": "1.48.0113",
3
+ "version": "1.48.0817",
4
4
  "description": "基于VitePress开发的Markdown静态网站生成器",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@8.15.6",