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/stylesheets/background.css b/docs/stylesheets/background.css new file mode 100644 index 0000000..b2e5141 --- /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.jpg"); /* 替换为你的图片路径 */ + 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/mkdocs.yml b/mkdocs.yml index c872463..e733a93 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,5 @@ -site_name: hugemaker -site_description: hugemaker +site_name: 知识总结 +site_description: 知识总结文档 site_author: hugemaker # site_url: # 请在这里填写您的网站URL strict: false @@ -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: 切换到日间模式 @@ -76,4 +76,7 @@ markdown_extensions: alternate_style: true extra_javascript: - - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js \ No newline at end of file + - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js + +extra_css: + - stylesheets/background.css