diff --git a/docs/images/wallhaven-o35exm.jpg b/docs/images/wallhaven-o35exm.jpg new file mode 100644 index 0000000..8af3047 Binary files /dev/null and b/docs/images/wallhaven-o35exm.jpg differ diff --git a/docs/images/wallhaven-o35exm.webp b/docs/images/wallhaven-o35exm.webp new file mode 100644 index 0000000..94e9ef4 Binary files /dev/null and b/docs/images/wallhaven-o35exm.webp differ diff --git a/docs/stylesheets/background.css b/docs/stylesheets/background.css new file mode 100644 index 0000000..3f8adcb --- /dev/null +++ b/docs/stylesheets/background.css @@ -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); +} diff --git a/docs/stylesheets/preload.js b/docs/stylesheets/preload.js new file mode 100644 index 0000000..14aeb39 --- /dev/null +++ b/docs/stylesheets/preload.js @@ -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); diff --git a/mkdocs.yml b/mkdocs.yml index 0942859..586bbb1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,11 +1,11 @@ -site_name: hugemaker -site_description: hugemaker +site_name: 知识总结 +site_description: 知识总结文档 site_author: hugemaker # site_url: # 请在这里填写您的网站URL strict: false -repo_name: '/doc' -repo_url: +repo_name: 'shark163/doc' +repo_url: 'https://gitea.hugemaker.com.cn/shark163/doc' nav: - 简介: @@ -28,8 +28,8 @@ theme: name: 切换到夜间模式 - media: "(prefers-color-scheme: dark)" scheme: slate - primary: blue-grey - accent: cyan + primary: grey # ← 主色调设为灰色 + accent: blue-grey # ← 强调色为蓝灰色 toggle: icon: material/weather-night name: 切换到日间模式 @@ -77,5 +77,7 @@ markdown_extensions: extra_javascript: - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js + - stylesheets/preload.js - +extra_css: + - stylesheets/background.css diff --git a/start.py b/start.py new file mode 100644 index 0000000..5ef7a8f --- /dev/null +++ b/start.py @@ -0,0 +1,5 @@ +import os +import subprocess + +# 运行 mkdocs serve 命令 +subprocess.run(['mkdocs', 'serve'])