This commit is contained in:
shark 2025-06-06 14:53:52 +08:00
commit 2aca326813
6 changed files with 46 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

View File

@ -0,0 +1,26 @@
/* 背景图 + 模糊 + 透明效果 */
body::before {
content: "";
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-image: url("../images/wallhaven-o35exm.webp"); /* 替换为你的图片路径 */
background-size: cover;
background-position: center;
background-repeat: no-repeat;
filter: blur(8px) brightness(0.8); /* 模糊 + 调暗一点更清晰 */
z-index: -2;
}
/* 主体半透明,让背景透出来 */
.md-main {
background-color: rgba(255, 255, 255, 0.6); /* light mode 半透明白 */
backdrop-filter: blur(2px);
}
[data-md-color-scheme="slate"] .md-main {
background-color: rgba(0, 0, 0, 0.3); /* dark mode 半透明黑 */
backdrop-filter: blur(2px);
}

View File

@ -0,0 +1,6 @@
// 预加载背景图像
const preloadLink = document.createElement("link");
preloadLink.rel = "preload";
preloadLink.as = "image";
preloadLink.href = "/images/wallhaven-o35exm.webp"; // 替换为你的图片路径
document.head.appendChild(preloadLink);

View File

@ -1,11 +1,11 @@
site_name: hugemaker site_name: 知识总结
site_description: hugemaker site_description: 知识总结文档
site_author: hugemaker site_author: hugemaker
# site_url: # 请在这里填写您的网站URL # site_url: # 请在这里填写您的网站URL
strict: false strict: false
repo_name: '/doc' repo_name: 'shark163/doc'
repo_url: repo_url: 'https://gitea.hugemaker.com.cn/shark163/doc'
nav: nav:
- 简介: - 简介:
@ -28,8 +28,8 @@ theme:
name: 切换到夜间模式 name: 切换到夜间模式
- media: "(prefers-color-scheme: dark)" - media: "(prefers-color-scheme: dark)"
scheme: slate scheme: slate
primary: blue-grey primary: grey # ← 主色调设为灰色
accent: cyan accent: blue-grey # ← 强调色为蓝灰色
toggle: toggle:
icon: material/weather-night icon: material/weather-night
name: 切换到日间模式 name: 切换到日间模式
@ -77,5 +77,7 @@ markdown_extensions:
extra_javascript: extra_javascript:
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
- stylesheets/preload.js
extra_css:
- stylesheets/background.css

5
start.py Normal file
View File

@ -0,0 +1,5 @@
import os
import subprocess
# 运行 mkdocs serve 命令
subprocess.run(['mkdocs', 'serve'])