
项目地址:https://github.com/nezhahq/nezha
官网地址:https://nezha.wiki/
自定义代码(样式和脚本)
<!-- 设置自定义背景图片 -->
<script>
window.CustomBackgroundImage = "https://imgapi.cn/api.php?fl=dongman&gs=images";
</script>
<!-- 爱心动效 -->
<script src="https://cdn.jsdelivr.net/gh/mocchen/cssmeihua/js/aixin.js"></script>
<span class="js-cursor-container"></span>
<!-- 小星星动效 -->
<script src="https://cdn.jsdelivr.net/gh/mocchen/cssmeihua/js/xiaoxingxing.js"></script>
<script>
// 卡片显示上下行流量
window.ShowNetTransfer = "true";
// 关闭动画人物插图
window.DisableAnimatedMan = "true";
// 自定义描述
window.CustomDesc = "Hello MJJ";
</script>
<style>
/* 卡片毛玻璃效果+自定义字体/色彩 */
.dark .bg-card {
font-family: "Roboto", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #fff;
position: relative;
background: rgba(0,0,0,0.35);
backdrop-filter: blur(8px) saturate(120%);
border-radius: 18px;
border: 1.5px solid rgba(255,255,255,0.08);
box-shadow: 0 8px 24px rgba(0,0,0,0.15);
padding: 32px 24px;
transition: box-shadow 0.3s;
}
/* 鼠标悬停效果 */
.dark .bg-card:hover {
box-shadow: 0 12px 32px rgba(0,0,0,0.22);
}
/* 标题高亮 */
.dark .bg-card h1,
.dark .bg-card h2,
.dark .bg-card h3 {
color: #fff;
font-weight: 700;
text-shadow: 0 1px 4px rgba(0,0,0,0.12);
letter-spacing: 0.02em;
}
/* 段落柔和色 */
.dark .bg-card p {
color: #f1f1f1;
font-size: 1.1em;
line-height: 1.7;
}
/* 可选:加点炫光细节(去除可删) */
.dark .bg-card::after {
content: '';
position: absolute;
inset: 0;
border-radius: inherit;
pointer-events: none;
box-shadow: 0 0 32px 8px rgba(100,200,255,0.07) inset;
}
</style>
仪表板的自定义代码
<script>
window.DisableAnimatedMan = true;
/* 自定义字体, 注意需要同步修改下方 CSS 中的 font-family */
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'https://font.sec.miui.com/font/css?family=MiSans:400,700:MiSans'; // MiSans
// link.href = 'https://npm.elemecdn.com/[email protected]/style.css'; // 霞鹜文楷, font-family: 'LXGW WenKai Screen'
document.head.appendChild(link);
/* 修改后台左上角标题 */
const observerAdminTitle = new MutationObserver(mutations => {
mutations.forEach(mutation => {
mutation.addedNodes.forEach(node => {
if (node.nodeType === 1) { // 元素节点
const links = node.matches('.transition-opacity') ? [node] : node.querySelectorAll('.transition-opacity');
links.forEach(link => {
const textNode = Array.from(link.childNodes).find(n => n.nodeType === Node.TEXT_NODE && n.textContent.trim() === '哪吒监控');
if (textNode) {
textNode.textContent = 'Udede';
observerAdminTitle.disconnect();
}
});
}
});
});
});
observerAdminTitle.observe(document.body, { childList: true, subtree: true });
/* 修改页脚文本, 与下方 CSS 中的 不显示页脚 冲突 */
// const footer = document.querySelector('footer');
// if (footer) {
// footer.textContent = '页脚文本';
// }
</script>
<style>
/* 自定义字体, 注意需要在上方 JS 中引入相应字体 */
* {
font-family: 'MiSans';
}
h1, h2, h3, h4, h5 {
font-family: 'MiSans', sans-serif;
}
/* 修改后台右上角基佬头像 */
img[src*="https://api.dicebear.com/7.x/notionists/svg"] {
content: url("https://cdn.nodeimage.com/i/vETmUckMwM8SqXcQKTpUYNJBf5l1jTec.png");
}
/* 修改后台左上角 Logo */
img[src*="/dashboard/logo.svg"] {
content: url("https://cdn.nodeimage.com/i/ecGyD5fNwcjssQxQ4L1LZifQGB8VgfGU.webp");
}
/* 不显示页脚, 与上方 JS 中的 修改页脚文本 冲突 */
footer {
display: none;
}
</style>
json生成器



