Initial rearrangment of vuetom site source

This commit is contained in:
2024-10-09 08:23:08 +00:00
parent dbd456a517
commit e9d08bd263
233 changed files with 22841 additions and 1 deletions

View File

@@ -0,0 +1,180 @@
---
title: HelloWorld
tags: ui,front
categories: vue
time: 2022-08-31 16:21:11
layout: doc
---
# {{ $frontmatter.title }}
主题的配置在 `.vitepress/config.ts` 文件中的 themeConfig 属性中配置
下面是一些简要的配置项一览:
其中 head、sidebar、nav 对应的分别是 head脚本、侧边栏菜单、头部导航栏都可以默认为 []
<br>
以下是版本号满足 `vitepress >= 1.x.x` `vuetom-theme >= 2.x.x` 的配置
```js
// .vitepress/config.ts
export default defineConfigWithTheme<VuetomThemeConfig>({
lang: 'en-US',
base: '/vt',
title: 'Vuetom Theme',
description: 'Theme For Vitepress',
// head,
themeConfig: {
nav: nav(),
sidebar: {
'zh-CN/guide/': sidebarGuide(),
'zh-CN/mdshow/': sidebarMdShow()
},
socialLinks: [
{ icon: 'github', link: pkg.repository }
],
footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2021-present Lauset'
},
logoImg: '/logo/vuetom-logo-m.png',
bgImg: '/imgs/homg-bg01.jpg',
bgColor: '0,0,0',
bgOpacity: 0.6,
flashEnable: true,
flashColor: ['238,17,17', '0,98,255'],
parallaxEnable: true,
pageBgEnable: true,
pageBgOpacity: 0.8,
featuresColor: ['#06cdff30', 'rgba(223,7,107,.3)']
},
markdown: {
lineNumbers: false,
config: (md) => mdPlugin(md)
},
lastUpdated: false
})
```
<br>
以下是版本号满足 `vitepress = 0.x.x` `vuetom-theme = 1.x.x` 的配置
```js light
import { defineConfigWithTheme } from 'vitepress'
import type { VuetomThemeConfig } from 'vitepress-theme-vuetom'
// .vitepress/config.ts
// 部分配置项
export default defineConfigWithTheme<VuetomThemeConfig>({
title: 'Vuetom',
base: '/',
head,
themeConfig: {
repo: 'GIT地址',
docsDir: 'docs',
sidebar,
nav,
bgImg: '/imgs/homg-bg01.jpg',
bgColor: '0,0,0',
bgOpacity: 0.6,
flashEnable: true,
flashColor: ['238,17,17', '0,98,255'],
pageBgEnable: true,
pageBgOpacity: 0.8,
featuresColor: ['#06cdff30', 'rgba(223,7,107,.3)']
},
// ...
})
```
以下是对配置项的简要说明
## 首页LOGO
**logoImg**
- 类型:`string`
- 默认值:`''`
首页上方LOGO路径中的首个 `/` 表示 `public` 目录
例如:`'/logo/homg-logo.jpg'`
## 首页背景图
**bgImg**
- 类型:`string`
- 默认值:`undefined`
首页全屏背景图,路径中的首个 `/` 表示 `public` 目录
例如:`'/imgs/homg-bg01.jpg'` 等同于 `/public/imgs/home-bg01.jpg`
**bgColor**
- 类型:`string`
- 默认值:`'0,0,0'`
背景图边缘的覆盖颜色,值是 `rgb` 的颜色值 `rgb(0,0,0)` 则写为 `'0,0,0'`,默认为黑色
**bgOpacity**
- 类型:`0 - 1`
- 默认值:`0.6`
覆盖颜色的透明度,搭配上面的覆盖颜色使用,图片中间透明度要比图片边缘透明度要小
图片中间透明度为 `当前bgOpacity - 0.3`,也就是说默认为 `0.3`
## 文章页背景图
注意:文章页背景图片与首页一致
**pageBgEnable**
- 类型:`boolean`
- 默认值:`true`
文章页面背景图是否开启,默认开启
**pageBgOpacity**
- 类型:`0 - 1`
- 默认值:`0.8`
文章页背景图透明度1将看不到背景图0能清晰看到背景图
**featuresColor**
- 类型:`string | Array`
- 默认值:`rgba(255,255,255,0.8)`
首页功能面板背景色,可以是单个颜色字符串,也可以是两个字符串组成的数组
**flashEnable**
- 类型:`boolean`
- 默认值:`false`
是否开启首页背景图闪烁功能,效果类似于朋克风故障
**flashColor**
- 类型:`string | Array`
- 默认值:`['0,0,0','0,0,0']`
首页背景闪烁时附加的色彩0: Top位置的颜色1: Right位置的颜色默认都是黑色
**parallaxEnable**
- 类型:`boolean`
- 默认值:`false`
是否开启首页部分元素视觉差效果

View File

@@ -0,0 +1,14 @@
---
title: HelloWorld2
tags: java,spring
categories: java
time: 2022-08-31 16:21:22
layout: doc
---
# {{ $frontmatter.title }}
This is a word in posts/HelloWorld2.md
<script setup>
</script>

View File

@@ -0,0 +1,99 @@
---
title: 代码块展示
tags: example
categories: md
time: 2022-10-31 20:21:11
layout: doc
---
# {{ $frontmatter.title }}
## MD语法展示
使用三个 ` 符号将代码包裹其中便是展示代码块
<br/>
**亮/暗主题切换**
根据文档主题模式切换
**代码块主题 macos**
可以在 language_key(语言标识) 后加入 `macos`
输入内容:
<div>
```java macos
</div>
String language = "Java";
<div>
```
</div>
展示效果:
```java macos
String language = "Java";
```
<br/>
**默认主题**
默认主题是以暗色系为主的
输入内容:
<div>
```js
</div>
String language = "JS";
<div>
```
</div>
输出内容:
```java
String language = "JS";
```
<br/>
**示例展示**
- javascript ( js macos )
```js macos
function fun(){
echo "Hello, World!";
}
fun();
```
- Java ( java )
```java
System.out.print(1);
```
- Python ( py macos )
```py macos
#!/usr/bin/env python3
print("Hello, World!");
```
- SQL ( sql )
```sql
select user_name from user_info
```
- Shell ( bash, shell )
```bash
echo '1'
```