feat(help): 重构帮助菜单界面并优化样式
refactor(bili_parser): 修复 API 响应 content-type 问题 fix(command_manager): 添加帮助图片获取的错误处理 docs(deployment): 简化部署文档并移除 JIT 相关内容
This commit is contained in:
@@ -3,132 +3,235 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>NeoBot 帮助菜单</title>
|
||||
<title>CalglauBot Menu</title>
|
||||
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
--primary-color: #4a90e2;
|
||||
--bg-color: #f5f7fa;
|
||||
--card-bg: #ffffff;
|
||||
--text-color: #333333;
|
||||
--secondary-text: #666666;
|
||||
--border-radius: 12px;
|
||||
--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
/* 调整为更深邃、高对比度的配色 */
|
||||
--bg-color: #0f172a; /* 深蓝黑背景 */
|
||||
--window-bg: rgba(30, 41, 59, 0.85); /* 窗口背景,增加不透明度以提高文字可读性 */
|
||||
--border-color: rgba(255, 255, 255, 0.08);
|
||||
|
||||
--accent: #6366f1; /* 核心强调色 - 靛蓝 */
|
||||
--accent-glow: rgba(99, 102, 241, 0.4);
|
||||
|
||||
--text-title: #f8fafc;
|
||||
--text-desc: #94a3b8;
|
||||
--text-cmd: #a5f3fc; /* 指令高亮色 - 浅青 */
|
||||
|
||||
--card-bg: rgba(0, 0, 0, 0.2);
|
||||
--cmd-bg: #0b1120; /* 代码块深色背景 */
|
||||
}
|
||||
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
font-family: 'Microsoft YaHei', 'Segoe UI', Roboto, sans-serif;
|
||||
font-family: 'Noto Sans SC', system-ui, sans-serif;
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
color: var(--text-title);
|
||||
/* 居中布局 */
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 40px;
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 600px;
|
||||
background-color: var(--bg-color);
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
padding: 20px 0;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-radius: var(--border-radius);
|
||||
color: white;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
margin: 0;
|
||||
font-size: 2.5em;
|
||||
letter-spacing: 2px;
|
||||
}
|
||||
|
||||
.header p {
|
||||
margin: 10px 0 0;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.plugin-list {
|
||||
/* 窗口容器 */
|
||||
.window {
|
||||
width: 800px; /* 稍微收窄一点,更像手机/卡片比例 */
|
||||
background: var(--window-bg);
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
border-radius: 20px;
|
||||
border: 1px solid var(--border-color);
|
||||
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.plugin-card {
|
||||
background-color: var(--card-bg);
|
||||
border-radius: var(--border-radius);
|
||||
padding: 20px;
|
||||
box-shadow: var(--shadow);
|
||||
transition: transform 0.2s;
|
||||
border-left: 5px solid var(--primary-color);
|
||||
}
|
||||
|
||||
.plugin-header {
|
||||
/* 顶部标题栏 */
|
||||
.header {
|
||||
padding: 24px 32px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dots { display: flex; gap: 8px; }
|
||||
.dot { width: 12px; height: 12px; border-radius: 50%; }
|
||||
.red { background: #ef4444; }
|
||||
.yellow { background: #f59e0b; }
|
||||
.green { background: #10b981; }
|
||||
|
||||
.title {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1px;
|
||||
color: var(--text-desc);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* 内容区域 */
|
||||
.content {
|
||||
padding: 32px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24px; /* 卡片之间的间距 */
|
||||
}
|
||||
|
||||
.page-title {
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.page-title h1 {
|
||||
font-size: 32px;
|
||||
background: linear-gradient(to right, #fff, #94a3b8);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
.page-title p {
|
||||
color: var(--text-desc);
|
||||
font-size: 14px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
/* 插件卡片 - 改为单列宽卡片 */
|
||||
.plugin-card {
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 12px;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column; /* 垂直排列 */
|
||||
gap: 16px;
|
||||
transition: transform 0.2s;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 左侧装饰线 */
|
||||
.plugin-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0; top: 0; bottom: 0;
|
||||
width: 4px;
|
||||
background: var(--accent);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* 插件头部信息 */
|
||||
.card-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.plugin-name {
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
color: var(--primary-color);
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
/* 装饰性Tag */
|
||||
.plugin-tag {
|
||||
font-size: 10px;
|
||||
background: rgba(99, 102, 241, 0.2);
|
||||
color: #818cf8;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.plugin-desc {
|
||||
color: var(--secondary-text);
|
||||
margin-bottom: 15px;
|
||||
font-size: 13px;
|
||||
color: var(--text-desc);
|
||||
line-height: 1.5;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.plugin-usage {
|
||||
background-color: #f8f9fa;
|
||||
padding: 10px;
|
||||
border-radius: 6px;
|
||||
font-family: 'Consolas', monospace;
|
||||
font-size: 0.9em;
|
||||
color: #d63384;
|
||||
border: 1px solid #e9ecef;
|
||||
/* 指令代码块 - 核心修改区域 */
|
||||
.cmd-block {
|
||||
background: var(--cmd-bg);
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
border: 1px solid var(--border-color);
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
color: var(--text-cmd);
|
||||
|
||||
/* 处理长文本的关键 CSS */
|
||||
white-space: pre-wrap; /* 保留换行符,且允许自动换行 */
|
||||
word-wrap: break-word; /* 允许长单词换行 */
|
||||
overflow-wrap: break-word; /* 标准写法 */
|
||||
word-break: break-word; /* 兼容性写法 */
|
||||
}
|
||||
|
||||
/* 模拟终端提示符 */
|
||||
.cmd-block::before {
|
||||
content: '$ ';
|
||||
color: #64748b;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
/* 页脚 */
|
||||
.footer {
|
||||
text-align: center;
|
||||
margin-top: 30px;
|
||||
color: var(--secondary-text);
|
||||
font-size: 0.8em;
|
||||
padding: 20px 32px;
|
||||
border-top: 1px solid var(--border-color);
|
||||
color: rgba(255, 255, 255, 0.2);
|
||||
font-size: 12px;
|
||||
text-align: right;
|
||||
background: rgba(0,0,0,0.1);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="window">
|
||||
<!-- 窗口栏 -->
|
||||
<div class="header">
|
||||
<h1>NeoBot</h1>
|
||||
<p>功能插件列表</p>
|
||||
<div class="dots">
|
||||
<div class="dot red"></div>
|
||||
<div class="dot yellow"></div>
|
||||
<div class="dot green"></div>
|
||||
</div>
|
||||
<div class="title">NeoBot System</div>
|
||||
</div>
|
||||
|
||||
<div class="plugin-list">
|
||||
<div class="content">
|
||||
<!-- 标题 -->
|
||||
<div class="page-title">
|
||||
<h1>功能中心</h1>
|
||||
<p>Dashboard & Command List · {{ plugins|length }} Modules Loaded</p>
|
||||
</div>
|
||||
|
||||
<!-- 插件列表 - 单列流式布局 -->
|
||||
{% for plugin in plugins %}
|
||||
<div class="plugin-card">
|
||||
<div class="plugin-header">
|
||||
<span class="plugin-name">{{ plugin.name }}</span>
|
||||
</div>
|
||||
<div class="plugin-desc">{{ plugin.description }}</div>
|
||||
<div class="plugin-usage">
|
||||
{{ plugin.usage }}
|
||||
<div class="card-top">
|
||||
<div class="plugin-name">
|
||||
{{ plugin.name }}
|
||||
<span class="plugin-tag">Plugin</span>
|
||||
</div>
|
||||
<div class="plugin-desc">
|
||||
{{ plugin.description }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 代码块:宽度占满容器,高度自适应 -->
|
||||
<div class="cmd-block">{{ plugin.usage }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
Generated by NeoBot • Playwright Rendering
|
||||
Generated by NeoBot Render Engine
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user