themekit-js 1.1.6 → 1.1.8

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.
@@ -31,6 +31,7 @@ provide('hero-image-slot-exists', heroImageSlotExists)
31
31
  </script>
32
32
 
33
33
  <template>
34
+
34
35
  <div v-if="frontmatter.layout !== false" class="Layout" :class="frontmatter.pageClass" >
35
36
  <slot name="layout-top" />
36
37
  <VPSkipLink />
@@ -27,8 +27,7 @@ const { frontmatter } = useData()
27
27
  <style scoped>
28
28
  .TKBlock {
29
29
  margin-bottom: 96px;
30
- }
31
-
30
+ }
32
31
  @media (min-width: 768px) {
33
32
  .TKBlock {
34
33
  margin-bottom: 128px;
@@ -17,18 +17,26 @@ const docStyles= computed(() => {
17
17
  }
18
18
  return styles
19
19
  })
20
-
20
+ const blockClass= computed(() => {
21
+ if(block["class"]){
22
+ return [block["class"]]
23
+ }else
24
+ return []
25
+ })
21
26
 
22
27
  </script>
23
28
  <template>
24
29
 
25
- <div class="vp-doc doc" :style="docStyles" >
30
+ <div class="vp-doc doc" :class="blockClass" :style="docStyles" >
26
31
  <div class="container" v-html="block.content"></div>
27
32
  </div>
28
33
  </template>
29
34
 
30
35
  <style>
31
- .doc{ background-size: cover;background-position: center;}
36
+ .doc{
37
+ background-size: cover;
38
+ background-position: center;
39
+ }
32
40
  </style>
33
41
  <style scoped>
34
42
 
@@ -14,6 +14,15 @@ export interface Feature {
14
14
  const props = defineProps<{
15
15
  block: any
16
16
  }>()
17
+
18
+ const blockClass= computed(() => {
19
+ if(props.block["class"]){
20
+ return [props.block["class"]]
21
+ }else
22
+ return []
23
+ })
24
+
25
+
17
26
  const grids = computed(() => {
18
27
  const uls = props.block.children
19
28
  let ret:any=[]
@@ -39,7 +48,7 @@ const grids = computed(() => {
39
48
 
40
49
  <template >
41
50
  <template v-for="(ul,index) in block.children" >
42
- <div v-if="ul.block_type=='ul'" class="VPFeatures">
51
+ <div v-if="ul.block_type=='ul'" class="VPFeatures" :class="blockClass">
43
52
  <div class="container">
44
53
  <div class="items">
45
54
  <div
@@ -22,7 +22,7 @@ interface Props {
22
22
  const props = withDefaults(defineProps<Props>(), {
23
23
 
24
24
  })
25
-
25
+
26
26
  let HeroImg:any=null
27
27
  const items=props.block.children
28
28
  for(let i=0;i<items.length;i++){
@@ -20,7 +20,8 @@ export function useSidebar() {
20
20
  const hasSidebar = computed(() => {
21
21
  return (frontmatter.value.sidebar !== false &&
22
22
  sidebar.value.length > 0 &&
23
- frontmatter.value.layout !== 'home');
23
+ frontmatter.value.layout == 'doc' //@seedunk frontmatter.value.layout == 'home'
24
+ );
24
25
  });
25
26
  const leftAside = computed(() => {
26
27
  if (hasAside)
@@ -30,7 +31,8 @@ export function useSidebar() {
30
31
  return false;
31
32
  });
32
33
  const hasAside = computed(() => {
33
- if (frontmatter.value.layout === 'home')
34
+ //@seedunk if (frontmatter.value.layout === 'home') return false
35
+ if (frontmatter.value.layout !== 'doc')
34
36
  return false;
35
37
  if (frontmatter.value.aside != null)
36
38
  return !!frontmatter.value.aside;
@@ -7,3 +7,39 @@
7
7
  clip-path: inset(50%);
8
8
  overflow: hidden;
9
9
  }
10
+
11
+ .mt-1{
12
+ margin-top:.25rem!important
13
+ }
14
+ .mt-2{
15
+ margin-top:.5rem!important
16
+ }
17
+
18
+ .mt,
19
+ .mt-3{
20
+ margin-top:1rem!important
21
+ }
22
+ .mt-4{
23
+ margin-top:1.5rem!important
24
+ }
25
+ .mt-4{
26
+ margin-top:3rem!important
27
+ }
28
+
29
+
30
+ .mb-1{
31
+ margin-bottom:.25rem!important
32
+ }
33
+ .mb-2{
34
+ margin-bottom:.5rem!important
35
+ }
36
+ .mb,
37
+ .mb-3{
38
+ margin-bottom:1rem!important
39
+ }
40
+ .mb-4{
41
+ margin-bottom:1.5rem!important
42
+ }
43
+ .mb-4{
44
+ margin-bottom:3rem!important
45
+ }
@@ -44,6 +44,7 @@
44
44
  * -------------------------------------------------------------------------- */
45
45
 
46
46
  :root {
47
+ --spacer:12px;
47
48
  --vp-c-gray-1: #dddde3;
48
49
  --vp-c-gray-2: #e4e4e9;
49
50
  --vp-c-gray-3: #ebebef;
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-DsacN7kS.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-CnE4ocit.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-DsacN7kS.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-DsacN7kS.js';
3
+ import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, a as getDefaultExportFromCjs } from './serve-CnE4ocit.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-CnE4ocit.js';
5
5
  import path from 'path';
6
6
  import 'crypto';
7
7
  import 'module';
@@ -46709,7 +46709,7 @@ function escapeHtml(string) {
46709
46709
 
46710
46710
  var escape$1 = /*@__PURE__*/getDefaultExportFromCjs(escapeHtml_1);
46711
46711
 
46712
- var version = "1.1.6";
46712
+ var version = "1.1.8";
46713
46713
 
46714
46714
  async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags) {
46715
46715
  const routePath = `/${page.replace(/\.md$/, "")}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "themekit-js",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "基于VitePress开发的Markdown静态网站生成器",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@8.15.6",